Skip to main content
Public sample only: dummy key, synthetic link/instrument and an intentionally expired credential timestamp. It starts disabled and cannot connect as published. Obtain the fully populated private script from Liftx, and keep it disabled while production execution is unavailable. Never publish the real generated copy.
The One-shot example is intended for a deliberate demo validation after activation. It sends at most one OPEN and one termination, using one immutable lifecycle reference. Its default termination target is One strategy position.

Configure the real generated copy

  1. Create a valid setup with OPEN and terminate and an approved small demo quantity.
  2. Generate Pine (advanced) → One-shot · scheduled demo in Liftx.
  3. Set a future OPEN time and a TERMINATE time at least 60 seconds later, before key expiry.
  4. After activation, enable the indicator and create Any alert() function call before OPEN time. Keep alert expiration after TERMINATE time and within credential lifetime.
  5. Observe both events in the provider log, Liftx Activity and the actual position.
Realtime chart updates drive the schedule. If the first eligible OPEN update is at least 60 seconds late, the helper skips OPEN. Missing updates or delivery can prevent termination. It does not rearm or recover state after restart. The Data Window phase is local signal state: 0 idle, 1 waiting, 2 OPEN emitted, 3 termination emitted, 4 OPEN window missed. None of these values means accepted, filled, canceled or flat.

Complete source

Download the public Pine example.

Before adapting the sample

The generated private copy replaces the dummy token, link, catalog ID, source UUID, binding revision and liftxCredentialExpiresAt. Guided mode intentionally has an empty liftxOpenRequest; Liftx uses the saved opening configuration. Do not turn the public sample into a live sender by changing only its token. Retain one ordered producer per setup, preserve event identities on delivery retries and never reuse a lifecycle reference for a new position. Pine setup, canonical command fields and target semantics explain the contract. After any interruption, inspect Activity and actual positions, manage remaining orders/exposure and create a fresh source for a new alert. The example has no execution feedback, automatic delivery retry, automatic rearm or restart recovery.