ohlc-bar-matching-engine

Zero-dependency JavaScript (~100 LOC) intrabar matching engine for historical OHLC candlestick replay, limit/stop orders, gap fills, TP/SL, and isolated/cross liquidation.

Deterministic Intrabar Path & Gap Execution

Processes opening gaps (prevClose → open) at the opening price without skipping multiple crossed orders, then walks open → low → high → close on bullish bars and open → high → low → close on bearish bars.

import { createAccount, fill, processBar } from 'ohlc-bar-matching-engine';

Related Live Simulators & Analytics

MIT License · Maintained by HoldWins