We like our MA's to show us the slope. An astute trader asked if I could color the EMA different colors for different slopes. This indie will paint two colors for positive and two colors for negative depending on slope. The slope triggers are set to 30 and 60 degrees in pic, but are adjustable. label in the right margin indicates the indicator and is colored same as the indicator line.
This indie has a button to enable or disable the indie. I find this handy to have several values of the indie so I can de-clutter my chart, but still look at other values of EMA. In the pic is a 21 and a 55 EMA that can be hidden with the click of the button. You can set the column that the button shows in.
R1 July 22, 2021: A friend was using this indie with an oscillator as the input and when the oscillator max'd out at zero or 100 (no more slope) the color defaulted to the negative slope. I added code to default to the EMAflat slope if the slope goes to zero.
R2 Aug 14,2021: I found an error that colored the lines improperly when the 'Use Angle' was not selected....
Trade Well...
Bob
Category NinjaTrader 8 Indicators and More
|
|
|