Join our facebook group for Amibroker afl code discussion https://www.facebook.com/groups/603980776889348

Buy Sell Indicator Ribbon System


Buy Sell Indicator Ribbon System
Buy Sell Indicator Ribbon System


//www.aflcode.com
_SECTION_BEGIN("Price");
SetChartOptions( 0, chartShowDates | chartShowArrows | chartLogarithmic | chartWrapTitle );
_N(Title = StrFormat("{{NAME}} - "+SectorID(1)+" - {{INTERVAL}} {{DATE}} Open %g, Hi %g, Lo %g, Close %g (%.1f%%) Vol " +WriteVal( V, 1.0 ) +" {{VALUES}}", O, H, L, C, SelectedValue( ROC( C, 1 )) ));

Plot( C, "", IIf(Close > Open, colorAqua, colorLightOrange), styleCandle + styleNoLabel);
_SECTION_END();


_SECTION_BEGIN("Fast Periods");
P1 = EMA (C,3)+ EMA((C-EMA(Close,3)),3);
P2 = EMA (C,5)+ EMA((C-EMA(Close,5)),5);

P3 = EMA (C,8)+ EMA((C-EMA(Close,8)),8);
P4 = EMA (C,10)+ EMA((C-EMA(Close,10)),10);
P5 = EMA (C,12)+ EMA((C-EMA(Close,12)),12);
P6 = EMA (C,15)+ EMA((C-EMA(Close,15)),15);
_SECTION_END();

_SECTION_BEGIN("Slow Periods");
P7 = EMA (C,30)+ EMA((C-EMA(Close,30)),30);
P8 = EMA (C,35)+ EMA((C-EMA(Close,35)),35);
P9 = EMA (C,40)+ EMA((C-EMA(Close,40)),40);
P10 = EMA (C,45)+ EMA((C-EMA(Close,45)),45);
P11 = EMA (C,50)+ EMA((C-EMA(Close,50)),50);
P12 = EMA (C,55)+ EMA((C-EMA(Close,55)),55);
P13 = EMA (C,60)+ EMA((C-EMA(Close,60)),60);
_SECTION_END();

_SECTION_BEGIN("Guppy LEMMA");
Plot(P7,"",colorRed);
Plot(P8,"",colorRed);
Plot(P9,"",colorRed);
Plot(P10,"",colorRed);
Plot(P11,"",colorRed);
Plot(P12,"",colorRed);
Plot(P13,"",colorRed);

Plot(P1,"",colorBlue);
Plot(P2,"",colorBlue);
Plot(P3,"",colorBlue);
Plot(P4,"",colorBlue);
Plot(P5,"",colorBlue);
Plot(P6,"",colorBlue);
_SECTION_END();

Buy = Cross (P1,P8);
Sell = Cross(P8,P1);
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ),0, IIf( Buy, L, H ) );
Plot( 2, "",IIf( Buy, colorYellow, IIf(P1 > P8, colorGreen, IIf(P8 > P1, colorRed, IIf( Sell, colorRose, 0 )))), styleOwnScale|styleArea|styleNoLabel, -0.5, 100 );

Previous
Next Post »