đŸē
/Documentation

Running

Backtesting

Last updated March 1, 2026

The Backtest tab lets you simulate your compiled strategy against historical Binance kline data before running it live. It fetches data directly from Binance's public API in your browser.

Setup

FieldDescription
SymbolThe symbol to test. Defaults to the first symbol on the project.
From / To DateDate range for the simulation. The engine fetches 200 extra warm-up bars before the from-date to initialize indicators properly.
Starting CapitalUSD amount of simulated capital. Default: $1,000.
TimeframeThe primary candle interval for the simulation. Common choices: 1h, 4h, 1d.
âš ī¸
Compile first. The backtest uses the compiled strategy code, not the current workspace. If you've made changes to the editor, compile before running the backtest.

How It Runs

  1. Historical klines are fetched from Binance for the selected symbol and timeframe.
  2. Any additional timeframes used in the strategy are also fetched.
  3. The strategy runs bar-by-bar using the same compiled JS and indicator functions as the live runner.
  4. The first 200 bars are a warm-up period (indicators need data to initialize); no trades happen during warm-up.
  5. After warm-up, each bar is evaluated and trades are simulated using the mark price = that bar's close.
â„šī¸
Warm-up: Indicators like EMA 200 need 200 bars of history to compute correctly. The warm-up period ensures your strategy starts with valid indicator values.

Reading the Results

MetricWhat it means
Total Return %Percentage gain/loss vs starting capital over the full test period.
Total TradesNumber of completed round-trips (buy+sell pairs).
Win RatePercentage of sell trades with positive realized PnL.
Max Drawdown %Largest peak-to-trough equity decline during the test. Lower is better.
Sharpe RatioRisk-adjusted return. Above 1.0 is generally acceptable; above 2.0 is strong.
Bars SimulatedTotal bars processed (including warm-up).
Warm-up BarsBars before the from-date used to prime indicators.
💡
Tip: A Sharpe Ratio below 0.5 and a win rate below 40% usually indicate a strategy that needs more work. Focus on max drawdown, strategies that preserve capital during losing streaks tend to survive long enough to compound gains.

Exporting Data

You can export the full results, equity curve and trade log, as a CSV for analysis in external tools like Excel, Python, or any charting application.