Hi all.
Simple trend indicator based on moving average, define your moving average parameter and watch the result. You can apply in on the price chart or below it to get the trend direction or pullback infos quickly.
green = fast moving average> normal and normal> slow.
red = fast moving average <normal and normal <slow.
yellow = green or red is not correct.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
// Author: Tom's - Leofi // Name: Terminus indicator // Description: Trend average indicator // Var indicator emaSlow = Average[slow, type](close) emaNormal = Average[normal, type](close) emaFast = Average[fast, type](close) // Logic if (emaFast > emaNormal and emaNormal > emaSlow) then backgroundcolor(0,250,0) elsif (emaFast < emaNormal and emaNormal < emaSlow) then backgroundcolor(250,0,0) else backgroundcolor(250,165,0) endif // Boolean draw indicator if (drawIndicator) then indicatorAlpha = 250 else indicatorAlpha = 0 endif return emaFast coloured(200, 200, 200, indicatorAlpha) STYLE(line, 2) as "Fast Average 0", emaNormal coloured(80, 80, 80, indicatorAlpha) STYLE(line, 2) as "Normal Average 1", emaSlow coloured(0, 0, 0, indicatorAlpha) STYLE(line, 2) as "Slow Average 2" |
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
https://gitlab.com/scs.torleon/indicators/-/blob/54547b13dd93fffef7db9feaac75642d6d4105dc/Indicators/ProBuilder/terminus-indicator.itf
Is there some way whereby this indicator can be simplified by just having two imputs.? Imput 1: Fast MA. Imput 2: Slow MA. The background of the chart appears in light pastel GREEN when the Fast MA is above the Slow MA indicating a positive trend. When the Fast MA is below the Slow MA, the Background of the Chart turns LIGHT PINK indicating negative. The settings of the MA can be adjusted to the Period as well as the type of MA.
Go visit http://www.prorealcode.com/topic/simple-average-with-visual-color/ and watch 2em post
https://www.prorealcode.com/topic/simple-average-with-visual-color/
Hi,I am new on Prorealtime and coding.I downloaded the indi but I have it on a separate window.How can I plot it on the chart?Thanks in advance for the answer