Is strategy.position_avg_price an alert placeholder?
No documented placeholder has that name. Adding double braces around a Pine variable does not make it a supported alert field. The variable strategy.position_avg_price contains the simulated position's average entry price and is na when there is no open position. Use {{strategy.order.price}} when you need the price of the order that triggered a fill alert; use Pine code when you need the position average.
| Value needed | Use | Meaning |
|---|---|---|
| Executed order price | {{strategy.order.price}} | Price of this broker-emulator fill. |
| Position average | strategy.position_avg_price in Pine | Average entry price of the open simulated position; handle na explicitly. |
| Live account average | Broker or execution-service data | TradingView strategy state does not verify the receiving account's actual fills. |