I created a simple strategy which should return the same results on historical backtest and market replay as well.
The strategy runs on a 5 min Timeframe and uses crossover signals of a fast and a slow EMA (Close; Periods 8 & 24). It works stop and reserve because no other exit rules were defined. There is just a timefilter limiting the trading hours.
I used identical tickdata for both, the market replay and the historical backtest and ran it with calculating just on Bar Close.
While I was running the strategy in replay mode I checked the signals on a chart and I was really surprised that the executions of the signals was far from beeing acceptable! They were lagging behind seriously. If you take a look at attachement "Replay Chart" you can see that the first execution takes place 4 bars after the signal is generated. The EnterShort - Execution at 11:50 also is 1 bar late. Such Delays would make the Replay tool pretty useless for testing strategies "realtime" - simulated. Also I set "Exit on Close" to "TRUE" (settings attached) -> but the strategy still held a position after 22:00. My timefilter is set to allow entering Trades only between 08:30 - 13:30 and 13:45 - 21:30 -> could this affect the ExitonClose-feature?
The same strategy backtested in the strategy analyzer is working perfectly like expected (look at "Historical Chart").
Question 1:
Is there a bug in the Market Replay Tool? I'm on NT 6.5.0.9. Do you have any experience with similar problems?
Question 2:
Am I principally right, that this strategy setup should return the same trades on market replay and historical backtest? (let aside differences due to different filling prices)
Question 3:
How far away is the market replay tool from an live trading environment (besides how filling prices are generated)? Can I expect rather same results?
Thx
Comment