TradeReign
Back to HomeEducation HubCompatibilityAboutDisclosures
TradingView Setup

How to Set a TradingView Moving Average Alert Price Crosses and EMA Crossovers

The two alerts can qualify on different candles even when they use the same symbol, interval, and slow EMA. The example below lets you check each trigger against the previous and current close.

Quick Answer

Add the moving average to your chart. In Create alert, set Condition to Price, choose Crossing Up or Crossing Down, and change Value to the moving average. Choose Once per bar close to require confirmation at the candle close. For a 9 EMA crossing a 21 EMA, choose the 9 EMA on the left and the 21 EMA on the right.

Compare the two alerts on a chartSet a price crossing alertSet a two-EMA alert

How to get an alert when price crosses a moving average

For a breakdown alert, change the operator to Crossing Down. For either direction, choose Crossing. If you want a simple moving average, add TradingView’s built-in Moving Average Simple and select its MA plot in the same right-hand menu.

  1. Open the intended symbol and timeframe on a standard candlestick chart. For this example, use five-minute bars.
  2. In Indicators, add the built-in Exponential moving average. Open its settings and set Length to 21, Source to Close, and Offset to 0.
  3. Open Create alert. If TradingView first shows an alert prompt, select Create manually.
  4. Set the left side of Condition to Price. Choose Crossing Up. Open the dropdown currently labeled Value and select EMA (21, close). If there is a plot selector, choose EMA.
  5. Set Trigger to Once per bar close. Review the timeframe, expiration and notification settings. Give it a name such as MES 5m close above EMA 21 and select Create.

How to set a 9 EMA crossover alert against a 21 EMA

Add a second built-in EMA. Give the two instances distinct lengths, 9 and 21, and keep Source set to Close and Offset at 0 for both. In the manual alert dialog, choose the 9 EMA and its EMA plot on the left, Crossing Up in the middle, and the 21 EMA and its EMA plot on the right. Select Once per bar close and give the alert a name that includes both lengths.

Crossing Up describes the direction of the left-hand series relative to the right-hand series. If you put the 21 EMA on the left and leave Crossing Up selected, you are watching the slow EMA cross above the fast EMA. For the fast EMA crossing below the slow EMA, keep the fast EMA on the left and choose Crossing Down.

Compare a wick, price cross and EMA crossover on the same bars

This is a fictional five-minute MES chart with 44 visible candles and 24 earlier closes to initialize the averages. At W, the high is 6,009.25, enough to move above the live 21 EMA. At the completed candle, price is back at 6,008.00, below the 21 EMA. A bar-close alert has no confirmed crossing there.

At A, price closes above the 21 EMA after the preceding candle closed below it. The 9 EMA is still below the 21 EMA. At B the 9 EMA finally closes above the 21 EMA after being below at 10:50. Price is already above the 21 EMA on both of those closes, so only the two-EMA condition has a new up-cross at B.

What each completed candle would qualify for
Close ETPrice9 EMA21 EMABar-close result
W · 10:306,008.006,007.926,008.87Wick exceeds the EMA. Neither cross confirms at close.
A · 10:356,009.006,008.146,008.89Price crosses above the 21 EMA. The 9 EMA is still below.
10:506,009.756,009.006,009.14The 9 EMA is still below the 21 EMA.
B · 10:556,010.506,009.306,009.27The 9 EMA crosses above the 21 EMA. Price was already above.

One MES rebound, two separate crossing alerts

Synthetic MES 5-minute candles. Times are bar closes in ET.

Blue is the 9 EMA, gold is the 21 EMA. At W, price trades above the slow EMA during the candle and closes below it. Price closes through the slow EMA at A. The blue EMA first closes above the gold EMA at B, four bars later.

Why a moving-average alert did not fire

Open the Alerts panel and check the alert’s status and Alerts Log. If the log shows a trigger, check the delivery method you selected. If the log has no event, compare the prior and current completed candle using the saved symbol, timeframe, direction, and indicator inputs. A chart can show price above the EMA for several bars after the original crossing.

If the alert was created after the event, use the next crossing to test it. If you changed the EMA length or chart timeframe, create the alert with the new settings and disable the old one if it has the same purpose. TradingView keeps the indicator settings captured when the existing alert was created.

For futures, check whether the alert is on the continuous symbol or a dated contract, and whether your chart uses regular or electronic hours. A five-minute close and its EMA can differ when the selected session changes. Also look at the chart’s candle type and the alert’s expiration.

Sources

Official References

Platform details on this page were checked against these official resources.

TradingView technical alertsIndicator alert setup, operators and saved settings.TradingView alert configurationVerify the condition, trigger and expiration choices.
Related Guides

Keep Building the Rule System

Set a Heikin Ashi candle color-change alert

Use the Heikin Ashi body direction while keeping regular candles on the chart.

Set and troubleshoot TradingView futures alerts

Check the alert log, data delay and device delivery.

Combine conditions in a TradingView alert

See when a crossover and a filter can qualify on the same bar.

Check the futures expiry before setting alerts

Compare continuous and dated futures charts.

FAQ

Common Questions

Does a wick above the EMA trigger an alert?

It can qualify while the bar is forming when the trigger permits intrabar events. With Once per bar close, the crossing must qualify when the candle closes.

Why is Once per bar close missing?

Check that the moving-average plot is selected on one side of the condition. Price compared with a fixed numerical Value uses the frequency options for a price alert.

Will the EMA alert fire again on every bar above the average?

A Crossing Up alert waits for a new transition through the average. The condition Greater Than instead checks whether the left side is above the right side whenever the trigger is evaluated.

Risk Disclosure

Futures trading contains substantial risk and is not suitable for every investor. TradeReign is a trading-discipline and rule-enforcement application. It does not provide trading advice, trade signals, investment recommendations, or performance guarantees.

TradeReign is not a broker-dealer, futures commission merchant, or investment advisor.

Futures trading contains substantial risk and is not for every investor. An investor could potentially lose all or more than the initial investment. Only risk capital - money that can be lost without jeopardizing financial security or lifestyle - should be used for trading. Past performance is not necessarily indicative of future results.