if(Interval()<86400){
//Opening Range Lines
EndTime=ParamTime("Range to", "10:00", 0);
ORHigh=ValueWhen(TimeNum()<EndTime,HighestSince(DateNum()>Ref(DateNum(),-1),High));
ORLow =ValueWhen(TimeNum()<EndTime,LowestSince(DateNum()>Ref(DateNum(),-1),Low));
Plot(ORhigh,"OR high lvl",colorRed,512);
Plot(ORlow,"Or low lvl",colorYellow,512);
//draw previous high and low(昨日高低突破)
PH = TimeFrameGetPrice( "H", inDaily, -1 );//find prev high
PL = TimeFrameGetPrice( "L", inDaily, -1 );//find prev low
Plot(ph,"Prev High",colorBlue,512+8);
Plot(pl,"Prev Low",colorYellow,512+8);
} |