Skip to main content
The opening policy and termination target answer different questions. Opening policy controls whether a new position may coexist with earlier work. A termination target selects which existing work an exit may affect. Neither turns Pine’s local state into execution evidence.

Three explicit termination targets

OPEN and MODIFY always address position. Group targeting is termination-only. Omitting a position reference never silently means all positions. Ordinary EXIT offers strategy or market; an exact prior lifecycle reference requires Pine or an external controller. Market means the exact linked account plus canonical instrument, not every BTC symbol, all venues, all subaccounts or the entire portfolio. It selects Liftx-managed positions, not arbitrary exchange positions outside Liftx ownership.

New lifecycle, same running strategy

For canonical Pine commands, use these identities consistently: A cycle can be:
The key remains the same. Cycle B uses a new reference and start time. No Liftx position UUID is required in the Pine signal; position_id is not accepted as a TradingView target. Do not reuse a lifecycle reference to reopen a position. Termination fences that reference against further trading signals, including while termination is still pending. A delayed message for cycle A cannot select cycle B by sharing a market name.

Group termination captures a finite set

Group admission saves the original intent and its selected targets together. Each child follows the normal position-termination path and has its own receipt.
  • At most 64 targets are captured in one group.
  • A group exceeding this bound or available queue capacity fails as a whole; it is not silently truncated.
  • An identical retry refers to the same captured set, not a newly expanded list.
  • Zero matching targets is a valid accepted result and can still advance the source’s ordering fence.
  • Positions opened after capture are outside the group. The command is not a permanent market pause.
  • Child outcomes can differ; inspect View targets in Activity. Group admission is not atomic exchange execution.
A strategy group selects eligible own references earlier than its sequence. A market group must be newer than its own source’s watermark; independent strategies have independent sequence spaces, so their sequence numbers are not compared as one global clock.

Late OPEN protection

Each source maintains a durable fence for unseen OPEN messages. Admitted OPEN and termination signals advance it, including a termination group with no targets. An unseen older OPEN cannot arrive later and reopen work behind that fence. An exact close for a known older position can still follow a newer position’s open, subject to that lifecycle’s own ordering. This allows multiple-position strategies to close one older cycle without pretending all cycles share a position reference. Ordering is not a request to replay missed commands. Sequence gaps do not cause Liftx to synthesize trades.

Single and multiple opening policies

One position at a time checks known active canonical positions, resident candidates and pending or uncertain work owned by this setup. If evidence is incomplete, admission fails rather than assuming it is safe. The check is not an exchange-wide guarantee against another strategy, a later fill or later reactivation. Multiple concurrent positions permits distinct lifecycles. The quantity cap applies independently to each, so ten positions each below the cap can have ten times one position’s quantity. An external risk controller is needed for a portfolio-wide budget. An emitted EXIT does not clear either policy. A subsequent OPEN can still be rejected until the earlier lifecycle is complete. Pine has no callback that proves readiness and does not automatically queue a rejected entry.

Ownership scenarios

A new exit-only setup owns no positions initially. Selecting strategy will not discover positions opened by another key’s independent setup. Credential rotation within the same integration retains the namespace; a new integration does not inherit it.

Cancel versus close

Canonical TradingView commands accept terminate, and normalize cancel and close to the same termination operation. Ordinary JSON uses terminate only. Termination cancels pending work and closes remaining exposure. A pending position may need only cancellation; a partially filled position may also need closure. cancel does not promise to keep existing exposure. For a targeted OPEN-row amendment without terminating the position, use the direct API modification contract with current state.