Same rules, three engines: how we got three backtests to agree trade by trade
Run one trading rule in two backtesters and you will usually get two answers. Not wildly different, just different enough that you can't tell which one to trust. We had to sort this out for one simple rule, and in the end three engines agreed on it trade by trade: TradingView's Strategy Tester, a backtester of about 60 lines written for the check, and the no-code tool we build. This post is the…
Three different backtesting engines were used to verify a simple trading rule. All three engines—TradingView's Strategy Tester, a custom backtester, and a no-code tool called Trend0x—agreed on every trade. The rule examined uses daily candles, long only, with one position at a time. Entry is when the close is above the 200-period EMA and the MACD line crosses above its signal line.
Exit occurs when the MACD line crosses below its signal or a stop is hit. The stop is set at 2.5 times the Average True Range (ATR) below the entry price. Costs are 0.06% commission per side plus slippage, which varies between engines. Both the custom backtester and Trend0x use the ATR from the signal bar's close, while TradingView uses the ATR from the next open bar, leading to slight differences. Costs are applied per side, and the same rules were applied to the same data source.
Rewritten by urgent.news; may contain errors — check the original.
Source: dev.to