Skip to main content

Effective swing Indicator for Amibroker (AFL)

amarjit123 over 13 years ago Amibroker (AFL)

  • Rating:
    4 / 5 (Votes 4)
  • Tags:
    trading system, amibroker

Effective swing Indicator with Buy or Sale Signal only intraday 15m tf

Indicator / Formula

Copy & Paste Friendly
range1 = Optimize("range1",Param("range1",11,1,200,1,0),1,200,5);
range2 = Optimize("range2",Param("range2",6,1,200,1,0),1,200,5);
range3 = Optimize("range3",Param("range3",26,1,200,1,0),1,40,2);
StDevrange = Optimize("StDevrange",Param("StDevrange",90,1,200,1,0),1,200,2);
MAO = EMA(EMA(Close - EMA(Close, range1),range2),range3);
deriv = MAO - Ref(MAO,-1);
deriv2 = (deriv - Ref(deriv,-1));
Plot(MAO,"mao",colorBlack,styleLine);
Plot(deriv,"deriv",colorBlue,styleLine);
Plot(deriv2,"deriv2",colorRed,styleLine);
Buy = Cross(deriv,0) AND deriv2 > 1.5*StDev(deriv2, StDevrange);
Sell = Cross(0,deriv) AND deriv2 < -1.5*StDev(deriv2, StDevrange);
Short = Sell;
Cover = Buy;
shape = Buy * shapeUpArrow + Sell * shapeDownArrow;
PlotShapes( shape, IIf( Buy, colorGreen, colorRed ), 0, IIf( Buy, 0,0 ) );

1 comments

1. nirzig
over 13 years ago

looks good! are there any other rules except the buyy\sell arrows.
sometimes i see a red arrow coming after a red arrow,thats why im asking.
Thanks

Leave Comment

Please login here to leave a comment.