OPEN-SOURCE SCRIPT

MA20 Dual Color Line Indicator

66
MA20 Dual Color Line Indicator

The MA20 Dual Color Line is a simple yet effective moving average indicator designed to help traders quickly visualize price trends and potential reversal points. It plots a 20-period Simple Moving Average (SMA) that changes color based on the relationship between the current closing price and the moving average itself.

🔶 How It Works
When the close price is above the MA20, the moving average line turns green, suggesting a potential bullish trend.

When the close price is below the MA20, the line turns red, indicating a possible bearish trend.

If the price is exactly at the MA20, the line remains white, highlighting a neutral or decision point.

📈 Ideal For
Identifying trend direction at a glance

Spotting support and resistance levels around the MA20

Enhancing visual analysis without cluttering the chart

🛠 Features
Clean and customizable line width

Real-time color switching based on price action

Overlay display to keep charts organized

This indicator is perfect for traders who prefer a clear, color-coded visual aid to complement their trading strategy. Whether you’re a beginner or an experienced trader, the MA20 Dual Color Line helps you stay aligned with the short-term trend.

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.