- import 4years tick data and build minute bars from them. (-> as a result, you have a valid M1 bars, that are in sync with tick data)
- Reload all minute bars from chart
- Tick data and minute bars are often desynchronized.
(After reload of all historical data, minute bars are reloaded with new bars from some data-feed.. Source of the data is different and some minute bars are a little bit different. Tick data and minute bars are no more in sync = different OHLC prices on many candles.
This causes many hidden problem when algo-strategy uses both dataseries - tick bars and also minute bars. It is really pain to debug things in such a desynchronized environment.)
Principle driving the solution:
When importing tick data - if the user wanted to build the minute/daily bars from them,
he never wants to throw them away when reloading historical data.
If user generated minute/daily bars from tick-data, he wants them to have in sync.
That's why, he generated them from tick.
Solution proposal:
- You should mark the minute / daily bars, which were built from tick-data. It just one bool value, that is very meaningful and important.
- When user requests to Reload all historical data from chart, then all minute/daily bars marked as TRUE (= built from tick data) should remain untouched.
- In Options this could be overriden for occasional case, when replacing generated bars would be intention of the user. We could have 1 checkbox named "Generated barscan be replaced by Reloading historical data". This checkbox has to be unchecked by default.
Best regards
Misova
Comment