ForexEdge
Learn / What Is Backtesting in Trading?

What Is Backtesting in Trading?

Backtesting is the practice of running a trading strategy's rules over historical market data to see how those rules would have performed — every entry, every exit, every win and loss, replayed candle by candle. It is the closest thing trading has to a laboratory: before you risk a single dollar, you find out whether the idea in your head ever actually worked in the market you plan to trade.

How a backtest works

A backtest engine walks forward through historical candles one at a time. At each candle it asks: do the strategy's entry rules fire here? If a position is open, do the exit rules — stop loss, take profit, trailing stop, time limit — close it? The engine records each simulated trade and then summarizes the results: net profit, win rate and expectancy, profit factor, and maximum drawdown.

The critical rule of an honest backtest is simple to state and easy to violate: at every candle, the engine may only use information that existed at that candle. A backtest that peeks even one bar into the future — using a swing low that had not yet formed, an indicator value that would later repaint, a daily close before the day ended — produces beautiful, fictional results.

What backtesting can tell you

What backtesting cannot tell you

A backtest is evidence, not prophecy. Markets change; an edge measured over the past can fade. Backtests also cannot capture everything about live execution — real spreads vary by hour, fills slip in fast markets, and brokers differ. This is why serious workflows do not stop at the backtest: they verify the same strategy on a second independent engine, then run it on a demo account, and compare all three. If your backtest says 65%, your chart-platform tester says 51%, and your demo says 50%, the difference is not bad luck — it is information about where your simulation diverges from reality. (That three-stage comparison is exactly what ForexEdge's Strategy Journey page shows side by side.)

The classic backtesting traps

Related reading: why TradingView tester results differ from live fills, and how to backtest a forex strategy free, without writing code.

Test it instead of trusting it.

ForexEdge backtests forex strategies without code, verifies them trade-for-trade against TradingView, and tracks live results against the tested expectation.

Try ForexEdge free