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.

Loading WASM engine…
Symbol
Interval
Loading WASM indicator engine…
Run a strategy to see the equity curve
Strategy presets (click to load)
Strategy formulaCtrl+Enter to run
Simulation parameters
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 Net Flow Trend strategy on real crypto candles

Net Flow Trend is an order-flow strategy: it only takes a trend when volume agrees with price. The core line, FLOW, is a windowed On-Balance Volume — each bar contributes +V when it closes up and −V when it closes down, summed over 20 bars and normalized by average volume. FLOW above +0.5 means the last 20 bars carry the buying pressure of half an average bar's volume or more; below −0.5, net distribution.

The entry is a 50-bar moving-average break confirmed by FLOW > 0.5: price crossing up through MA50 while accumulation, not just price, says the trend is real. The exit mirrors it — the MA50 cross down or FLOW collapsing below −0.5. The backtester simulates it with fees and slippage on real candles, entirely in your browser.

How it works

  1. Pick a trading pair, interval and number of bars.
  2. The strategy ENTRY/EXIT formulas load into the editor, fully editable.
  3. Set fees, slippage and optional stop-loss / take-profit.
  4. Run the simulation and inspect the equity curve, Sharpe/Sortino, drawdown and trade list.

Frequently asked questions

What is net signed volume, and how does it differ from OBV?

OBV accumulates a running total of signed volume since the beginning of the chart, which makes its absolute level meaningless across coins. Net Flow sums the same signed volume over a rolling 20-bar window and divides by average volume, producing a comparable, bounded number: how much net buying pressure the last month of bars carries.

Why confirm an MA50 cross with volume flow at all?

A price cross needs only a thin market pushing a few trades through a level; net signed volume needs a majority of traded volume to have bought. Requiring both filters out low-participation crosses — the ones most likely to be manipulation or noise — which is precisely where a buyer needs exit liquidity later.

More strategy backtester pages

MA Cross 5/20 · MACD Cross · RSI 30/70 · Bollinger Breakout · KDJ Cross · Donchian 20/10 · Capitulation Reversal · Trend Ignition

Related tools

MA Cross 5/20 in the Strategy Backtester · Trend Ignition in the Strategy Backtester