Login Page - Create Account

Support Board


Date/Time: Thu, 16 May 2024 13:51:35 +0000



Proper Way to Detect When Historical Data Download Has Finished in ACSIL

View Count: 700

[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?
[2020-05-08 12:46:57]
Sierra Chart Engineering - Posts: 104368
Allow about two weeks for us to look into this and develop a better solution.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2020-05-10 16:30:23]
User41727 - Posts: 124
One more thing I have noticed: Usually, if a download will be necessary, sc.DownloadingHistoricalData will be set true immediately upon the first call into the study function, and sc.IntradayChartRecordingState will be either 'pending' or 'downloading'. But occasionally, it's set to false/'receiving RT data', and will only flip on subsequent calls even when using the same chart configuration. That's a problem when trying to detect the download early on without actually looking at the dates of the bars. Perhaps you could look into this to make sure it behaves consistently.
[2020-08-01 13:36:13]
Sierra Chart Engineering - Posts: 104368
Use this function:
sc.ChartIsDownloadingHistoricalData()

There are some changes which have been implemented in it which will be out in the next release.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account