PROTECTED SOURCE SCRIPT
Обновлено Four Moving Averages

Overview
This customizable indicator displays up to four moving averages simultaneously on your chart, giving traders complete flexibility to monitor multiple trends and timeframes at once. Each moving average is independently configurable, allowing you to create your perfect combination of trend indicators.
How It Works
The indicator calculates and plots four separate moving averages based on your specifications. Each moving average can be customized independently, allowing you to mix different types, lengths, and timeframes. For example, you could display a 20-period EMA on the current timeframe alongside a 200-period SMA from a daily chart, all while viewing an intraday chart.
Key Features
Multiple MA Types Supported:
SMA (Simple Moving Average) - Equal weight to all periods
EMA (Exponential Moving Average) - More weight to recent prices
WMA (Weighted Moving Average) - Linear weighting
RMA (Rolling Moving Average) - Also known as Smoothed MA
HMA (Hull Moving Average) - Reduced lag with smooth curve
VWMA (Volume Weighted Moving Average) - Incorporates volume data
Fully Customizable Parameters for Each MA:
Length: Set any period from 1 to infinity (common: 20, 50, 100, 200)
Source: Choose from Close, Open, High, Low, HL2, HLC3, OHLC4, and more
Timeframe: Display MAs from any timeframe regardless of your chart timeframe
Offset: Shift the MA forward or backward on the chart
Enable/Disable: Toggle each MA on or off without losing settings
Visual Customization:
Custom Colors: Choose any color for each MA line
Line Styles: Select from Solid, Dashed, or Dotted lines
Line Width: Adjust thickness from 1 to 4 for better visibility
Organized Settings: Each MA has its own settings group for easy configuration
Default Configuration
Out of the box, the indicator comes with these preset values:
MA1: 20-period SMA (Blue) - Short-term trend
MA2: 50-period SMA (Red) - Medium-term trend
MA3: 100-period SMA (Green) - Longer-term trend
MA4: 200-period SMA (Orange) - Long-term trend/support-resistance
Use Cases
Trend Identification: Use multiple timeframes to confirm trend direction
Support/Resistance: Moving averages often act as dynamic support and resistance levels
Crossover Strategies: Identify when faster MAs cross slower MAs for potential signals
Multi-Timeframe Analysis: Display daily MAs on an hourly chart for broader context
Custom Setups: Create your own unique combination of MAs that fit your trading style
This customizable indicator displays up to four moving averages simultaneously on your chart, giving traders complete flexibility to monitor multiple trends and timeframes at once. Each moving average is independently configurable, allowing you to create your perfect combination of trend indicators.
How It Works
The indicator calculates and plots four separate moving averages based on your specifications. Each moving average can be customized independently, allowing you to mix different types, lengths, and timeframes. For example, you could display a 20-period EMA on the current timeframe alongside a 200-period SMA from a daily chart, all while viewing an intraday chart.
Key Features
Multiple MA Types Supported:
SMA (Simple Moving Average) - Equal weight to all periods
EMA (Exponential Moving Average) - More weight to recent prices
WMA (Weighted Moving Average) - Linear weighting
RMA (Rolling Moving Average) - Also known as Smoothed MA
HMA (Hull Moving Average) - Reduced lag with smooth curve
VWMA (Volume Weighted Moving Average) - Incorporates volume data
Fully Customizable Parameters for Each MA:
Length: Set any period from 1 to infinity (common: 20, 50, 100, 200)
Source: Choose from Close, Open, High, Low, HL2, HLC3, OHLC4, and more
Timeframe: Display MAs from any timeframe regardless of your chart timeframe
Offset: Shift the MA forward or backward on the chart
Enable/Disable: Toggle each MA on or off without losing settings
Visual Customization:
Custom Colors: Choose any color for each MA line
Line Styles: Select from Solid, Dashed, or Dotted lines
Line Width: Adjust thickness from 1 to 4 for better visibility
Organized Settings: Each MA has its own settings group for easy configuration
Default Configuration
Out of the box, the indicator comes with these preset values:
MA1: 20-period SMA (Blue) - Short-term trend
MA2: 50-period SMA (Red) - Medium-term trend
MA3: 100-period SMA (Green) - Longer-term trend
MA4: 200-period SMA (Orange) - Long-term trend/support-resistance
Use Cases
Trend Identification: Use multiple timeframes to confirm trend direction
Support/Resistance: Moving averages often act as dynamic support and resistance levels
Crossover Strategies: Identify when faster MAs cross slower MAs for potential signals
Multi-Timeframe Analysis: Display daily MAs on an hourly chart for broader context
Custom Setups: Create your own unique combination of MAs that fit your trading style
Информация о релизе
Updated the ability to specify timeframes for each moving average lineCommon Timeframe Values:
1 = 1 minute
5 = 5 minutes
15 = 15 minutes
60 = 1 hour
240 = 4 hours
D = Daily
W = Weekly
Example Setup:
MA1 (20): Always visible (leave empty)
MA2 (50): Show on 15min+ charts (set to "15")
MA3 (100): Show on 1hr+ charts (set to "60")
MA4 (200): Show on 1hr+ charts (set to "60") ← Default setting
Скрипт с защищённым кодом
Этот скрипт опубликован с закрытым исходным кодом. Однако вы можете использовать его свободно и без каких-либо ограничений — читайте подробнее здесь.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.
Скрипт с защищённым кодом
Этот скрипт опубликован с закрытым исходным кодом. Однако вы можете использовать его свободно и без каких-либо ограничений — читайте подробнее здесь.
Отказ от ответственности
Все виды контента, которые вы можете увидеть на TradingView, не являются финансовыми, инвестиционными, торговыми или любыми другими рекомендациями. Мы не предоставляем советы по покупке и продаже активов. Подробнее — в Условиях использования TradingView.