Login Page - Create Account

Support Board


Date/Time: Tue, 04 Mar 2025 15:18:32 +0000



Counting Zero Bid/Ask Inside Price Bar

View Count: 789

[2021-12-18 01:37:20]
SavantTrader - Posts: 110
Assuming the following:

>> Charting ES using 2.5R bar (i.e., 11 ticks/bar)

Is there an elegant way for me to obtain a count of how many bid-at-price slots within that bar were zero?

Something similar to this, but perhaps allowing a range to be specified:

COUNTBLANK(BVAP(H-TICKSIZE),BVAP(H-TICKSIZE*2),...,BVAP(H-TICKSIZE*11))

I'm not even sure if COUNTBLANK will count a "0" volume value as blank, but assuming it does, my problem is that using the above very lengthy calculation as part of a CBBOAC formula is extremely cumbersome, especially when the expression needs to appear multiple times within the formula.

Is there something more abbreviated I can use to specify the price range slots that constitute a bar, or (in the alternative) to simply count the number of zeros that occur in a price bar bid/ask column?

I attached an example using a 3rd party study, but I could just as easily have used your Numbers Bar study to illustrate the same example.

Thank you!
Date Time Of Last Edit: 2021-12-19 06:42:07
imageCapture.PNG / V - Attached On 2021-12-19 06:38:39 UTC - Size: 14.37 KB - 183 views
[2021-12-20 15:16:02]
John - SC Support - Posts: 38345
There is a way to do this, although it is a bit outside of the typical use case.

Use the Volume At Price Threshold Alert V2 study and set the following Inputs:
- Comparison Method: Ask Volume Bid Volume Ratio
- Percentage Threshold: 1000 (for the Bids, use -1000 for the Asks)
- Enable Zero Bid/Ask Compares: Yes
- Zero Value Compare Action: Set Percentage to +/- 1000%

Subgraph 59 then has a "Count of Alerts" that you can use to get the number of 0 Bids.

The one thing to be aware of is that you will get a few additional comparisons in the mix where the ratio is larger than 1000%, such as an Ask of 12 and a Bid of 1 (1200% ratio).
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