Login Page - Create Account

Support Board


Date/Time: Fri, 23 Oct 2026 05:00:58 +0000



Supported method for a read-only 30-second volatility meter on Range Bar charts

View Count: 976

[2026-09-08 00:26:54]
UserOOM90 - Posts: 1
Hello Sierra Chart Support / Engineering,

I need to create a compact, strictly read-only analytical study for NQ and ES Range Bar charts.

It must calculate from executed trades:

* Rolling 30-second high-to-low range
* Cumulative absolute price movement during the last 30 seconds
* Volume per second
* Trade execution records per second
* Ask Volume minus Bid Volume delta during the last 30 seconds
* Comparisons against the preceding 1-minute and 5-minute periods

The study must never submit, modify, cancel, manage, or close any simulated or live orders.

Environment:

* Sierra Chart Current Version 2947
* Integrated Sierra Chart with Advanced Features, Service Package 11
* Denali Exchange Data Feed with CME real-time data
* Intraday Data Storage Time Unit: 1 Tick
* NQ and ES futures
* Range Bar charts

I am not requesting programming or source code. I only need confirmation of the officially supported method:

1. Can these exact rolling wall-clock calculations be created using native Sierra Chart studies, independently of how long each Range Bar takes to form?

2. If a custom ACSIL study is required, is sc.GetTimeAndSales(), filtering only SC_TS_BID and SC_TS_ASK records and tracking s_TimeAndSales::Sequence, the correct supported method for processing all executed trades received between study calls?

3. For initialization after restarting Sierra Chart and for accurate Chart Replay, should the study read the 1-Tick SCID records using sc.ReadIntradayFileRecordForBarIndexAndSubIndex(), or is a separate chart configured as 1 Number of Trades Per Bar the preferred supported method?

Please correct any part of this proposed architecture that is not officially supported and provide links to the applicable Sierra Chart documentation.

Thank you.
[2026-09-09 03:03:03]
dav19e - Posts: 5
Not support, just another user who's spent a lot of time in ACSIL.

On 2: sc.GetTimeAndSales() is right, but you don't need to track the sequence numbers yourself. c_SCTimeAndSalesArray already does it:

GetSequenceNumberOfLastElement() — store this at the end of each pass

ValidateAndCorrectPriorSequenceNumber(uint32_t&) — call it first on the next pass. It handles the sequence resetting or wrapping, which otherwise leaves you silently processing nothing

GetRecordIndexAtGreaterThanSequenceNumber(seq) — binary search, gives you where to start reading

That gets you everything since your last call without scanning the array. Filter on Type == SC_TS_BID or SC_TS_ASK for executed trades; SC_TS_BIDASKVALUES is quote updates, not trades.

On 3: sc.GetTimeSalesArrayIndexesForBarIndex(BarIndex, r_BeginIndex, r_EndIndex) maps a bar to its slice of the time and sales array, which is usually less work than going to the SCID file. But it only covers what's currently in that array, so for a restart or for Chart Replay you'll still need sc.ReadIntradayFileRecordForBarIndexAndSubIndex() against 1-tick data.

One more: run this with sc.AutoLoop = 0. A rolling wall-clock window has nothing to do with bar boundaries, and most sample code you'll find assumes auto-loop.

Leaving 1 to Engineering.

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

Login

Login Page - Create Account