Strategy Backtester
Backtest signal strategies over real exchange candles — the same WASM indicator engine computes your ENTRY/EXIT lines, and the simulator fills at the next bar's open with fees, slippage and optional protective stops.
How fills are simulated
ENTRY / EXIT are 0/1 output lines of the same array DSL the Indicator Lab uses — the WASM engine computes them over the loaded candles; any other output lines are drawn on the chart.
Beyond H L O C V, formulas can reference data series by name — DATE TIME MKTCAP TVOL — auto-loaded and aligned to the bars (CoinGecko series are daily, forward-filled on intraday charts).
A signal known at bar close fills at the next bar's open (no lookahead bias), worsened by slippage; fees apply per side.
Stop-loss / take-profit trigger intrabar against the bar's low/high — gaps fill at the open, and when both are touchable in one bar the stop is assumed first.
Long-only, all-in per trade; an open position at the end of the data is closed at the last close. Sharpe/Sortino are annualized from per-bar equity returns.
Backtest the Bollinger Breakout strategy on real crypto candles
The Bollinger Breakout strategy treats the upper band as a volatility trigger: it goes long when the close crosses above the 20-bar mid band plus two standard deviations, and exits when price falls back through the mid band. Breakouts from a squeeze often resolve into extended moves, which is exactly what this rule tries to capture while the bands do the risk framing.
This page loads the rule with all three bands drawn on the price chart. The backtester fills at the next bar's open, applies configurable fees, slippage and optional stop-loss/take-profit, and reports the equity curve, Sharpe/Sortino, max drawdown and every trade — all locally in your browser.
How it works
- Pick a trading pair, interval and number of bars.
- The strategy ENTRY/EXIT formulas load into the editor, fully editable.
- Set fees, slippage and optional stop-loss / take-profit.
- Run the simulation and inspect the equity curve, Sharpe/Sortino, drawdown and trade list.
Frequently asked questions
What are the entry and exit rules of the Bollinger breakout backtest?
ENTRY fires when the close crosses above UPPER = MA(C,20) + 2×STD(C,20); EXIT fires when the close crosses back below the MID = MA(C,20) baseline. Both signals are confirmed at bar close and filled at the next bar's open.
Why exit at the mid band instead of the lower band?
Exiting at the mid band banks the move while momentum is still above average; waiting for the lower band gives back the entire round trip on failed breakouts. You can test the alternative yourself — change EXIT to CROSS(LOWER,C) in the editor and rerun.
More strategy backtester pages
MA Cross 5/20 · MACD Cross · RSI 30/70 · KDJ Cross · Donchian 20/10