Login Page - Create Account

Support Board


Date/Time: Wed, 11 Mar 2026 06:06:57 +0000



[Programming Help] - sc.ReadIntradayFileRecordForBarIndexAndSubIndex and Volume Based Bars

View Count: 177

[2026-01-24 17:36:25]
brianmonagha - Posts: 12
I would like to use ACSIL to get the exact 09:30 am open (as would be displayed on a time-based chart), and display this price as a line on my Volume Bar Chart. I have successfully written the code that will do this. However, per a previous thread with engineering, the code only works properly when the setting: Chart Settings > Chart Data > “Split Data Records” is turned OFF.

If that setting is ON, the code works sometimes and not other times. Presumably, it fails when attempting to read from a bar where the first trade of the bar is part a summary trade. When the failure state occurs, the first call is successful and reports total volume of 1, however once SubIndex is incremented by 1, sc.ReadIntradayFileRecordForBarIndexAndSubIndex returns false then.

I do not want to set this setting to OFF, because I believe it alters the appearance of the bars that I am using in the chart.

The only possible alternative I see is to use the functions sc.FileRecordIndexOfLastDataRecordInChart and sc.ReadIntradayFileRecordAtIndex per the scsf_ReadFromUnderlyingIntradayFileExample in Studies2.cpp.

In this case, it seems I start with the last data record on the chart and loop back through each record to find the stuff I’m looking for.

Can anyone think of a more efficient way?

I am aware that I could use Study overlay from a time-based chart to create this line. The reason for attempting it in ACSIL is to avoid using multiple charts in different time-frames during reply.

Thanks
[2026-01-24 18:18:54]
User431178 - Posts: 852

The only possible alternative I see is to use the functions sc.FileRecordIndexOfLastDataRecordInChart and sc.ReadIntradayFileRecordAtIndex per the scsf_ReadFromUnderlyingIntradayFileExample in Studies2.cpp.

In this case, it seems I start with the last data record on the chart and loop back through each record to find the stuff I’m looking for.

Can anyone think of a more efficient way?

Don't loop back through the records, use a binary search, it'll be orders of magnitude faster.
[2026-01-25 01:35:51]
User719512 - Posts: 422
What is your concern with using a time-based chart to obtain time-based data (and the use of multiple charts)?

Assuming you meant "replay" above where you have "reply".

Instead of using Study Price Overlay, you can get this data within your study as well in case you wanted that as part of your study on your volume chart. You may need to do that anyway depending on how you are overlaying low timeframe data onto high timeframe data or vice versa.

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

Login

Login Page - Create Account