Logo
Help center

Run a backtest

A backtest simulates how an algorithm would have traded on historical bar data, bar by bar. It's used to gauge performance before going live.

Steps

  1. /dashboard/backtest
  2. Pick an active account. The engine uses that account's Spotware auth to pull bar history, so the account has to be active in the engine (bot toggle ON).
  3. Algorithm, symbol, timeframe, date range, starting balance → Run backtest.
  4. Takes ~5-30s (depending on bar count and container load). The result panel shows net P&L, win rate, max drawdown, equity curve and a trade-by-trade table.

Symbol IDs

Every broker uses different symbol IDs. The IDs in the dropdown cover the most common major pairs and usually match demo accounts. If the result shows "0 bars", try a different symbol ID; if it keeps failing you can search for the line in the log feed .

Known limitations

  • Backtesting is a plan capability — it must be enabled on your plan. If it isn't, the page shows an upgrade note and the Run button is disabled.
  • PnL math assumes the quote currency is the same as the deposit currency. EURUSD on a USD account is right; FX conversion for cross pairs is coming later.
  • Commissions and slippage aren't modeled.
  • Only bar-close events are replayed — no intra-bar ticks. Indicators with long lookbacks may miss the first few signals.
  • No pending order support — only strategies that work with market orders give accurate results. Investion mostly uses market orders.
  • Maximum response is 60s. Very long ranges time out; try a narrower date range.

How do I read the result?

The equity curve sums realized + floating P&L after every bar. Max drawdown is the peak-to-trough ratio — above 15% is usually unacceptable. Don't trust a strategy unless win rate is 50%+ and profit factor is 1.2+; with a small sample size (fewer than 50 trades) the stats can just be noise.