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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
//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 |
Â
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Hi Nicolas.I found this indicator very interesting and wanted to code it in form of histogram, where I could easily see the changes of the steps, but unfortunately it does not work correctly.There are missing bars and bars that leftovers. I wanted to download an image, but I get always an HTTP error if I try it.Could you please tell me where is the error on the code?
The code is:
//***Stair step Moving Average//parameters :Step = 10// 0.0010 forex 10 pips, adapt to item you are tradingMAperiod = 7
once ssMA = closeMA = average[MAperiod](close)
IF(MA > ssMA+Step) THENssMA = MAELSIF (MA < ssMA-Step) THENssMA = MAELSEssMA = ssMAENDIF
IF ssMA>ssMA[1] THENk=1ELSIF ssMA<ssMA[1] THENk=-1ELSEk=0ENDIF
RETURN k AS “Signal”, 0 AS “Zero”