OPEN-SOURCE SCRIPT
Moving Average Ribbon - MTF

MOVING AVERAGE RIBBON (MTF)
A clean, lightweight ribbon of four independent moving averages — everything you normally need from several separate MA scripts, combined into a single indicator slot.
Instead of loading four copies of a basic MA indicator, this script lets you configure each line completely on its own, including the timeframe it is calculated on.
FEATURES
• 4 independent moving averages. Each one can be enabled or disabled individually, and a disabled MA is fully removed from the chart and the status line.
• 5 MA types per line: SMA, EMA, SMMA (RMA), WMA, and VWMA. Every MA can use a different type — for example an EMA for the fast line and an SMA for the slow line.
• Custom source per line. Choose close, open, hl2, hlc3, or any other series available in the source dropdown, separately for each MA.
• Custom length and color per line.
• Per-MA multi-timeframe (MTF). Each moving average has its own MTF toggle and timeframe field. Enable MTF on a single line to overlay, for example, the daily 200 MA on a 15-minute chart, while the other three lines stay on the chart timeframe.
• Compact settings layout. All parameters for one MA sit on a single inline row, so the settings panel stays readable, and the inputs for a disabled MA are greyed out.
DEFAULT CONFIGURATION
MA #1 — SMA, length 5, source close
MA #2 — SMA, length 20, source close
MA #3 — SMA, length 50, source close
MA #4 — SMA, length 200, source close
All four are enabled by default with MTF turned off, so out of the box the indicator behaves as a standard 5 / 20 / 50 / 200 ribbon on the chart timeframe. Every value can be changed in the settings.
ABOUT THE MTF CALCULATION
Higher-timeframe values are requested with lookahead disabled, so no future data is used and the plotted history matches what would have been visible in real time. Higher-timeframe lines update as the higher-timeframe bar develops, and become final when that bar closes. The indicator also supports the built-in timeframe selector in the settings, with gaps enabled, if you prefer to shift the whole indicator to another resolution at once.
HOW TO USE IT
• Use the fast and slow lines together to read trend direction and momentum: price above the ribbon with the lines stacked in order suggests an uptrend, the reverse suggests a downtrend.
• Watch crossovers between two lines as a classic trend-change reference (for example 20 over 50).
• Use the MTF option to keep a higher-timeframe level of reference — such as the daily 200 MA — visible while you work on a lower timeframe.
This indicator is a visualization tool only. It does not generate buy or sell signals and should be combined with your own analysis and risk management.
A clean, lightweight ribbon of four independent moving averages — everything you normally need from several separate MA scripts, combined into a single indicator slot.
Instead of loading four copies of a basic MA indicator, this script lets you configure each line completely on its own, including the timeframe it is calculated on.
FEATURES
• 4 independent moving averages. Each one can be enabled or disabled individually, and a disabled MA is fully removed from the chart and the status line.
• 5 MA types per line: SMA, EMA, SMMA (RMA), WMA, and VWMA. Every MA can use a different type — for example an EMA for the fast line and an SMA for the slow line.
• Custom source per line. Choose close, open, hl2, hlc3, or any other series available in the source dropdown, separately for each MA.
• Custom length and color per line.
• Per-MA multi-timeframe (MTF). Each moving average has its own MTF toggle and timeframe field. Enable MTF on a single line to overlay, for example, the daily 200 MA on a 15-minute chart, while the other three lines stay on the chart timeframe.
• Compact settings layout. All parameters for one MA sit on a single inline row, so the settings panel stays readable, and the inputs for a disabled MA are greyed out.
DEFAULT CONFIGURATION
MA #1 — SMA, length 5, source close
MA #2 — SMA, length 20, source close
MA #3 — SMA, length 50, source close
MA #4 — SMA, length 200, source close
All four are enabled by default with MTF turned off, so out of the box the indicator behaves as a standard 5 / 20 / 50 / 200 ribbon on the chart timeframe. Every value can be changed in the settings.
ABOUT THE MTF CALCULATION
Higher-timeframe values are requested with lookahead disabled, so no future data is used and the plotted history matches what would have been visible in real time. Higher-timeframe lines update as the higher-timeframe bar develops, and become final when that bar closes. The indicator also supports the built-in timeframe selector in the settings, with gaps enabled, if you prefer to shift the whole indicator to another resolution at once.
HOW TO USE IT
• Use the fast and slow lines together to read trend direction and momentum: price above the ribbon with the lines stacked in order suggests an uptrend, the reverse suggests a downtrend.
• Watch crossovers between two lines as a classic trend-change reference (for example 20 over 50).
• Use the MTF option to keep a higher-timeframe level of reference — such as the daily 200 MA — visible while you work on a lower timeframe.
This indicator is a visualization tool only. It does not generate buy or sell signals and should be combined with your own analysis and risk management.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.
Script open-source
Nello spirito di TradingView, l'autore di questo script lo ha reso open source, in modo che i trader possano esaminarne e verificarne la funzionalità. Complimenti all'autore! Sebbene sia possibile utilizzarlo gratuitamente, ricordiamo che la ripubblicazione del codice è soggetta al nostro Regolamento.
Declinazione di responsabilità
Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.