How to backfeed a data gap ?
Posted: Wed May 26, 2004 12:29 am
Have the following question:
In real execution or papertrading, let's assume that you unplugged by accident your network cable; this leads to a gap in your datafeed. Basically you have to restart your system and during the initialization, while getting the new real-time data, you need to fill the gap in your past data... or you won't be able to properly calculate indicators based on history: for example if you are using a 1 hour moving average and missed 10 minutes of data, you either fill the 10 minute gap and restart trading soon after or wait more than 1 hour so that the gap in your moving average disappears (which is not a pratical solution because your position can very well collapse during that 1 hour !)
Hence the question is:
How do you implement in the code the backfeeding process ? You will have to catch the new real-time data while doing the backfeeding and I can't get a clear idea of how things should be done at the code level.
Can anyone help ?
Thank you very much in advance for your help
Karl
In real execution or papertrading, let's assume that you unplugged by accident your network cable; this leads to a gap in your datafeed. Basically you have to restart your system and during the initialization, while getting the new real-time data, you need to fill the gap in your past data... or you won't be able to properly calculate indicators based on history: for example if you are using a 1 hour moving average and missed 10 minutes of data, you either fill the 10 minute gap and restart trading soon after or wait more than 1 hour so that the gap in your moving average disappears (which is not a pratical solution because your position can very well collapse during that 1 hour !)
Hence the question is:
How do you implement in the code the backfeeding process ? You will have to catch the new real-time data while doing the backfeeding and I can't get a clear idea of how things should be done at the code level.
Can anyone help ?
Thank you very much in advance for your help
Karl