Stair step moving average

Category: Indicators By: Nicolas Created: October 14, 2015, 12:28 PM
October 14, 2015, 12:28 PM
Indicators
1 Comment

Easy reading of moving average price action without annoying moving average whipsaws due of volatility, this indicator simply draws “stair step” within defined point/pip treshold value (Step).

As an example, this indicator only make use of SMA and could be easily adapt by anyone 🙂

There are different approach to trade this indi : other moving average crossover or simple price breakout of the line, use it as you would, enjoy.

//parameters :
// Step = 0.0010 forex 10 pips, adapt to item you are trading
// MAperiod = 20

once ssMA = close
MA = average[MAperiod](close)

if(MA > ssMA + Step) THEN
   ssMA = MA
ELSIF (MA < ssMA - Step) THEN
   ssMA = MA
ELSE
   ssMA = ssMA
ENDIF

RETURN ssMA

 

Download
Filename: Stair-step-moving-average.itf
Downloads: 141
Nicolas Master
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

Logo Logo
Loading...