EnginePine Script

Strategy orders

Understand how Pine intents become STX requests and where the bridge is simplified.

Native strategy calls emit order intents that STX applies through session execution methods. Pine does not own the broker account or independently confirm fills.

Supported intent paths

The bridge handles intents from entry/order, close/exit, close-all, cancel, and cancel-all operations. It applies only intents whose source time matches the active Pine bar and deduplicates intent keys in session memory.

The deduplication key is recorded before dispatch. It is not a retry guarantee when a request is rejected or fails, and it is not durable broker-wide idempotency.

Placement mapping

For entry/order intents, the adapter creates an STX order with the configured instrument. Quantity falls back from the intent quantity to app shares and then one. Limit price takes precedence when selecting LIMIT; otherwise a stop price selects STOP, otherwise MARKET.

This mapping does not establish full stop-limit parity when both prices are present. Use order types and validate the exact adapter behavior you need.

Close and exit mapping

The current adapter maps both close and exit intents to closePositions for the matching instrument position. It does not reproduce every Pine partial-exit, bracket, or stop/limit exit behavior from the source declaration.

Close-all and cancellation use their corresponding session methods. Resulting source labels/options vary by branch; do not assume every bridge operation carries the same execution metadata.

Broker state remains authoritative

STX supplies updated session/broker state to Pine evaluation and handles requests through its normal execution paths. An emitted intent or plotted arrow is not a confirmed fill. Inspect orders, positions, and trade records.

Warmup and runner skip controls can suppress broker actions while allowing Pine calculations/output to continue. Calling skipall in SJS can affect later native execution behavior.

Choose one order owner

Use indicator-plus-SJS or a verified native strategy-intent workflow for a particular action. If both react to the same event, define coordination explicitly to avoid duplicate entries or competing exits.

Continue with warmup and history.

On this page