Simple average with visual color
Forums › ProRealTime English forum › ProBuilder support › Simple average with visual color
- This topic has 3 replies, 3 voices, and was last updated 4 years ago by Nicolas.
-
-
03/03/2020 at 3:14 PM #121078
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.
Terminus Indicator1234567891011121314151617181920212223242526272829303132//-+------------------------------------------------------------------+-//// | Description: Trend average indicator | //// | Author: Tom's - Leofi | //// | Last update: 01.03.20 | ////-+------------------------------------------------------------------+-////-+------------------------------------------------------------------+-//// | Variable Setup | ////-+------------------------------------------------------------------+-//// slow = 200// normal = 50// fast = 20// type = 1emaSlow = average[slow, type](close)emaNormal = average[normal, type](close)emaFast = average[fast, type](close)//-+------------------------------------------------------------------+-//// | Logic | ////-+------------------------------------------------------------------+-//IF (emaFast > emaNormal and emaNormal > emaSlow) THENbackgroundColor(0,250,0)ELSIF (emaFast < emaNormal and emaNormal < emaSlow) THENbackgroundColor(250,0,0)ELSEbackgroundColor(250,165,0)ENDIFRETURN emaFast coloured(200, 200, 200) STYLE(line, 2) AS "Fast Average 0", emaNormal coloured(80, 80, 80) STYLE(line, 2) AS "Normal Average 1", emaSlow coloured(0, 0, 0) STYLE(line, 2) AS "Slow Average 2"03/03/2020 at 3:16 PM #121079Custom Terminus 2 moving average + setting1234567891011121314151617181920212223242526272829303132333435363738394041//-+------------------------------------------------------------------+-//// | Description: Trend average indicator | //// | Author: Tom's - Leofi | //// | Last update: 03.03.20 | ////-+------------------------------------------------------------------+-////-+------------------------------------------------------------------+-//// | Variable Setup | ////-+------------------------------------------------------------------+-////-> RGB Background color positive trend (light pastel green)upR = 207upG = 240upB = 204//-> RGB Background color negative trend (light pink)downR = 252downG = 192downB = 203//-> Setting period moving average slow and fastslowMovingAverage = 200fastMovingAverage = 20//-> Setting type moving averagetypeMovingAverage = 1//-+------------------------------------------------------------------+-//// | Logic | ////-+------------------------------------------------------------------+-//emaslowMovingAverage = average[slowMovingAverage, typeMovingAverage](close)emafastMovingAverage = average[fastMovingAverage, typeMovingAverage](close)IF (emafastMovingAverage > emaslowMovingAverage) THENbackgroundColor(upR, upG, upB)ELSIF (emafastMovingAverage < emaslowMovingAverage) THENbackgroundColor(downR, downG, downB)ENDIFRETURN emafastMovingAverage coloured(200, 200, 200) STYLE(line, 2) AS "Moving Average Fast", emaslowMovingAverage coloured(0, 0, 0) STYLE(line, 2) AS "Moving Average Slow"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.
03/04/2020 at 4:55 AM #12111003/05/2020 at 10:34 AM #121214 -
AuthorPosts
Find exclusive trading pro-tools on