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.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.