OPEN-SOURCE SCRIPT
Multiple Colored Moving Averages

MULTIPLE COLORED MOVING AVERAGES - USER GUIDE
DISCLAIMER
----------
Both the code and this documentation were created heavily using artificial intelligence. I'm lazy...
This indicator was inspired by repo32's "Moving Average Colored EMA/SMA" indicator. *
What is this indicator?
-----------------------
This is a TradingView indicator that displays up to 4 different moving averages on your chart simultaneously. Each moving average can be customized with different calculation methods, colors, and filtering options.
Why would I use multiple moving averages?
-----------------------------------------
- See trend direction across different timeframes at once
- Identify support and resistance levels
- Spot crossover signals between fast and slow MAs
- Reduce false signals with filtering options
- Compare how different MA types react to price action
What moving average types are available?
----------------------------------------
11 different types:
- SMA: Simple average, equal weight to all periods
- EMA: Exponential, more weight to recent prices
- WMA: Weighted, linear weighting toward recent data
- RMA: Running average, smooth like EMA
- DEMA: Double exponential, reduced lag
- TEMA: Triple exponential, even less lag
- HMA: Hull, fast and smooth combination
- VWMA: Volume weighted, includes volume data
- LSMA: Least squares, based on linear regression
- TMA: Triangular, double-smoothed
- ZLEMA: Zero lag exponential, compensated for lag
How do I set up the indicator?
------------------------------
Each MA has these settings:
- Enable/Disable: Turn each MA on or off
- Type: Choose from the 11 calculation methods
- Length: Number of periods (21, 50, 100, 200 are common)
- Smoothing: 0-10 levels of extra smoothing
- Noise Filter: 0-5% to ignore small changes
- Colors: Bullish (rising) and bearish (falling) colors
- Line Width: 1-5 pixels thickness
What does the smoothing feature do?
-----------------------------------
Smoothing applies extra calculations to make the moving average line smoother. Higher levels reduce noise but make the MA respond slower to price changes. Use higher smoothing in choppy markets, lower smoothing in trending markets.
What is the noise filter?
--------------------------
The noise filter ignores small percentage changes in the moving average. For example, a 0.3% filter will ignore any MA movement smaller than 0.3%. This helps eliminate false signals from minor price fluctuations.
When should I use this indicator?
---------------------------------
- Trend analysis: See if market is going up, down, or sideways
- Entry timing: Look for price bounces off MA levels
- Exit signals: Watch for MA slope changes or crossovers
- Support/resistance: MAs often act as dynamic levels
- Multi-timeframe analysis: Use different lengths for different perspectives
What are some good settings to start with?
-------------------------------------------
Conservative approach:
- MA 1: EMA 21 (short-term trend)
- MA 2: SMA 50 (medium-term trend)
- MA 3: SMA 200 (long-term trend)
- Low noise filtering (0.1-0.3%)
Active trading:
- MA 1: HMA 9 (very responsive)
- MA 2: EMA 21 (short-term)
- MA 3: EMA 50 (medium-term)
- Minimal or no smoothing
How do I interpret the colors?
------------------------------
Each MA changes color based on its direction:
- Bullish color: MA is rising (upward trend)
- Bearish color: MA is falling (downward trend)
- Gray: MA is flat or unchanged
What should I look for in crossovers?
-------------------------------------
- Golden Cross: Fast MA crosses above slow MA (bullish signal)
- Death Cross: Fast MA crosses below slow MA (bearish signal)
- Multiple crossovers in same direction can confirm trend changes
- Wait for clear separation between MAs after crossover
How do I use MAs for support and resistance?
---------------------------------------------
- In uptrends: MAs often provide support when price pulls back
- In downtrends: MAs may act as resistance on rallies
- Multiple MAs create support/resistance zones
- Stronger levels where multiple MAs cluster together
Can I use this with other indicators?
-------------------------------------
Yes, it works well with:
- Volume indicators for confirmation
- RSI or MACD for timing entries
- Bollinger Bands for volatility context
- Price action patterns for setup confirmation
What if I get too many signals?
-------------------------------
- Increase smoothing levels
- Raise noise filter percentages
- Use longer MA periods
- Focus on major crossovers only
- Wait for multiple MA confirmation
What if signals are too slow?
-----------------------------
- Reduce smoothing to 0
- Lower noise filter values
- Switch to faster MA types (HMA, ZLEMA, DEMA)
- Use shorter periods
- Focus on the fastest MA only
Which MA types work best in different markets?
----------------------------------------------
Trending markets: EMA, DEMA, TEMA (responsive to trends)
Choppy markets: SMA, TMA, HMA with smoothing (less whipsaws)
High volatility: Use higher smoothing and noise filtering
Low volatility: Use minimal filtering for better responsiveness
Do I need all the advanced features?
------------------------------------
No. Start with basic settings:
- Choose MA type and length
- Set colors you prefer
- Leave smoothing at 0
- Leave noise filter at 0
Add complexity only if needed to improve signal quality.
How do I know if my settings are working?
-----------------------------------------
- Backtest on historical data
- Paper trade the signals first
- Adjust based on market conditions
- Keep a trading journal to track performance
- Be willing to modify settings as markets change
Can I save different configurations?
------------------------------------
Yes, save different indicator templates in TradingView for:
- Different trading styles (scalping, swing trading)
- Different market conditions (trending, ranging)
- Different instruments (stocks, forex, crypto)
DISCLAIMER
----------
Both the code and this documentation were created heavily using artificial intelligence. I'm lazy...
This indicator was inspired by repo32's "Moving Average Colored EMA/SMA" indicator. *
What is this indicator?
-----------------------
This is a TradingView indicator that displays up to 4 different moving averages on your chart simultaneously. Each moving average can be customized with different calculation methods, colors, and filtering options.
Why would I use multiple moving averages?
-----------------------------------------
- See trend direction across different timeframes at once
- Identify support and resistance levels
- Spot crossover signals between fast and slow MAs
- Reduce false signals with filtering options
- Compare how different MA types react to price action
What moving average types are available?
----------------------------------------
11 different types:
- SMA: Simple average, equal weight to all periods
- EMA: Exponential, more weight to recent prices
- WMA: Weighted, linear weighting toward recent data
- RMA: Running average, smooth like EMA
- DEMA: Double exponential, reduced lag
- TEMA: Triple exponential, even less lag
- HMA: Hull, fast and smooth combination
- VWMA: Volume weighted, includes volume data
- LSMA: Least squares, based on linear regression
- TMA: Triangular, double-smoothed
- ZLEMA: Zero lag exponential, compensated for lag
How do I set up the indicator?
------------------------------
Each MA has these settings:
- Enable/Disable: Turn each MA on or off
- Type: Choose from the 11 calculation methods
- Length: Number of periods (21, 50, 100, 200 are common)
- Smoothing: 0-10 levels of extra smoothing
- Noise Filter: 0-5% to ignore small changes
- Colors: Bullish (rising) and bearish (falling) colors
- Line Width: 1-5 pixels thickness
What does the smoothing feature do?
-----------------------------------
Smoothing applies extra calculations to make the moving average line smoother. Higher levels reduce noise but make the MA respond slower to price changes. Use higher smoothing in choppy markets, lower smoothing in trending markets.
What is the noise filter?
--------------------------
The noise filter ignores small percentage changes in the moving average. For example, a 0.3% filter will ignore any MA movement smaller than 0.3%. This helps eliminate false signals from minor price fluctuations.
When should I use this indicator?
---------------------------------
- Trend analysis: See if market is going up, down, or sideways
- Entry timing: Look for price bounces off MA levels
- Exit signals: Watch for MA slope changes or crossovers
- Support/resistance: MAs often act as dynamic levels
- Multi-timeframe analysis: Use different lengths for different perspectives
What are some good settings to start with?
-------------------------------------------
Conservative approach:
- MA 1: EMA 21 (short-term trend)
- MA 2: SMA 50 (medium-term trend)
- MA 3: SMA 200 (long-term trend)
- Low noise filtering (0.1-0.3%)
Active trading:
- MA 1: HMA 9 (very responsive)
- MA 2: EMA 21 (short-term)
- MA 3: EMA 50 (medium-term)
- Minimal or no smoothing
How do I interpret the colors?
------------------------------
Each MA changes color based on its direction:
- Bullish color: MA is rising (upward trend)
- Bearish color: MA is falling (downward trend)
- Gray: MA is flat or unchanged
What should I look for in crossovers?
-------------------------------------
- Golden Cross: Fast MA crosses above slow MA (bullish signal)
- Death Cross: Fast MA crosses below slow MA (bearish signal)
- Multiple crossovers in same direction can confirm trend changes
- Wait for clear separation between MAs after crossover
How do I use MAs for support and resistance?
---------------------------------------------
- In uptrends: MAs often provide support when price pulls back
- In downtrends: MAs may act as resistance on rallies
- Multiple MAs create support/resistance zones
- Stronger levels where multiple MAs cluster together
Can I use this with other indicators?
-------------------------------------
Yes, it works well with:
- Volume indicators for confirmation
- RSI or MACD for timing entries
- Bollinger Bands for volatility context
- Price action patterns for setup confirmation
What if I get too many signals?
-------------------------------
- Increase smoothing levels
- Raise noise filter percentages
- Use longer MA periods
- Focus on major crossovers only
- Wait for multiple MA confirmation
What if signals are too slow?
-----------------------------
- Reduce smoothing to 0
- Lower noise filter values
- Switch to faster MA types (HMA, ZLEMA, DEMA)
- Use shorter periods
- Focus on the fastest MA only
Which MA types work best in different markets?
----------------------------------------------
Trending markets: EMA, DEMA, TEMA (responsive to trends)
Choppy markets: SMA, TMA, HMA with smoothing (less whipsaws)
High volatility: Use higher smoothing and noise filtering
Low volatility: Use minimal filtering for better responsiveness
Do I need all the advanced features?
------------------------------------
No. Start with basic settings:
- Choose MA type and length
- Set colors you prefer
- Leave smoothing at 0
- Leave noise filter at 0
Add complexity only if needed to improve signal quality.
How do I know if my settings are working?
-----------------------------------------
- Backtest on historical data
- Paper trade the signals first
- Adjust based on market conditions
- Keep a trading journal to track performance
- Be willing to modify settings as markets change
Can I save different configurations?
------------------------------------
Yes, save different indicator templates in TradingView for:
- Different trading styles (scalping, swing trading)
- Different market conditions (trending, ranging)
- Different instruments (stocks, forex, crypto)
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, người tạo ra tập lệnh này đã biến tập lệnh thành mã nguồn mở để các nhà giao dịch có thể xem xét và xác minh công năng. Xin dành lời khen tặng cho tác giả! Mặc dù bạn có thể sử dụng miễn phí, nhưng lưu ý nếu đăng lại mã, bạn phải tuân theo Quy tắc nội bộ của chúng tôi.
Thông báo miễn trừ trách nhiệm
Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.