HI!
Am developing software to obtain histories of futures, interval '1' (minute) and 'D' (daily).
Im principle, I start with 'RequestHistory', collect data in 'OnBarsChanged', and poll with 'IsHistoryReady' to finish with 'Release History'.
For the minute interval, everything works fine. If there are no entries for a specific contract, or even if the symbol is not written correctly, then 'IsHistoryReady' is immedeatly true.
However, for daily data, requests of the history of some contracts are never reported to be ready. This is the case if the symbol does not exist, or if no data is available. This is true for example for BR N2005, C N2005 or S N2005, with RequestHistory Parameters 'D',btDays,10,-1,-1.
There is only one way to fire an event:
With the request sent and waiting for an event to fire (OnBarsChanged, OnBarsReceived), I load the history manually with the eSignal-Application. Then the OnBarsReceived event is fired and IsHistoryReady switches to true in my own application.
So I suppose, I miss something when requesting the history.
Or at least I have to release the history before isHistoryReady switches to true, e.g. after timeout-limit.
So my questions are:
Is it save to use 'ReleaseHistory' before isHistoryReady is true, or is somthing wrong with my way to obtain a history on daily time base?
Thanks for any help,
Martin
Am developing software to obtain histories of futures, interval '1' (minute) and 'D' (daily).
Im principle, I start with 'RequestHistory', collect data in 'OnBarsChanged', and poll with 'IsHistoryReady' to finish with 'Release History'.
For the minute interval, everything works fine. If there are no entries for a specific contract, or even if the symbol is not written correctly, then 'IsHistoryReady' is immedeatly true.
However, for daily data, requests of the history of some contracts are never reported to be ready. This is the case if the symbol does not exist, or if no data is available. This is true for example for BR N2005, C N2005 or S N2005, with RequestHistory Parameters 'D',btDays,10,-1,-1.
There is only one way to fire an event:
With the request sent and waiting for an event to fire (OnBarsChanged, OnBarsReceived), I load the history manually with the eSignal-Application. Then the OnBarsReceived event is fired and IsHistoryReady switches to true in my own application.
So I suppose, I miss something when requesting the history.
Or at least I have to release the history before isHistoryReady switches to true, e.g. after timeout-limit.
So my questions are:
Is it save to use 'ReleaseHistory' before isHistoryReady is true, or is somthing wrong with my way to obtain a history on daily time base?
Thanks for any help,
Martin
Comment