TradingView

Indicator alerts vs strategy alerts: which should you automate?

When to use one alert per action from an indicator, and when one strategy alert can follow every entry, exit and reversal on MT5.

PipRoute team · 2 Dec 2026 · 3 min read

A laptop on a desk showing financial markets

TradingView can raise an alert from two kinds of scripts: an indicator or a strategy. Both can drive trades on MT5, but they work differently, and choosing the right one saves a lot of alerts and a lot of confusion.

Indicator alerts: one alert per action

An indicator draws signals on the chart. If it has alert conditions, you make one alert per action: one for buy, one for sell, maybe others for closing. Each alert carries its own message.

4F9A2C7B1D0E,buy,{{ticker}},vol_lots=0.10,sl_pips=20,tp_pips=40
4F9A2C7B1D0E,sell,{{ticker}},vol_lots=0.10,sl_pips=20,tp_pips=40
  • Good for simple systems: a signal to enter, stops and targets to exit.
  • Watch out: the buy alert does not know a sell trade is open. If you want each signal to reverse the position, use closeshortopenlong and closelongopenshort instead of plain buy and sell.
  • Use Once per bar close, so a signal that appears mid-candle and then disappears never trades.

Strategy alerts: one alert follows everything

A strategy script places simulated orders on the chart: entries, exits, reversals, partial closes. An alert created from a strategy fires on each of those orders. In the Alert builder choose A strategy, and the message carries TradingView's strategy placeholders:

4F9A2C7B1D0E,auto,{{ticker}},action={{strategy.order.action}},position={{strategy.market_position}},contracts={{strategy.order.contracts}},size={{strategy.position_size}},vol_lots=0.10

When the alert fires, TradingView fills in whether the order was a buy or a sell and what the position is afterwards. PipRoute mirrors it on MT5:

  • Position flat after the order: close everything on the symbol.
  • Long after a buy: close any sells and open a buy (an entry or a reversal).
  • Short after a sell: close any buys and open a sell.
  • Long after a sell: the strategy reduced its long, so the same share of the MT5 position is closed.
The Alert builder in strategy mode
Choose A strategy in the Alert builder and one alert follows the whole strategy.
  • Good for systems with several kinds of exits, scaling out and reversals.
  • Watch out: strategy placeholders only exist on alerts created from a strategy. On an indicator alert they arrive empty, and PipRoute refuses the message with a clear reason instead of guessing.

Which size is used?

Your MT5 size comes from the PipRoute part of the message (vol_lots, or a risk percent with a stop loss), not from the strategy's contract count. The strategy's numbers are used only to work out what share of a position to close on a partial exit. That keeps sizes sensible when the strategy was tested on a different account size.

Which should you pick?

If your script is an indicator, use indicator alerts. If it is a strategy, use one strategy alert: it is fewer alerts to manage, and it keeps MT5 in step with exactly what the strategy did. Either way, test on demo and read Activity after the first few signals.

Try it on a demo accountConnect MT5, send a test trade and watch your first alert become a trade.Start free