Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 17:20:36 +0000



Custom Study Sum Bid and Ask Side

View Count: 1210

[2019-12-16 00:47:10]
User467370 - Posts: 5
Using the "Bid and Ask Depth Bars" study I am able to sum the bid side and the ask side for a predefined number of levels. I'm programming a custom study where I need to access this number. Is there a method that I can use to do this in a custom study?
[2019-12-16 01:55:59]
Sierra Chart Engineering - Posts: 104368
Did you want to do this for the current market depth data at any moment in time?
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2019-12-16 03:02:12]
User467370 - Posts: 5
I want to do it for both current and historical market depth data. I'm programming a study similar to the relative volume study but for market depth.
[2019-12-16 04:12:59]
Sierra Chart Engineering - Posts: 104368
Therefore, refer to this section here:
ACSIL Programming Concepts: Programmatically Accessing Historical and Current Market Depth Data
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2019-12-16 17:36:12]
User467370 - Posts: 5
I don't see a function on that link that will sum the bid and ask for me similar to the "Bid and Ask Depth Bars" study. Is there a function that does this, or do I have to take the sum myself in the code?

I want to create a study that makes a calculation just like how the "Relative Volume" study is calculated but I want to do it for market depth. So I want to be able to take the average of the total number of resting orders on historical bars and compare that to the current number of resting orders.

So let's say I have the study on a 5 minute chart and the time is currently 9:30. I want to be able to take the average of the total number of resting orders for bars that closed at 9:30 on previous days and compare that to the current number of resting orders.
[2019-12-17 14:05:20]
Sierra Chart Engineering - Posts: 104368
The data accessible to the Bid and Ask Depth bars is not yet made available to ACSIL. This is a lot of work to do. What is available is in the section we linked to. So you just have to work with what is available. And do the calculations.

But based upon what you want to do you want to use the historical market depth data:
ACSIL Interface Members - Historical Market Depth Data (c_ACSILDepthBars)
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2019-12-17 14:30:50]
User467370 - Posts: 5
Ok. If I have the Bid and Ask Depth Bars study on the same chart that I put my custom study, can I reference the Bid and Ask Depth Bars study in my code? And just pull the number that's being calculated directly from that study?
[2019-12-17 18:46:15]
User467370 - Posts: 5
It looks like I can accomplish this using sc.GetStudyArrayUsingID(). Is this correct?
[2019-12-18 21:10:40]
Sierra Chart Engineering - Posts: 104368
We apologize for the delay.

Yes you can do that. Refer to:
ACSIL Programming Concepts: Using or Referencing Study/Indicator Data in an ACSIL Function
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing

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

Login

Login Page - Create Account