Standard MIDAS S/R Curves for Intraday Charts*

sm:=Input(“starting month”,1,12,1);
sd:=Input(“starting day of month”,1,31,1);
sy:=Input(“starting year”,1980,2100,2000);
sh:=Input(“hour”, 1,24,1);
se:=Input(“minute”,0,60,0);

start:= sd=DayOfMonth() AND sm=Month() AND sy=Year() AND
    sh=Hour() AND se=Minute();
x:=Input(“Price Field, 1=O,2=H,3=L,4=C,5=MP()”,1,5,4);
y:=If(x=1,O,If(x=2,H,If(x=3,L,If(x=4,C,If(x=5,MP(),0)))));
ab:=y*V;
denom:= If(Cum(V)−ValueWhen(1,start,Cum(V))=0,1,Cum(V)−
    ValueWhen(1,start,Cum(V)));
If(BarsSince(start),(Cum(ab)−ValueWhen(1,start,Cum(ab)))/
    denom,MP())

Get MIDAS Technical Analysis: A VWAP Approach to Trading and Investing in Today's Markets now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.