Afl required for catching short term trend change

#1
Dear friends

I want AFL for following condition EMA CROSSOVER .

5 EMA of the close & 6 EMA of the open basis includinding price data of security.

Pl, help .

Thanks

Pra
 

hitesh

Active Member
#2
Dear friends

I want AFL for following condition EMA CROSSOVER .

5 EMA of the close & 6 EMA of the open basis includinding price data of security.

Pl, help .

Thanks

Pra
Pra,

you can overlay EMA from avarage and press right click on chart to set parameter. Alternatively, following is the afl.
=======================
_SECTION_BEGIN("Price and EMA");
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() );


Plot(EMA(C,5),"EMA C 5", colorRed,styleLine);
Plot(EMA(O,5),"EMA O 6", colorBlue,styleLine);

_SECTION_END();
==================================

Hope this suits your purose

hitesh
 
#3
Pra,

you can overlay EMA from avarage and press right click on chart to set parameter. Alternatively, following is the afl.
=======================
_SECTION_BEGIN("Price and EMA");
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() );


Plot(EMA(C,5),"EMA C 5", colorRed,styleLine);
Plot(EMA(O,5),"EMA O 6", colorBlue,styleLine);

_SECTION_END();
==================================

Hope this suits your purose

hitesh


Dear Hitesh

Thanks for your help. value of 5EMA on closing basis is ok but value of 6 ema on open basis is different from original value. You can check the value with amibroker in built formulaof ema on such condition. So, i would request you Pl , retify your Afl & boss pl, include candle information like open ,high,low ,close &volume.

Again, i am appreciating your talent work.

Thanks

Pra
 
Last edited:

Similar threads