Why Backtesting Matters
Backtesting is one of the most critical steps in strategy development. Before risking real capital, you need to validate that your strategy logic holds up against historical data. MZpack strategies operate on a tick-by-tick basis using NinjaTrader’s tick stream, which means meaningful backtests require tick-level data.
Two Paths to Backtesting
Depending on the data your strategy consumes, MZpack offers two distinct backtesting workflows:
Path 1: Strategy Analyzer + Tick Replay
This is the go-to approach for strategies built on footprints, delta analysis, volume profiles, and big trades. Tick Replay reconstructs historical trade and best Bid/Ask data, making it possible to run order flow strategies through NinjaTrader Strategy Analyzer.
Key steps:
- Enable Tick Replay globally (Tools – Options – Market Data – Show Tick Replay) and per data series
- Activate the Backtesting parameter in your strategy settings
- Start with short date ranges as Tick Replay is resource-intensive
- Match calculation mode to your data feed (BidAsk for futures, UpDownTick for forex/crypto/stocks)
Path 2: Market Replay (Playback)
If your strategy uses iceberg detection, DOM pressure/support analysis, or mzMarketDepth indicators, you will need full order book depth. NinjaTrader does not store this data historically, so use Market Replay (Playback) to record and replay live data sessions.
Pro Tip: Tape Reconstruction
For consistent big trade matching between historical and live environments, enable Reconstruct tape: timestamps only under Orderflow settings. This ensures trade boundaries depend only on timestamp and aggressor side, producing reliable results across backtesting and live trading.
Common Pitfalls
- Empty footprints or no trades? Check that Tick Replay is enabled and tick data is available
- Corrupted data files? Avoid cloud-syncing your NinjaTrader data folders. Use local storage for backtesting