Can someone help me adding buy and sell condition to this AFL.
Buy Condition :- IF Price closes above PDL from below after 9:30 am
Sell Condition :- IF Prices closes below PDH from above after 9:30 am
SL are Few points below PDH and PDL
Appreciate if someone can help me in building the buy and sell condition in the attached AFL.... Appreciate your support!
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat(EncodeColor( colorGold) + "{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
SetChartOptions(0,chartShowArrows|chartShowDates);
Plot( C, "Price", colorDefault, styleCandle );
PDH = TimeFrameGetPrice("H",inDaily,-1);
PDL = TimeFrameGetPrice("L",inDaily,-1);
Plot(PDH,"Upper",colorGreen,styleLine | styleThick);
Plot(PDL,"Lower",colorRed,styleLine | styleThick);
Buy Condition :- IF Price closes above PDL from below after 9:30 am
Sell Condition :- IF Prices closes below PDH from above after 9:30 am
SL are Few points below PDH and PDL
Appreciate if someone can help me in building the buy and sell condition in the attached AFL.... Appreciate your support!
SetChartOptions(0,chartShowArrows|chartShowDates);
_N(Title = StrFormat(EncodeColor( colorGold) + "{{NAME}} - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 ) ) ));
SetChartOptions(0,chartShowArrows|chartShowDates);
Plot( C, "Price", colorDefault, styleCandle );
PDH = TimeFrameGetPrice("H",inDaily,-1);
PDL = TimeFrameGetPrice("L",inDaily,-1);
Plot(PDH,"Upper",colorGreen,styleLine | styleThick);
Plot(PDL,"Lower",colorRed,styleLine | styleThick);