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 Continuous example can reuse one setup/key across successive positions. The default target is This strategy’s positions. Its local state records signal emission only; it does not observe whether a position exists or is flat.

Configure the real generated copy

  1. Create a Guided setup with OPEN and terminate. Select One position at a time for sequential lifecycles, or deliberately choose multiple positions for concurrent entries.
  2. Generate Pine (advanced) → Continuous · confirmed-bar threshold signals in Liftx. Advanced setups instead embed the complete imported request.
  3. Use standard time-based candles of at least one minute.
  4. Set a future Start time, an OPEN when close crosses above threshold and a lower positive TERMINATE when close crosses below threshold.
  5. After activation, enable the indicator and create Any alert() function call before Start time, with the Liftx webhook URL and an appropriate expiration.
The helper runs only on confirmed realtime bars, rejects a bar outside its 60-second window, and gives termination priority if customized conditions coincide. It derives a fresh lifecycle reference from the source and bar-close time for each entry. Group termination can run even without a locally observed OPEN; an empty group still fences older unseen entries. With multiple-position policy and a group exit, distinct entries may coexist. With an exact-position exit, the helper retains one local reference until it emits termination. This is not exposure feedback: lost delivery or rejected entry can require direct investigation of earlier positions. The threshold logic is illustrative, not a recommended trading strategy. Changing a condition does not change the saved order or protection prices.

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.