Login Page - Create Account

Support Board


Date/Time: Thu, 28 Nov 2024 00:50:24 +0000



[Programming Help] - AVAP and BWAP comparison over a few ticks range

View Count: 297

[2023-06-13 16:11:19]
Dean Roberts - Posts: 79
Hi

I am trying to create a trading by alert study from a cross-over but with a check comparing AVAP and BVAP over a 1 point/3tick range beyond the level I am crossing. I am trying to compare Bid volume to the Ask volume price one tick above (as I would in a footprint chart)... to compare volumes 1 tick below the level, at the level, then for the next two ticks beyond the level. I am using a level generated by Round Study Subgraph to Tick Size.

Does this look right please - I don't appear to be getting any errors;

=AND(CROSSFROMBELOW(H,ID20.SG1), AVAP(ID20.SG1-(TICKSIZE*1),0)>=BVAP(ID20.SG1-(TICKSIZE*2),0)*1.5, AVAP(ID20.SG1,0)>=BVAP(ID20.SG1-(TICKSIZE*1),0)*1.5, AVAP(ID20.SG1+(TICKSIZE*1),0)>=BVAP(ID20.SG1,0)*1.5, AVAP(ID20.SG1+(TICKSIZE*2),0)>=BVAP(ID20.SG1+(TICKSIZE*1),0)*1.5)

ID20.SG1 being the round study to ticksize.

Much appreciated

Cad
[2023-06-13 20:53:02]
Sawtooth - Posts: 4120
To get a visual of where the alert it TRUE, put the formula on the Alerts tab of the Color Bar Based On Alert Condition study.

This will help you troubleshoot the problem.
[2023-06-14 14:07:57]
Dean Roberts - Posts: 79
Never thought of that! Brilliant thank you.

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

Login

Login Page - Create Account