Support Board
Date/Time: Sun, 09 Feb 2025 02:08:34 +0000
Post From: Proper Way to Detect When Historical Data Download Has Finished in ACSIL
[2020-05-07 17:12:36] |
User41727 - Posts: 124 |
I am trying to determine in an ACSIL study (with auto looping) when the chart has finished downloading all historical data. To that end, I was using the sc.DownloadingHistoricalData flag. However, what I found was that it can happen sometimes that the flag is never set back to zero during processing of the historical bars. This means, if no new data is coming afterwards that would trigger a call into the study function, it is impossible to know that the download has finished. Is this the expected behaviour? Because this does not seem always to be the case. I tried using sc.ArraySize and sc.IntradayChartRecordingState changing state from IDFRS_HISTORICAL_DATA_DOWNLOAD_PENDING to identify the last bar, but there seem to be some edge cases there, too. Hence, my question is whether there is a canonical way to do this. Or can this only be done properly with manual looping? I assume there we would only see one call into the study function after everything has been loaded from how I understand the documentation. Is that correct? |