Login Page - Create Account

Support Board


Date/Time: Sat, 01 Jun 2024 22:56:35 +0000



Accessing market depth in ACSIL between study calls

View Count: 123

[2024-05-08 09:54:44]
satori - Posts: 2
I'm looking to programatically access market depth data every 250-500ms in quiet market conditions, where a trade may occur every 5-10 seconds. A current call to sc.GetBidMarketDepthEntryAtLevel() is compared to a previous call.

I have read through Arrays and Looping and Time and Sales and I must be misunderstanding the documentation somewhere.

I read that a study call takes place as bid/ask data is received (among other things). I interpret that as when I see limits updating every 100ms or so on the DOM. But my study only calls when a trade occurs say every 5 seconds.

I also read that sc.GetTimeAndSales can be used between calls. But if a trade triggers a study call, I understand that to mean study call and T&S would be called at same interval, since a trade would trigger both. That would mean there is no between calls.

I hope this makes sense and can you tell me where I'm not understanding this correctly?

The core question is, how do I run study to access market depth without waiting for the next trade?

Possibly relevant details: My study is applied to a trading DOM. Global chart update interval at 10ms, and chart interval for UpdateAlways at 10ms. Auto-looping. Function intervals are controlled with time elapses stored in persistent integers.

Thank you.
Date Time Of Last Edit: 2024-05-08 09:56:29
[2024-05-08 12:16:29]
Sierra_Chart Engineering - Posts: 14649
Refer to this ACSIL variable:
ACSIL Interface Members - Variables and Arrays: sc.UpdateAlways
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, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-05-08 21:52:02]
satori - Posts: 2
Ah my mistake. The issue was not a chart/ACSIL setting.

My testing function calls every 2 seconds based on:
if (CurrentTime > LastCheckTime + 2000) {
// do function

But CurrentTime was assigned from sc.BaseDataEndDateTime, which stores time of last trade.

I instead assign from sc.CurrentDateTimeForReplay or sc.CurrentSystemDateTime, and now it's a very consistent 2sec interval.

Thanks again.
Date Time Of Last Edit: 2024-05-09 09:05:34

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

Login

Login Page - Create Account