Welcome Features News Download Registration Support FAQ Wish list Links
Advanced stock charting and analysis program

AFL Library

This is read-only version of AFL library entry. Ability to add user formulas and comment is only available from members-only area.

Details:

Formula name: Effective Swing Indicator
Author/Uploader: Brian Oliver - (email hidden)
Date/Time added: 2009-09-23 23:24:21
Origin: This was created by me
Keywords: trend, swing, ema, derivative
Level: basic
Flags: system,indicator

DISCLAIMER: Most formulas present in AFL on-line library are submitted by the users and are provided here on an "as is" and "as available" basis. AmiBroker.com makes no representations or warranties of any kind to the contents or the operation of material presented here. We do not maintain nor provide technical support for 3rd party formulas.
Description:

This indicator is meant to be added below a price chart. It is made to locate BIG turning points. The idea is to allow for entry points (and exits) where there is a definite turn instead of generating signals in regions that are essentially flat without any trend. I also use stops, both in backtesting and real trading because you\'re foolish to think every trade is a winner.

The best parameter to adjust first is the standard deviation range, the lower it is, the fewer signals will be generated. The other parameters are basically just to get a smoothly plotted black line.

Formula:

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 ) );

Comments:

Tony
rakarth [at] hotmail.com
2009-12-15 22:16:52
Great work Brian. I\\\'m playing around with it at the moment but was wondering what values you tend to use? Cheers.


About | Privacy | Terms of Use | Contact information
Copyright © 2001 AMIBROKER.COM