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 review its inputs before enabling it. Never publish the real generated copy.
The Exit-only example never opens positions. It emits a strategy or explicitly authorized market termination when the confirmed close crosses below a configured threshold.

Configure the real generated copy

  1. Open a new TradingView connection in Liftx and choose the intended exchange link.
  2. Choose Advanced with terminate permission only. No imported opening request or quantity cap is required. Optionally restrict instruments: the example uses the first allowed ID, or BTC-USDT-SWAP when unrestricted. An optional cap never grants OPEN permission.
  3. Decide which positions the new setup can actually manage. A fresh namespace has no own positions; This strategy’s positions may therefore match none. To select manual or other strategy positions, explicitly grant market termination, then choose All positions in this market in the generated indicator’s TradingView inputs.
  4. Select Pine (advanced) in the setup guide and copy the Exit-only script.
  5. Use standard time-based candles of at least one minute. Set a future Start time and a positive TERMINATE when close crosses below threshold.
  6. Enable it and create Any alert() function call before Start time, using the Liftx webhook URL.
The example does not infer an exact position from chart state. Every group freezes the captured membership, up to 64 targets. It is not a permanent market pause and does not cover positions opened after capture. Review child receipts and remaining exposure.

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. This Exit-only script has no opening payload. Do not turn the public sample into a live sender by changing only its token. Retain one coordinated producer per setup and instrument, 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 Events 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.