Flow. Pick a symbol and a date range (max ~1 year). The engine fetches 5-minute SIP bars (split-adjusted,
extended hours — same data shape as your TradingView chart), warms indicators on ~25 prior days, and replays the
strategy with the
same code that trades live. Fills follow the Pine's model: signals on bar close, brackets
fill intrabar, 1-tick slippage, $0.005/share commission.
Fill engine: "OHLC path" matches TV's 4-tick heuristic (use for parity against TV exports); "Tick replay"
matches orders against the real recorded tape — stop-vs-target ordering, timing and prices come from actual prints,
with a 250ms latency model and limit fills on touch. It is MORE accurate than TV, so expect legitimate differences
from TV exports; judge live-readiness on it. Slower (downloads tape where orders were live).
Fill model controls the $-profit-take:
Realistic intrabar exits at the first touch of the threshold
price (what live execution achieves — judge live-readiness on this one);
Bar close checks it once per bar like
the literal Pine;
TV-optimistic fills at the bar's best price to approximate TV's on-order-fill emulator —
use it ONLY to compare against a TV export made with "Script execution: On bar close, On order fill".
Overrides use the same JSON schema as alerts — chips below the field show
default →
override.
The date range maps to the Pine's "Date range" test window, so indicators still see prior history.
Verify against TradingView: run the same symbol / window / settings in the TV Strategy Tester, export its
List of Trades, then on the server run
npm run backtest -- --symbol AAPL --from 2026-01-02 --to 2026-06-30 --out res/aapl
npm run parity -- --engine res/aapl.trades.csv --tv tv-export.csv
A clean parity report is the proof the engine reproduces your Pine before you trade it live.
Examples:
{"signalPreset": "Strict"}
{"usePyramiding": true, "maxAddsCap": 4, "useDailyTradeLimit": false}