Login Page - Create Account

Support Board


Date/Time: Sat, 23 Nov 2024 17:10:36 +0000



study to access DOM recent Bid/Ask volume

View Count: 1158

[2019-01-29 17:11:21]
User153286 - Posts: 49
I creating a study for the DOM and want to access the the same data I see in the Recent Bid Volume and Recent Ask Volume.

I used
    float bvalue = sc.GetCurrentTradedBidVolumeAtPrice(curprice);
    float avalue = sc.GetCurrentTradedAskVolumeAtPrice(curprice);

but the returned values do not match.

Also if I clear the recent traded values, the values in GetCurrentTradedBidVolumeAtPrice and GetCurrentTradedAskVolumeAtPrice do not seem to be affected.

Can I get at the DOM Recent Bid/Ask volume data from within a study?
[2019-01-29 18:54:26]
Sierra Chart Engineering - Posts: 104368
You need to use these functions instead:
sc.GetRecentAskVolumeAtPrice() / sc.GetRecentBidVolumeAtPrice()
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
[2024-08-12 20:29:05]
nauT - Posts: 4
hi,
thank you for the answer! Your function only shows the last trade at this price.
I read the description of "sc.GetRecentAskVolumeAtPrice() / sc.GetRecentBidVolumeAtPrice()" and found "And the Recent Bid/Ask Volume columns need to be added" so I checked my DOM with the "sc.GetCurrentTradedBidVolumeAtPrice()" function: now its working and the numbers are cumulative trades at this price


But: the numbers will be resetted at random times...

I need the total cumulative number of trades at one price like for this actual trading day, is there a function to read this from a chart?
[2024-08-12 21:32:11]
John - SC Support - Posts: 36238
The only reason the Current Traded column data will be reset is if you specifically clear it, or if you disconnect and reconnect to the data feed. Otherwise, it will show the cumulative trade quantities at that price level.
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-08-12 23:21:58]
nauT - Posts: 4
Hi,
I have specified 1 reset in my code at start of a new day. While running and observing I'm also not click anything.
So its only can happen because of "a new connection to the data feed occurs", but I cant control this. My connection is green at all time. any tips?
[2024-08-13 13:59:53]
John - SC Support - Posts: 36238
When you say the numbers are being reset, is this actually occurring in the columns themselves, so you can visually see this, or are you getting different values from your study than what you see in the Current Bid/Ask columns?
For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
[2024-08-13 14:54:20]
nauT - Posts: 4
Hi,
so basically its both. With the function "sc.GetCurrentTradedBidVolumeAtPrice()" in my study I can get the numbers, which I'm seeing in the DOM column. So a reset is occuring visually and then also in the study.

The reset also happens if a new bar occurs. My study is running on a 15M Chart. There is a partial solution to set the chart to a daily chart to get the volume numbers of the whole day, but I still need to operate in a 15M in my study.
[2024-08-13 15:30:05]
John - SC Support - Posts: 36238
This does not make any sense. The Current Traded Bid/Ask volumes should not be resetting with new bars. They should only reset as we specified previously, which, in general, is only when you force it to do so. We wonder if you have something in your study that is doing this.

Please open another chart for the same symbol and have the "Current Traded Bid/Ask Volume" columns displayed and do not have any studies on that chart. Verify that the Current Traded Bid/Ask Volume columns do not reset unless you tell the system to do so.

If the above works properly, then add your study to that chart and see if it resets. If it does, then there is something about your study that is causing the issue.
For the most reliable, advanced, and zero cost futures order routing, use 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