Support Board
Date/Time: Fri, 10 Jan 2025 22:52:38 +0000
Realtime vs. Historical
View Count: 1173
[2016-09-28 21:38:36] |
Sean Beebe - Posts: 10 |
If I want to determine if the study is being calculated on historical data or in real-time what function should I call? Is the function sc.ChartIsDownloadingHistoricalData() the best way to check this? |
[2016-09-28 23:40:27] |
Sierra Chart Engineering - Posts: 104368 |
You should use this function: sc.GetBarHasClosedStatus() You may also want to use the function mentioned in post #1 as well. 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 Date Time Of Last Edit: 2016-09-28 23:40:45
|
[2016-10-05 18:01:05] |
Sean Beebe - Posts: 10 |
OK, I want to be clear on the process. If I call sc.GetBarHasClosedStatus() and it returns: BHCS_BAR_HAS_NOT_CLOSED: then I know this is a real-time bar BHCS_BAR_HAS_CLOSED: it may or may not be a real-time bar close If I call sc.ChartIsDownloadingHistoricalData() and it returns: true: I know this is not a real-time bar false: I know this is a real-time bar Are my assumptions above correct? Date Time Of Last Edit: 2016-10-05 18:02:31
|
[2016-10-05 18:12:06] |
Sierra Chart Engineering - Posts: 104368 |
BHCS_BAR_HAS_NOT_CLOSED: This will be true for the last bar in the chart. BHCS_BAR_HAS_CLOSED: This indicates the bar is definitely completed and is a historical bar. When sc.ChartIsDownloadingHistoricalData() returns true, then historical data is in the process of being downloaded. You might want to return and not do any processing. But we really do not know because we do not know exactly what your study is doing. That is something you have to determine. 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 |
[2016-10-05 18:29:51] |
Sean Beebe - Posts: 10 |
OK, the study just needs to do something different on a bar that is being updated in real-time. It sounds like BHCS_BAR_HAS_NOT_CLOSED will tell me this. I was just not sure if BHCS_BAR_HAS_CLOSED also occurs in real-time. So what happens in real-time at the close of bar? Is BHCS_BAR_HAS_CLOSED not set at the end of the bar? |
[2016-10-05 18:42:41] |
Sierra Chart Engineering - Posts: 104368 |
Yes use BHCS_BAR_HAS_NOT_CLOSED . I was just not sure if BHCS_BAR_HAS_CLOSED also occurs in real-time. So what happens in real-time at the close of bar? Is BHCS_BAR_HAS_CLOSED not set at the end of the bar? sc.GetBarHasClosedStatus() 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 |
[2016-10-05 19:14:03] |
Sean Beebe - Posts: 10 |
Perfect. Thank you.
|
To post a message in this thread, you need to log in with your Sierra Chart account: