TWO INDICATORS. ONE COLLECTION.Built for TradingView
SureShotExplore the bundle

02 / THE EMA OVERLAY

9 / 50 / 200
EMA Cross

Three familiar moving averages. Two clear crossing conditions. A simple companion to the combined overlay.

INDICATOR ON CHARTXAUUSD · 5m
9 / 50 / 200 EMA Cross on the OANDA XAUUSD 5-minute chart, supplied TradingView screenshot
TradingView chartView full chart
PINE SCRIPT v6 · OVERLAY

Follow the relationship
between the lines.

An exponential moving average (EMA) smooths price while giving more weight to recent values. A shorter EMA typically reacts faster than a longer one.

This script calculates all three EMAs from the chart’s closing price and marks crossings between the 9 and 50 EMA.

XAUUSD · OANDA · 5-minute chart. Select the image to enlarge.

YOUR LINE-BY-LINE GUIDE

Three lengths.
Three perspectives.

The lengths are fixed in the supplied source. This script has no period inputs in its settings.

09

The faster line

Yellow · 9-period EMA.
Tracks recent price changes more closely.

50

The comparison line

Blue · 50-period EMA.
The reference for the crossover signals.

200

The broader view

Red · 200-period EMA.
A longer-period context line.

9 / 50 / 200 EMA CROSSXAUUSD · 5m
Supplied TradingView screenshot showing yellow 9 EMA, blue 50 EMA, red 200 EMA and crossing markers on XAUUSD
9 EMA50 EMA200 EMAGreen/red triangles: 9/50 crosses

Supplied TradingView screenshot · XAUUSD, 5-minute chart. A chart view does not establish trading performance. Select it to enlarge.

THE EXACT SIGNAL RULES

A crossing, not a promise.

Chart markerWhat happenedWhat it does not mean
Green triangle below the candleThe 9 EMA crossed above the 50 EMA.It does not require price or either EMA to be above the 200 EMA.
Red triangle above the candleThe 9 EMA crossed below the 50 EMA.It does not require price or either EMA to be below the 200 EMA.
Red 200 EMA lineThe 200-period EMA of the closing price.It does not approve, reject or change the buy/sell signals.

SETTINGS & ALERTS

Simple to identify.
Simple to set up.

The default line width is 2. Plot colors and visibility can be adjusted in TradingView’s Style settings. The 9, 50 and 200 periods are defined directly in the source.

Create separate alerts for EMA 9 Cross Above EMA 50 and EMA 9 Cross Below EMA 50.

Step-by-step alert setup ↗

Know the boundaries

The script has no built-in TP, SL, trailing stop, position sizing or trade execution. It is not a Strategy Tester strategy.

Crosses may occur repeatedly in sideways price movement. On an unfinished candle, a cross can appear and later disappear. An alert set to Once Per Bar Close reduces intrabar triggering, but does not turn the indicator into a guaranteed system.

Indicator chart

Selected indicator chart
Original screenshot · prices and signals unchangedOpen original size ↗