ChrisMoody

Example Of How To Code Triple EMA’s - Colors Based On Trend!!!

FX:AUDUSD   Australian Dollar / U.S. Dollar
69
Example of Triple EMA Changing Color To Show Trend.Currently You Can Only Have 2 Plots That Change Colors and have Fills Between The Plots.So I Created 2 Separate Indicators with Same RulesRules:If Slow EMA is Less Than Medium EMA, AND Medium EMA is Less Than Fast EMAColor = Red Showing Down TrendIf Slow EMA is Greater Than Medium EMA, AND Medium EMA is Greater Than Fast EMAColor = Green Showing Up TrendIf Both of the Above Rules are False then:Color = Yellow Showing No Trend. Consolidation Area.Lower StudyUses the Same Rules as the Upper Studies With the 3 EMA’sPlots Red in Down Trend, Green in Up Trend, Yellow = No TrendHistogram Shows The Difference Between the Short and Long EMA's*****Code is pasted below...Sometimes When I Copy and Paste the Code For Some Reason It Doesn't Come Through Correctly. *****You Can Click On The White Arrow At The Top Right Of The Chart And Then You Have Access To The Chart. On The Indicators Click On The Brackets To The Left Of the X And You Will See The Source Code. Just Re Name It If you Want and Click Save And The Indicator Will Be In Your Indicators List Under "Custom Scripts"Let Me Know If You Have Any Requests For Any Indicators.....I Enjoy Coding...

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.