I was trying to buy the breakout of opening range which close above in 15 min time frame , first candle with certain percentage , and stop at same candle low ,
similar for same for sell
exit with atr 21 , 3
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, “Close”, ParamColor(“Color”, colorDefault ), styleNoTitle | ParamStyle(“Style”) | GetPriceStyle() );
_SECTION_BEGIN(“Price1”);
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, “Close”, ParamColor(“Color”, colorDefault ), styleNoTitle | ParamStyle(“Style”) | GetPriceStyle() );
_SECTION_END();
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat("{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
Plot( C, “Close”, ParamColor(“Color”, colorBlack ), styleNoTitle | ParamStyle(“Style”) | GetPriceStyle() );
Market_Start_Time=091500;
Market_Open_Brakeout=111500;
Market_end_time=151500;
PDH = TimeFrameGetPrice(“H”, indaily, -1); PWHI = LastValue (PDH,1);// PREV day high
PDL = TimeFrameGetPrice(“L”, indaily, -1); PWLO = LastValue (PDL,1); // PREV day low
PDC = TimeFrameGetPrice(“C”, indaily, -1); PWLO = LastValue (PDC,1); // PREV day CLOSE
tn = TimeNum();
dn = DateNum();
u = ValueWhen( tn<093000, HighestSince(dn!=Ref(dn,-1), H ));
w = ValueWhen( tn<093000, LowestSince(dn!=Ref(dn,-1), L ));
COND1=(u-w)>(PDC)*0.5;
COND2=(u-w)<(PDC)*0.5;
Buy=COND1 AND C>u ;
Short=COND2 AND C<w ;
Sell=ValueWhen(tn=151500,Close);
Cover=ValueWhen(tn=151500,Close);