I try to backtest a spread strategy with global variables with very typical setup - chart1 is master with algo in it and chart2 is slave which simply takes opposite position vs chart1. When using playback i turn on global mode. All data is 1 minute and when i start to speed up playback I notice slippage in trades. Basically i get the following results:
up to 100 updates every second - no slippage
above 1000 updates every second - massive slippage and no sync with two charts sharing global variables,
at max playback speed (10000) - slave is not putting any trades at all
What is a solution here? Is playback suitable for backtesting global variables?
Global variables - slippage with playback
- TJ
- Posts: 7742
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
Re: Global variables - slippage with playback
I::
Is playback suitable for backtesting global variables?
No playback is NOT suitable for all types of backtesting.
One reason: playback is not a tick-by-tick replay of the data.