Login Page - Create Account

Support Board


Date/Time: Mon, 06 May 2024 10:35:35 +0000



[Programming Help] - Problem with AVAP Multiplier when using in Formulas

View Count: 664

[2019-12-30 06:35:58]
User994153 - Posts: 2
I'm trying to plot a number at the top of number bars using combination of "spreadsheet formula" and "study subgraph above/below bar as text". To simplify and clarify my problem I provide a simple example with the results in the attached picture.

I want the ask volume to be ploted.

case 1: when using multiplier of 1 and the formula is AVAP(H,0) the result is OK
case 2: when using multiplier of 1 and the formula for getting the second high level is AVAP(H-(TICKSIZE*1),0) the result is OK
case 3: when using multiplier of 2 and the formula for getting the highest level of ask is AVAP(MROUND(H,Ticksize*2),0) I get the wrong results (zero) as evident in the picture.

I'm having this problem only with AVAP at the highs. In the cases where I use BVAP at the lows the result is always ok
I'd be grateful if you could help me with this
imagehamidn.png / V - Attached On 2019-12-30 06:28:47 UTC - Size: 26.35 KB - 224 views
[2019-12-30 06:39:51]
User994153 - Posts: 2
This happens in almost every 2 out of 10 bars. the rest of the bars return right values
[2019-12-30 13:29:22]
Sawtooth - Posts: 3993
The MROUND function rounds up or down to a multiple.
You might want to use CEILING to round up to a multiple, or FLOOR to round down to a multiple.

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

Login

Login Page - Create Account