alert() or through its broker-emulator order-fill alerts. Select one event family for each trading intent. A strategy backtest, simulated fill or strategy.position_size does not confirm an exchange-side Liftx position.
Preferred approach: explicit signal commands
Reuse the generated canonicalliftxMessage envelope and lifecycle handling in your signal logic. Send an explicit open, modify or terminate intent at the decision point. The outer action has Liftx meaning; it is not inferred from emulator direction.
For an alert driven by alert(), choose the strategy’s alert() function calls only event option. A strategy must contain the corresponding calls. Keep its calculation frequency and realtime behavior consistent with your chosen event identities. Do not also enable order-fill commands for the same entry or exit.
The complete continuous indicator example demonstrates the canonical message and bounded lifecycle state. A strategy integration must deliberately adapt those semantics to its own order lifecycle instead of copying only the alert() line.
Alternative: order-fill messages
TradingView permits a dynamicalert_message on order-generating strategy calls. To use it:
- Build a complete Liftx
tokenpluscommandenvelope for each relevant event. - Set that full JSON as the order call’s
alert_message. - Create the TradingView strategy alert for order fills only.
- Set the entire Message field to:
- Configure Notifications → Webhook URL with the Liftx hooks URL.
- Validate every order path, including exits, cancellations, replacements and orders left pending for several bars.
strategy.cancel() does not by itself send a Liftx cancellation or cancel any pending Liftx order. Emit a deliberate Liftx termination intent, or use a supported current-state API modification when the intended change is narrower.
Every order capable of producing an enabled alert must supply the correct message. Missing alert_message can yield an empty message. Placeholders inside the generated envelope do not provide recursive evaluation; build dynamic fields in Pine.
Why generic strategy JSON is insufficient
Consequently, a template containing only
action: "{{strategy.order.action}}", instrument: "{{ticker}}" and amount: "{{strategy.order.contracts}}" is not a Liftx command. It lacks an authenticated canonical market, intent identity, deadline, lifecycle and full opening/protection configuration.