I want afl code for the following conditions.
One day daily candle.
Buy if value = open + 20
Sell if value = open - 20
Please help me experts to provide afl code to create buy / sell signals generate in this condition from amibroker.
I want afl code for the following conditions.
One day daily candle.
Buy if value = open + 20
Sell if value = open - 20
Please help me experts to provide afl code to create buy / sell signals generate in this condition from amibroker.
For the above given condition please check below AFL
_SECTION_BEGIN("Price"); 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() ); Buy = LastValue(C,1)>= Open+20; Sell = LastValue(C,1)>= Open-20; _SECTION_END();
Thank you very much