Login Page - Create Account

Support Board


Date/Time: Tue, 22 Apr 2025 11:46:39 +0000



[User Discussion] - bid ask ratio

View Count: 316

[2025-01-21 21:33:19]
SafSaf - Posts: 126
i'm trying to achieve a volume cross... The CQG have a study called 'Bid/Ask Volume Cross' study displaying two lines (attached screenshot (the study below the price chart)). The green line is a five-bar running sum of the ask volume, which represent buying. The red line is a five-bar running sum of the bid volume, which represent selling. The Bid/Ask Volume Cross Oscillator is simply the difference between the green and red lines.

it's important i am able to change the bar period. how can i achieve this on sierra please?

ref: https://news.cqg.com/workspaces/2016/03/cqg-bidask-volume-oscillators
imageScreenshot 2025-01-18 at 12.00.41.png / V - Attached On 2025-01-21 21:33:14 UTC - Size: 301.16 KB - 44 views
[2025-01-21 23:36:25]
Sawtooth - Posts: 4209
how can i achieve this on sierra please?
Try this:
For the BAVolCr:
1. Add the Spreadsheet Formula study, and use this formula in its Formula field:
=SUM(AV[0:-5])
- On the Subgraphs tab, set the Line color to Green.
2. Duplicate the above Spreadsheet Formula study, and use this formula in its Formula field:
=SUM(BV[0:-5])
- On the Subgraphs tab, set the Line color to Red.

For the BAVolCrOsc:
3. Add another Spreadsheet Formula study, and use a formula like this in its Formula field:
=ID6.SG1-ID7.SG1
where ID6 is the first Spreadsheet Formula study, and ID7 is the second Spreadsheet Formula study. Edit as needed to match yours.
- On the Subgraphs tab, set the Draw Style to Bar, and the Width/Size to your requirements.
- Optional: Set the Auto-Coloring to Based On +/- and choose two colors.
Study/Chart Alerts And Scanning: Available Main Price Graph Identifiers/Variables
Study/Chart Alerts And Scanning: Referencing A Range of Data
Date Time Of Last Edit: 2025-01-21 23:39:08
[2025-01-22 08:10:07]
SafSaf - Posts: 126
thanks mate, i'll give this a go and see what happens!
[2025-01-22 10:07:35]
SafSaf - Posts: 126
i'm not sure that's worked for me. see screen shot. what i'm looking for is as per study in second screen shot.
imageScreenshot 2025-01-22 at 10.05.36.png / V - Attached On 2025-01-22 10:06:50 UTC - Size: 319.13 KB - 36 views
imageScreenshot 2025-01-18 at 12.00.41.png / V - Attached On 2025-01-22 10:07:31 UTC - Size: 301.16 KB - 35 views
[2025-01-22 14:18:50]
Sawtooth - Posts: 4209
what i'm looking for is as per study in second screen shot.
The BAVolCrOsc goes in its own Chart Region

See attached screenshot of what it looks like for me.
imageBAVolCr BAVolCrOsc.PNG / V - Attached On 2025-01-22 14:18:44 UTC - Size: 59.71 KB - 35 views
[2025-01-22 14:33:56]
SafSaf - Posts: 126
i'm an idiot. this is what mine looks like with those settings...
imageScreenshot 2025-01-22 at 14.31.10.png / V - Attached On 2025-01-22 14:32:06 UTC - Size: 189.39 KB - 35 views
imageScreenshot 2025-01-22 at 14.32.43.png / V - Attached On 2025-01-22 14:33:39 UTC - Size: 478.21 KB - 28 views
imageScreenshot 2025-01-22 at 14.32.57.png / V - Attached On 2025-01-22 14:33:46 UTC - Size: 479 KB - 29 views
[2025-01-22 14:34:22]
SafSaf - Posts: 126
last screen shot of settings
imageScreenshot 2025-01-22 at 14.33.11.png / V - Attached On 2025-01-22 14:34:07 UTC - Size: 528.88 KB - 31 views
[2025-01-22 16:08:21]
cmet - Posts: 690
Here's both studies. Compile the .cpp files in Custom Studies.

BidAskX = Crossover
BidAskO = Oscillator

Can modify Rolling Period.
imageBidAskCrosses.jpg / V - Attached On 2025-01-22 16:07:22 UTC - Size: 272.87 KB - 41 views
attachmentBidAskX.cpp - Attached On 2025-01-22 16:07:31 UTC - Size: 1.5 KB - 94 views
attachmentBidAskO.cpp - Attached On 2025-01-22 16:07:36 UTC - Size: 1.38 KB - 91 views
[2025-01-22 16:49:54]
SafSaf - Posts: 126
thank you. done exactly as you've instructed and here's a screenshot of what my screen looks like. where am i going wrong?
imageScreenshot 2025-01-22 at 16.48.28.png / V - Attached On 2025-01-22 16:49:39 UTC - Size: 268.9 KB - 33 views
[2025-01-22 17:01:16]
SafSaf - Posts: 126
and this is what is looks like when i base the cross over study on the oscillator and screen shot of the settings too...
imageScreenshot 2025-01-22 at 16.59.08.png / V - Attached On 2025-01-22 17:00:23 UTC - Size: 186 KB - 30 views
imageScreenshot 2025-01-22 at 16.58.47.png / V - Attached On 2025-01-22 17:00:32 UTC - Size: 572.63 KB - 32 views
imageScreenshot 2025-01-22 at 16.58.59.png / V - Attached On 2025-01-22 17:00:43 UTC - Size: 575.55 KB - 31 views
[2025-01-22 17:41:15]
cmet - Posts: 690
These are just based on the original formulas. The crossover is converging because you are aggregating a sum over a long time frame.

Plot using a 10,000 volume or faster chart.

Would likely need to normalize to prevent convergence.

Original Formulas:

The Cross study displays two lines: the rolling 5-bar sum of traded volume at the ask price (buying) and rolling 5-bar sum of traded volume into the bid (selling).

The Oscillator study displays the difference between two lines of the Bid Ask Volume Cross.
Date Time Of Last Edit: 2025-01-22 17:42:34
[2025-01-22 18:23:28]
SafSaf - Posts: 126
what do you mean by normalize? i'm using time based charts
[2025-01-22 18:35:09]
cmet - Posts: 690
Normalize it against total volume. Could probably reset after the each rolling period too. Otherwise, with rolling sum, you're going to get that type of plot on longer time frames/slower charts. Since the Oscillator uses difference, you don't have this problem.

Do you have an example from CQG showing the crossover plotted on time based bars?

Pretty sure they use a 5 tick chart in their examples for a reason.

(Using Bid/Ask in this way over long periods has no value if you want my 2 cents).
Date Time Of Last Edit: 2025-01-22 18:36:58

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

Login

Login Page - Create Account