TradeStation

Colored Moving Averages Can Help You Spot Trends

Moving averages are perhaps the most popular indicator in technical analysis. But sometimes they're not the easiest to interpret.

This indicator helps you see the trend by coloring the MA based on its direction. It's green when rising and red when falling. Of course, you can easily change that in the Style tab under Settings.

Color MA also lets you select from five different types of moving averages, including simple, exponential and Hull. We've included a list for easy reference below. Just change the "AvgType" on the Input tab under Settings.

This chart of META shows the 20-day simple moving average. Notice how swings often marked turns in the stock price.

AvgType codes:
1 - Simple Moving Average
2 - Exponential Moving Average
3 - Hull Moving Average
4 - Weighted Moving Average
5 - Volume Weighted Moving Average
Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in a publication is governed by House Rules. You can favorite it to use it on a chart.

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.

Want to use this script on a chart?