Noon Barbari
Sign up
Browse docs

Backtesting

Run a strategy over historical bars. No orders are placed — it's a simulator on top of saved data.

Fill model

Entries and exits are decided on bar close. The fill happens at the next bar's open price. Intra-bar take-profit and stop-loss levels can fill inside the same bar they were armed on — TP fills if the bar's high reaches the target, SL fills if the bar's low touches the stop, with TP winning ties (configurable). Slippage and a linear price-impact model are layered on top.

Data sources

By default backtests use live CCXT-fetched candles from the venue you specify (cached locally). Synthetic series — random walks, regime-switched GBM, and replays of historical regimes — are available for stress testing strategy logic without real data noise.

The PDF reports

Every backtest produces two PDFs you can download from /backtest. The Stats PDF — equity curve with drawdown shading, headline metrics (PnL, Sharpe, Sortino, max drawdown, win rate, profit factor), per-symbol PnL, and the run's backtest configuration + strategy parameters. The Trade-Chart PDF — one candlestick page per closed round-trip with TP/SL bands, plus a strategy-configuration page (right after the cover) that lists every indicator, every entry/exit rule in plain English, risk guards, ladders, and account circuit breakers — so you can audit exactly what produced the trades on the following pages without flipping back to the editor.

Walk-through: RSI mean reversion

A minimal example you can paste into the Text editor:

name: rsi_30_70
symbol: BTC/USDT
timeframe: 1h
rules:
  entry:
    long:
      leaf: { lhs: { indicator: rsi, period: 14 }, op: lt, rhs: { value: 30 } }
    short:
      leaf: { lhs: { indicator: rsi, period: 14 }, op: gt, rhs: { value: 70 } }
  exit:
    long:
      leaf: { lhs: { indicator: rsi, period: 14 }, op: gt, rhs: { value: 50 } }
    short:
      leaf: { lhs: { indicator: rsi, period: 14 }, op: lt, rhs: { value: 50 } }

Save, click Backtest, pick BTC/USDT · 1h · 90 days. You'll get a PDF. Hit rate around 60 % on a 90-day window is typical for this on hourly BTC — and almost guaranteed to be curve-fit. Take it to walk-forward before you trust it.