Skip to main content
ATK Pine Script®

Trade Frame Fields

Canonical trade-frame field design — entry_side, entry_price, quantity, sl, tp, trail_offset and when to use each.

Design Canonical Trade-Frame Fields Deliberately#

FieldUse it whenDesign advice
entry_sideThe row truly wants an entry.Keep it sparse and explicit. Empty string is better than implied direction.
entry_priceYou know the intended entry basis.Match it to actual strategy timing: open, close, trigger, or limit series.
quantityUnits are known directly.Do not also express the same intent through size_pct unless the runtime expects one to stay neutral.
sl and tpThe strategy has bracket-style risk exits.Think of them as part of the signal decision, not a mapping convenience.
trail_offsetThe strategy genuinely trails.Only emit it when trailing is real, not because the field exists in the schema.