OPEN-SOURCE SCRIPT

EMAs & SMAs Suite (5+5) + Cluster Alert

269
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.

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.