EnginePine Script

Debugging Pine

Locate compilation, initialization, plotting, signal-timing, and order-bridge problems.

Work from source and data toward execution. Keep the saved revision, interval, input window, and first unexpected bar with your report.

The script does not run

Confirm that native source is in pinescript, then inspect compile/runtime diagnostics. Check explicit unsupported constructs, including Pine imports and cross-symbol or multi-timeframe requests.

Syntax highlighting is not runtime validation. Reduce a failing script to its calculation and one plot before adding more features.

The chart is empty

Check that data reached the native runner and that the input window initializes the calculation. Confirm exact plot titles and display settings. A display.none plot is intentionally absent from visible chart series while remaining useful as raw output.

For live startup, distinguish missing calculations from missing client plot updates after warmup or reconnect.

SJS does not see a signal

Check whether the reader uses raw plot time/value or chart-series point fields. Validate exact names, timestamps, direction values, and freshness rules.

SJS precedes native Pine in the shared frame. A signal calculated later in the frame cannot cause an earlier SJS invocation to rerun automatically. The signal observer makes delayed consumption explicit.

A signal repeats or appears stale

Inspect whether the source emits a continuous direction or a one-bar event. A sparse arrow's last point can remain after its trigger. Define deduplication and expiration independently; a consumed event does not become new just because it remains the last nonzero value.

Use confirmed-bar rules when that is the intended strategy, and account for the plot timestamp's opening-boundary convention.

Pine emitted an intent but no trade appeared

Check current source time, intent deduplication, warmup/skip controls, bridge mapping, execution checks, and pending orders. An intent marked applied before dispatch is not automatically retried after rejection.

For strategy exits, remember that the current STX bridge maps close/exit to closing the matching position rather than full Pine bracket semantics.

Historical and live output differ

Compare initial history, aggregation, confirmation, update cadence, and state lifecycle. Use the smallest reproducible script and window. Read market-data debugging and execution debugging for surrounding runtime issues.

On this page