Another version of the “stair step” representation of price moving within percentage variation of the Triangular moving average to draw the steps.
I add another simple MA to act like a signal for trend following identification. When the 2 lines are flat, market is ranging.
I believe it can be easily take part of trend following strategy of all sort.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
//parameters : //percent = 1 (daily) //period = 100 (daily timeframe period of the triangular moving average //SignalPeriod = 30 once ssMA = close MA = TriangularAverage[period](close) if(MA > ssMA + (MA/100)*percent) THEN ssMA = MA ELSIF (MA < ssMA - (MA/100)*percent) THEN ssMA = MA ELSE ssMA = ssMA ENDIF signalLine = average[SignalPeriod](ssMA) RETURN ssMA coloured(21,188,206), signalLine |
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