Login Page - Create Account

Support Board


Date/Time: Sat, 24 Jan 2026 22:03:35 +0000



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

View Count: 23

[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: 837

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.

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

Login

Login Page - Create Account