OPEN-SOURCE SCRIPT
5 Advanced MAs MTF

🔵 OVERVIEW
5 Advanced MAs MTF is a professional moving averages indicator designed for traders who need to see multiple trend layers on a single chart simultaneously, each one with its own independent configuration and — above all — its own timeframe.
Unlike typical "ribbon" or "multi-MA" indicators on the market, which display several averages all computed on the active chart's timeframe, this indicator allows each of the 5 averages to have its own timeframe. You can have your EMA 8 on the 15-minute chart, your EMA 20 on the 1-hour, your EMA 50 on the 4-hour, and your SMA 200 on the daily, all plotted on the same 15-minute chart. That turns the indicator into a complete multi-timeframe control panel without needing to open four separate charts or saturate your installed indicators list.
🔶 KEY FEATURES
• 5 fully independent moving averages — each one configured separately and enabled or disabled individually.
• True multi-timeframe per MA — the core differentiator. Each MA can read its value from a higher, lower, or equal timeframe relative to the active chart. Leave it empty to use the chart's current timeframe.
• 9 moving average types — SMA, EMA, WMA, RMA, HMA, VWMA, TEMA, KAMA, and JMA. The last three (TEMA, KAMA, JMA) are implemented with their original formulas, no shortcuts. JMA uses Mark Jurik's standard defaults (Phase = 50, Power = 2).
• Configurable source per MA — Close, Open, High, Low, hl2, hlc3, ohlc4.
• Full visual styling per MA — color, width (1 to 10), and line style (solid, dashed, or dotted).
• Smart labels — each MA can show its label directly on the line, with configurable content (type, length, timeframe, or any combination of the three). Adjustable horizontal bar offset and text size.
• Interactive summary table — placed at any of the 9 chart anchors, displaying color column, type, length, timeframe, and price distance from each MA (in percentage and absolute value). Toggle to include or exclude hidden MAs.
• 22-alert system — 10 for Price↔MA crosses (bullish and bearish for each MA), 10 for MA↔MA crosses across 5 configurable slots (you pick which MA pairs to monitor), and 2 wildcard "any cross detected" alerts. All compatible with webhooks and automation.
• Works on any market and any timeframe — equities, futures, crypto, forex, commodities. From tick charts to monthly charts.
🔹 USE CASES BY TRADER STYLE
▪️ Day trader / scalper
Configure the first 3 MAs as short EMAs (8, 20, 50) on the chart's timeframe (5m or 15m) and leave MAs 4 and 5 as SMA 200 and VWMA 100 but reading them from a higher timeframe (1H, 4H, or daily). Result: you see your fast entry signals and the higher-timeframe bias at the same time without switching charts.
▪️ Swing trader
Recommended setup: EMA 20 and EMA 50 on the active chart (1H or 4H) + SMA 200 read from daily + VWMA 100 read from weekly. This lets you watch pullbacks against the EMA 20 on your operative timeframe with immediate confirmation that the higher-timeframe bias is aligned, plus the weekly VWMA as a volume-weighted "fair price" reference.
▪️ Position trader / long-term
Enable all 5 MAs on daily or weekly to build a complete structural map of the asset. The default configuration (EMA 8, EMA 20, EMA 50, SMA 200, and VWMA 100, all on daily) covers everything from fast momentum to the institutional level, combining pure-price references (SMA 200) with volume-weighted references (VWMA 100). The summary table shows the exact distance of price from each one.
▪️ Systematic crossover trader
The MA↔MA alert slots let you configure up to 5 specific crossovers simultaneously. Classic Golden Cross / Death Cross setup: Slot 1 with MA 3 (EMA 50) crossing MA 4 (SMA 200) on daily, with an automatic alert sent to your bot's webhook or notification system.
▪️ Multi-timeframe confluence trader
The most differentiating use case. Assign each MA to a different timeframe: MA 1 on 5m, MA 2 on 15m, MA 3 on 1H, MA 4 on 4H, MA 5 on daily or weekly. The summary table shows you in real time the distance of current price from the key level of each of those timeframes. When several MAs from different timeframes converge on the same price zone, that zone becomes a high-density structural level — one of the most-used concepts among institutional traders.
⚙️ INPUTS & CUSTOMIZATION
The entire indicator is 100% configurable from the Inputs panel. Each MA has its own expandable group with 14 controls. The summary table is also fully customizable (position, text size, background/border/text colors). The JMA global parameters (Phase and Power) live in their own section so advanced users can adjust them without cluttering the individual groups.
By default, all 5 MAs are enabled with a configuration tailored for daily and swing use: EMA 8 (blue, 1D), EMA 20 (red, 1D), EMA 50 (yellow, 1D), SMA 200 (green dashed, 1D), and VWMA 100 (pink dotted, 1D). The user can modify any of the parameters or reassign the MAs to other timeframes at any moment.
🔔 ALERTS
The indicator ships with 22 precompiled alerts ready to use:
• 5 alerts "Price crosses above MA N"
• 5 alerts "Price crosses below MA N"
• 10 alerts across 5 configurable slots for MA↔MA crossovers (bullish and bearish per slot)
• 2 wildcard alerts "any cross detected"
All messages include the {{ticker}} and {{close}} placeholders so they are directly parseable by webhooks, bots, and automation systems.
❓ FAQ
Does the indicator repaint?
No. The moving averages are computed on confirmed historical data. Cross alerts fire on the bar of the cross and values are not modified retroactively. To avoid signals that appear and disappear intra-bar, set the alerts to "Once per bar close".
Does it work on any timeframe?
Yes. From tick charts to monthly. In addition, each MA can have its own higher, lower, or equal timeframe relative to the active chart. The default timeframe is the current chart's timeframe.
Why 9 MA types?
Because each type behaves differently. SMA is the pure average; EMA weights recent bars more; HMA virtually eliminates lag; KAMA adapts to volatility; JMA is the smoothest while staying responsive; VWMA weights by volume. Having all of them available lets you use the right tool for each analysis without installing several separate indicators.
What are the 5 MA↔MA alert slots for?
They let you configure specific crossovers between any pair of MAs without having to create all possible combinations. In each slot you pick the fast MA and slow MA from dropdowns and receive alerts for the bullish and bearish crossovers of that pair. Example: Slot 1 = MA 3 crosses MA 4 (classic Golden Cross / Death Cross when MA 3 = EMA 50 and MA 4 = SMA 200).
What is the best MA combination?
There is no single "best" — it depends on the trading style and the asset. The Use Cases section above includes recommended configurations for the 5 most common profiles.
Is it compatible with webhooks and automation?
Yes. The 22 alerts use {{ticker}} and {{close}} placeholders in their messages, making them directly compatible with TradingView Webhooks, copy-trading platforms, Telegram/Discord bots, and any system that parses JSON.
Is it free to use?
Yes. Open-source indicator under the Mozilla Public License 2.0. You can review the full code, use it freely on TradingView, and create derivative copies while respecting the license terms.
⚠️ DISCLAIMER
This indicator is a technical analysis tool provided solely for educational and informational purposes. It does not constitute financial advice, an investment recommendation, or an invitation to trade any instrument. Moving averages are reactive (not predictive) indicators: they are based on historical data and, by their nature, can produce delayed signals in markets with sharp trend changes. In ranging or low-volatility market contexts, crossovers can be frequent and not particularly informative. Every trading decision is the sole responsibility of the trader. Past performance does not guarantee future results.
© 2026 Lic. Farias Foresi, Leandro M. — License: Mozilla Public License 2.0
5 Advanced MAs MTF is a professional moving averages indicator designed for traders who need to see multiple trend layers on a single chart simultaneously, each one with its own independent configuration and — above all — its own timeframe.
Unlike typical "ribbon" or "multi-MA" indicators on the market, which display several averages all computed on the active chart's timeframe, this indicator allows each of the 5 averages to have its own timeframe. You can have your EMA 8 on the 15-minute chart, your EMA 20 on the 1-hour, your EMA 50 on the 4-hour, and your SMA 200 on the daily, all plotted on the same 15-minute chart. That turns the indicator into a complete multi-timeframe control panel without needing to open four separate charts or saturate your installed indicators list.
🔶 KEY FEATURES
• 5 fully independent moving averages — each one configured separately and enabled or disabled individually.
• True multi-timeframe per MA — the core differentiator. Each MA can read its value from a higher, lower, or equal timeframe relative to the active chart. Leave it empty to use the chart's current timeframe.
• 9 moving average types — SMA, EMA, WMA, RMA, HMA, VWMA, TEMA, KAMA, and JMA. The last three (TEMA, KAMA, JMA) are implemented with their original formulas, no shortcuts. JMA uses Mark Jurik's standard defaults (Phase = 50, Power = 2).
• Configurable source per MA — Close, Open, High, Low, hl2, hlc3, ohlc4.
• Full visual styling per MA — color, width (1 to 10), and line style (solid, dashed, or dotted).
• Smart labels — each MA can show its label directly on the line, with configurable content (type, length, timeframe, or any combination of the three). Adjustable horizontal bar offset and text size.
• Interactive summary table — placed at any of the 9 chart anchors, displaying color column, type, length, timeframe, and price distance from each MA (in percentage and absolute value). Toggle to include or exclude hidden MAs.
• 22-alert system — 10 for Price↔MA crosses (bullish and bearish for each MA), 10 for MA↔MA crosses across 5 configurable slots (you pick which MA pairs to monitor), and 2 wildcard "any cross detected" alerts. All compatible with webhooks and automation.
• Works on any market and any timeframe — equities, futures, crypto, forex, commodities. From tick charts to monthly charts.
🔹 USE CASES BY TRADER STYLE
▪️ Day trader / scalper
Configure the first 3 MAs as short EMAs (8, 20, 50) on the chart's timeframe (5m or 15m) and leave MAs 4 and 5 as SMA 200 and VWMA 100 but reading them from a higher timeframe (1H, 4H, or daily). Result: you see your fast entry signals and the higher-timeframe bias at the same time without switching charts.
▪️ Swing trader
Recommended setup: EMA 20 and EMA 50 on the active chart (1H or 4H) + SMA 200 read from daily + VWMA 100 read from weekly. This lets you watch pullbacks against the EMA 20 on your operative timeframe with immediate confirmation that the higher-timeframe bias is aligned, plus the weekly VWMA as a volume-weighted "fair price" reference.
▪️ Position trader / long-term
Enable all 5 MAs on daily or weekly to build a complete structural map of the asset. The default configuration (EMA 8, EMA 20, EMA 50, SMA 200, and VWMA 100, all on daily) covers everything from fast momentum to the institutional level, combining pure-price references (SMA 200) with volume-weighted references (VWMA 100). The summary table shows the exact distance of price from each one.
▪️ Systematic crossover trader
The MA↔MA alert slots let you configure up to 5 specific crossovers simultaneously. Classic Golden Cross / Death Cross setup: Slot 1 with MA 3 (EMA 50) crossing MA 4 (SMA 200) on daily, with an automatic alert sent to your bot's webhook or notification system.
▪️ Multi-timeframe confluence trader
The most differentiating use case. Assign each MA to a different timeframe: MA 1 on 5m, MA 2 on 15m, MA 3 on 1H, MA 4 on 4H, MA 5 on daily or weekly. The summary table shows you in real time the distance of current price from the key level of each of those timeframes. When several MAs from different timeframes converge on the same price zone, that zone becomes a high-density structural level — one of the most-used concepts among institutional traders.
⚙️ INPUTS & CUSTOMIZATION
The entire indicator is 100% configurable from the Inputs panel. Each MA has its own expandable group with 14 controls. The summary table is also fully customizable (position, text size, background/border/text colors). The JMA global parameters (Phase and Power) live in their own section so advanced users can adjust them without cluttering the individual groups.
By default, all 5 MAs are enabled with a configuration tailored for daily and swing use: EMA 8 (blue, 1D), EMA 20 (red, 1D), EMA 50 (yellow, 1D), SMA 200 (green dashed, 1D), and VWMA 100 (pink dotted, 1D). The user can modify any of the parameters or reassign the MAs to other timeframes at any moment.
🔔 ALERTS
The indicator ships with 22 precompiled alerts ready to use:
• 5 alerts "Price crosses above MA N"
• 5 alerts "Price crosses below MA N"
• 10 alerts across 5 configurable slots for MA↔MA crossovers (bullish and bearish per slot)
• 2 wildcard alerts "any cross detected"
All messages include the {{ticker}} and {{close}} placeholders so they are directly parseable by webhooks, bots, and automation systems.
❓ FAQ
Does the indicator repaint?
No. The moving averages are computed on confirmed historical data. Cross alerts fire on the bar of the cross and values are not modified retroactively. To avoid signals that appear and disappear intra-bar, set the alerts to "Once per bar close".
Does it work on any timeframe?
Yes. From tick charts to monthly. In addition, each MA can have its own higher, lower, or equal timeframe relative to the active chart. The default timeframe is the current chart's timeframe.
Why 9 MA types?
Because each type behaves differently. SMA is the pure average; EMA weights recent bars more; HMA virtually eliminates lag; KAMA adapts to volatility; JMA is the smoothest while staying responsive; VWMA weights by volume. Having all of them available lets you use the right tool for each analysis without installing several separate indicators.
What are the 5 MA↔MA alert slots for?
They let you configure specific crossovers between any pair of MAs without having to create all possible combinations. In each slot you pick the fast MA and slow MA from dropdowns and receive alerts for the bullish and bearish crossovers of that pair. Example: Slot 1 = MA 3 crosses MA 4 (classic Golden Cross / Death Cross when MA 3 = EMA 50 and MA 4 = SMA 200).
What is the best MA combination?
There is no single "best" — it depends on the trading style and the asset. The Use Cases section above includes recommended configurations for the 5 most common profiles.
Is it compatible with webhooks and automation?
Yes. The 22 alerts use {{ticker}} and {{close}} placeholders in their messages, making them directly compatible with TradingView Webhooks, copy-trading platforms, Telegram/Discord bots, and any system that parses JSON.
Is it free to use?
Yes. Open-source indicator under the Mozilla Public License 2.0. You can review the full code, use it freely on TradingView, and create derivative copies while respecting the license terms.
⚠️ DISCLAIMER
This indicator is a technical analysis tool provided solely for educational and informational purposes. It does not constitute financial advice, an investment recommendation, or an invitation to trade any instrument. Moving averages are reactive (not predictive) indicators: they are based on historical data and, by their nature, can produce delayed signals in markets with sharp trend changes. In ranging or low-volatility market contexts, crossovers can be frequent and not particularly informative. Every trading decision is the sole responsibility of the trader. Past performance does not guarantee future results.
© 2026 Lic. Farias Foresi, Leandro M. — License: Mozilla Public License 2.0
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。