Login Page - Create Account

Support Board


Date/Time: Fri, 07 Feb 2025 17:50:15 +0000



[Programming Help] [Locked] - BVAP/AVAP reference in Alert formula not working correctly or misreading data

View Count: 1505

[2021-08-27 05:47:26]
User791909 - Posts: 7
Thank you for providing such a solid trading platform. I've been using alert formulas for quite some time now with great success. Recently I found that when using the BVAP and AVAP commands in the color bar based on alert condition study, the system was not behaving consistently with the formula output. I asked the alert to fire when BVAP at one price level was > or < or = the BVAP of the similar level one or more candles back. I tried each comparison (<,>,=) separately and found similar issues with the comparisons made by the system. As a simple example, I made a chart with the following formulas as separate studies (again, the errors occur whether <,>,= is used):

=(BVAP(H[-1],0))=(BVAP(H,0))
this results in a teal arrow down above the high when true

and the other with:

=(BVAP(H[-3]-(TICKSIZE*1),0))=(BVAP(H-(TICKSIZE*1),0))
this results in a red arrow down above the high when true

The issue is that the alert sometimes fires correctly, at times misses signals, and at times fires when the formula would have been false. I have a simplified Chartbook I can provide if you need it. I have attached some screen grabs that illustrate the scenarios and have made commentary on the images. As a final note, I am running version 2299 on an M1 Mac Mini via Codeweavers Crossover (Version 20.0.4 (20.0.4.33197)) and I use the Denali Feed for CME ticker data and recently added the Sierra Feed for CBOE, etc. if any of that comes to bear.

Highest Bid Comparison
Bid Comparison 1 tick below High 3 bars back
[2021-09-02 05:46:58]
User791909 - Posts: 7
Not pushing this for a quicker reply, just realized it doesn't look like the images attached so I'm adding them in here in a second attempt. Thank you for your time.
imageBid Comparison 1 tick below High 3 bars back.png / V - Attached On 2021-09-02 05:45:42 UTC - Size: 224.44 KB - 295 views
imageHighest Bid Comparison.png / V - Attached On 2021-09-02 05:45:49 UTC - Size: 288.54 KB - 227 views
[2021-09-02 07:11:21]
User907968 - Posts: 826
Your use of BVAP does not reflect what you are trying to achieve, you have offset 0 (the current index) in all cases, whereas it should be offset similarly to the price variables.

Study/Chart Alerts And Scanning: VAP

e.g. when comparing 1 tick below high 3 bars back to 1 tick below high at current bar

=(BVAP(H[-3]-(TICKSIZE*1),0))=(BVAP(H-(TICKSIZE*1),0))

should be

=(BVAP(H[-3]-(TICKSIZE*1),-3))=(BVAP(H-(TICKSIZE*1),0))
[2021-09-03 04:57:18]
User791909 - Posts: 7
Many thanks for the reply and help. Basically match the VAP offset to the bar offset. Figured I was in the "user error" category. This worked, as you already knew. Attached a couple screen grabs. One of the same bars as the original, now with corrected signals. Really appreciate you reaching out with this.
imageHigh Bid comparison.png / V - Attached On 2021-09-03 04:55:44 UTC - Size: 94.79 KB - 265 views
image1 tick below High comparison.png / V - Attached On 2021-09-03 04:55:56 UTC - Size: 92.59 KB - 246 views

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

Login

Login Page - Create Account