← All articles
Setup Guides

TradingView Strategy Placeholders Explained

The double-brace variables that make one alert run an entire strategy: what each placeholder carries, which ones matter for automation, and the pitfalls that break dynamic alerts.

July 15, 2026 · 6 min read · TradeHookX Team

What placeholders are

A placeholder is a double-brace variable in your alert message that TradingView replaces with a live value at fire time. Write a static message and you need one alert per direction per symbol; write placeholders and one alert covers everything, because the message content is decided by the strategy at the moment it fires.

For webhook automation, this is the difference between maintaining twenty alerts and maintaining one.

The placeholders that matter for trading

Assembled into a message, they produce a fully self-describing signal:

  • The strategy order action placeholder - resolves to buy or sell based on your Pine strategy order; this becomes your action field and is the heart of dynamic automation
  • The ticker placeholder - the chart symbol, letting the same alert message work on any chart
  • The strategy order contracts placeholder - the position size your Pine strategy computed, passed straight through when size control lives in the script
  • The close placeholder - current price, useful in comments or for fixed-price fields
  • Strategy position size - the current position after the order, useful for advanced exit logic
{ "licenseKey": "TB-XXXX", "action": "{{strategy.order.action}}", "symbol": "{{ticker}}", "size": "{{strategy.order.contracts}}", "size_type": "units" }

The pitfalls

Placeholders only resolve for the alert type that owns them: strategy placeholders require an alert created on a strategy (order fills), not on an indicator - on an indicator alert they pass through as literal text and the signal fails validation. The ticker placeholder carries the exchange symbol exactly, so a broker that names it differently still needs symbol mapping - placeholders do not translate, they transcribe.

And quote placement matters: numeric placeholders inside quotes arrive as strings, which robust parsers handle, but keep the structure the Alert Builder generates and the question never arises. When a dynamic alert misbehaves, fire it once and read the raw message in your signal feed - seeing what TradingView actually sent resolves ninety percent of placeholder mysteries.

Static or dynamic: choosing deliberately

Dynamic placeholders suit strategies where Pine owns the logic - entries, exits, and sizing all flow from the script through a single alert. Static messages suit alert-based setups where the bridge owns trade management: a fixed buy with multi-TP, breakeven, and trailing configured in the message. Mixing them works too - dynamic direction with static risk management is a common professional pattern - as long as exactly one side owns each decision.

Ready to automate your strategy?

7-day free trial on every plan. No credit card required.

Start free trial