Login Page - Create Account

Support Board


Date/Time: Wed, 06 May 2026 04:50:40 +0000



Post From: Computing bar index N's timestamp from a scid file outside of Sierra Chart

[2026-05-06 01:40:09]
cmack1011 - Posts: 192
Hi:
I'm building an external Python tool that needs to read historical bar data from .scid files and align it with bar indices used in my custom ACSIL studies. I've hit a question I can't resolve from the documentation.

Background:
I have an ACSIL study that processes intraday bars and writes a CSV row at the end of each "phase" (a user-marked time range on the chart). The CSV stores start_bar_index and end_bar_index as integers — the values from sc.BaseDateTimeIn's array index.
Separately, I have a Python tool that reads the same ticker's .scid file directly. I want to extract the same OHLCV bar data my ACSIL study saw, given a stored start_bar_index.

What I tried:
I assumed bar index N corresponded to the timestamp of the first .scid record + N × bar period (10 seconds for my charts). I verified this against my CSV's stored phase start_time (chart-displayed time, Chicago timezone) for 211 historical phases across 32 tickers.
The hypothesis is rejected — diffs range from -1.5 million to -20 million seconds. The pattern suggests SC's bar index 0 is anchored somewhere other than the first .scid record. Per-ticker, the offset is mostly consistent (a few seconds variation for some tickers, days of variation for others — possibly indicating session-skip gaps), but it varies dramatically across tickers.

My questions:

What determines bar index 0's wall-clock timestamp for an intraday chart? Is it the first .scid record, the start of the first session of a configurable date, or something else?

When SC is configured to skip session gaps (e.g., overnight, weekends), does this affect bar indexing? Specifically, if a .scid file has continuous tick data across 24 hours, but SC is set to display only the regular session, does bar index N skip overnight gaps?

Is there a programmatic way (from outside Sierra Chart, reading only the .scid file plus chart configuration) to determine the wall-clock timestamp of bar index N?

Alternatively — does ACSIL provide a way for a custom study to write the wall-clock timestamp of each bar to disk efficiently, so I can build my own bar-index → timestamp lookup table?

Is there a simpler way to achieve my goal — pairing externally-stored bar indices with .scid bar data — that I'm missing?

Thanks for any guidance.

Date Time Of Last Edit: 2026-05-06 01:40:51