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 de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.
Script de código aberto
Em verdadeiro espírito do TradingView, o criador deste script o tornou de código aberto, para que os traders possam revisar e verificar sua funcionalidade. Parabéns ao autor! Embora você possa usá-lo gratuitamente, lembre-se de que a republicação do código está sujeita às nossas Regras da Casa.
Aviso legal
As informações e publicações não se destinam a ser, e não constituem, conselhos ou recomendações financeiras, de investimento, comerciais ou de outro tipo fornecidos ou endossados pela TradingView. Leia mais nos Termos de Uso.