Skip to main content
ATK Pine Script®

Strategy Intent Helpers

Intent helper surface — strategy.entry/order/exit/close/cancel vs canonical trade-frame field execution path.

Intent Helpers Are Supported, But Trade-Frame Fields Stay Canonical#

What the helpers are for#

strategy.entry/order/exit/close/cancel* build explicit payload dictionaries and are part of the supported runtime surface. They are useful for templates, diagnostics, metadata-rich examples, and future-facing authoring consistency.

What still drives execution#

The current ATK execution pipeline still expects real strategy intent to be emitted through canonical trade-frame fields in build_signal_frame(...), then normalized by build_trade_frame(...). Do not replace that flow with helper payloads in production examples.

# Supported helper payload.
entry_template = strategy.entry("L", "BUY", when=True, limit=100.0)


# Canonical ATK execution path.
frame["entry_side"] = "BUY"
frame["entry_price"] = frame["open"]
frame["quantity"] = 1.0
frame["size_pct"] = 0.0