OPEN-SOURCE SCRIPT
EMAs & SMAs Suite (5+5) + Cluster Alert

What this script does
This indicator combines 5 Exponential Moving Averages (EMAs) and 5 Simple Moving Averages (SMAs) into a single, clean overlay.
Each moving average can be individually configured with its own visibility, length, color, line width, and visual style (Line / Step / Dots).
An optional value label can display the current values of all enabled EMAs and SMAs on the last bar.
Key feature — Cluster Alert (noise-reduced)
Beyond plotting moving averages, the script includes a single-trigger cluster alert designed to reduce alert spam.
The logic monitors the behavior of SMA(10) relative to a short-term EMA cluster:
Bullish signal: when SMA(10) enters above both EMA(9) and EMA(21)
Bearish signal: when SMA(10) enters below both EMA(9) and EMA(21)
The alert is triggered only on the first bar that enters the new state, not on every candle that remains above or below the cluster.
This makes it suitable for identifying momentum resumption, trend continuation, or early weakness, without repetitive signals.
How to use
Enable or disable the EMAs and SMAs you want to display.
Adjust periods, colors, widths, and styles according to your chart preferences.
(Optional) Enable “Confirm signals only on bar close” to avoid intrabar alerts.
Create an alert in TradingView using “Any alert() function call” to receive detailed messages.
(Optional) Enable “Show signal markers on chart” to visualize Bull/Bear entries.
Visual styles note
The available styles (Line / Step / Dots) reflect the actual rendering modes supported by plot() in Pine Script and are not dashed lines.
Intended use
This script is designed as a visual and alerting tool to support trend and momentum analysis.
It does not replace risk management or a complete trading plan.
Disclaimer
This script does not provide investment advice.
All trading decisions and risk management remain the responsibility of the user.
This indicator combines 5 Exponential Moving Averages (EMAs) and 5 Simple Moving Averages (SMAs) into a single, clean overlay.
Each moving average can be individually configured with its own visibility, length, color, line width, and visual style (Line / Step / Dots).
An optional value label can display the current values of all enabled EMAs and SMAs on the last bar.
Key feature — Cluster Alert (noise-reduced)
Beyond plotting moving averages, the script includes a single-trigger cluster alert designed to reduce alert spam.
The logic monitors the behavior of SMA(10) relative to a short-term EMA cluster:
Bullish signal: when SMA(10) enters above both EMA(9) and EMA(21)
Bearish signal: when SMA(10) enters below both EMA(9) and EMA(21)
The alert is triggered only on the first bar that enters the new state, not on every candle that remains above or below the cluster.
This makes it suitable for identifying momentum resumption, trend continuation, or early weakness, without repetitive signals.
How to use
Enable or disable the EMAs and SMAs you want to display.
Adjust periods, colors, widths, and styles according to your chart preferences.
(Optional) Enable “Confirm signals only on bar close” to avoid intrabar alerts.
Create an alert in TradingView using “Any alert() function call” to receive detailed messages.
(Optional) Enable “Show signal markers on chart” to visualize Bull/Bear entries.
Visual styles note
The available styles (Line / Step / Dots) reflect the actual rendering modes supported by plot() in Pine Script and are not dashed lines.
Intended use
This script is designed as a visual and alerting tool to support trend and momentum analysis.
It does not replace risk management or a complete trading plan.
Disclaimer
This script does not provide investment advice.
All trading decisions and risk management remain the responsibility of the user.
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.