Login Page - Create Account

Support Board


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



[Programming Help] - Help with formula for volume at price location within candlestick

View Count: 1310

[2021-08-01 16:22:04]
Trademics - Posts: 2
I would like to know if it's possible to use the color bar based on alert condition study to highlight a range bar depending on where volume takes place WITHIN the range bar. I am running VBP study per bar currently.

For example: bar delta is negative, bar closed positive, and majority of the bid volume occurs in the bottom 1/2 of the candle.

Despite searching the forum cannot figure out how to highlight the range bars according to the location of majority of the volume WITHIN the bar. I have tried various iterations of the BVAP, VAP, AVAP functions without luck.

Any help greatly appreciated!
[2021-08-01 22:35:47]
Sawtooth - Posts: 4173
Try this:

BVAP formula:
=AND(
BV>AV,
C>O,
SUM(
BVAP(L, 0),
BVAP(L+TICKSIZE*1, 0),
BVAP(L+TICKSIZE*2, 0),
BVAP(L+TICKSIZE*3, 0),
BVAP(L+TICKSIZE*4, 0))>
BV/2)

AVAP formula:
=AND(
BV<AV,
C<O,
SUM(
AVAP(H, 0),
AVAP(H-TICKSIZE*1, 0),
AVAP(H-TICKSIZE*2, 0),
AVAP(H-TICKSIZE*3, 0),
AVAP(H-TICKSIZE*4, 0))>
AV/2)

These formulas are meant for a 10 tick range bar. Modify as needed.
[2021-08-02 11:22:16]
Trademics - Posts: 2
Tom you are the best this is very helpful thank you!
[2022-05-30 21:56:09]
sxmiali - Posts: 4
hello im trying to do kind of the same thing but with delta on number bars, im trying to create a study that highlights on a 3pt compression 5 min chart nq to either color bar, draw arrow when two or more cells have >= +100 delta in top two-three cells of number bars and same thing for -100 delta in bottom two or three cells of the number bars
[2022-05-31 19:13:45]
Sawtooth - Posts: 4173
two or more cells have >= +100 delta in top two-three cells of number bars and same thing for -100 delta in bottom two or three cells of the number bars
Try this:

Delta of each of top 3 prices >= 100 :
=AND(
AVAP(H, 0) - BVAP(H, 0) >= 100,
AVAP(H-TICKSIZE*1, 0) - BVAP(H-TICKSIZE*1, 0) >=100,
AVAP(H-TICKSIZE*2, 0) - BVAP(H-TICKSIZE*2, 0) >=100)
Put this formula on the Alerts tab of the Color Bar Based On Alert Condition study, and set the Draw Style to Point On High.


Delta of each of bottom 3 prices <= -100 :
=AND(
AVAP(L, 0)-BVAP(L, 0) <= -100,
AVAP(L+TICKSIZE*1, 0) - BVAP(L+TICKSIZE*1, 0) <= -100,
AVAP(L+TICKSIZE*2, 0) - BVAP(L+TICKSIZE*2, 0) <= -100)
Put this formula on the Alerts tab of another instance of the Color Bar Based On Alert Condition study, and set the Draw Style to Point On Low.
[2022-05-31 19:42:05]
User309357 - Posts: 1
Hello,
I need a help to create a scalper alert which requires two plots, Pivot High and Pivot Low. Pivot High is shown as an arrow above the first bar in a series of 3 lower Closes (Sell Signal).
Pivot Low is shown as an arrow under the first bar in a series of Higher Closes (Buy Signal)
Thank you.
[2022-05-31 20:11:20]
sxmiali - Posts: 4
Thank you Tom, some reason that formula is spitting out syntax error, any way i can DM you to learn more?
[2022-05-31 21:57:36]
Sawtooth - Posts: 4173
that formula is spitting out syntax error
They both work for me.
can DM you to learn more?
Yes.

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

Login

Login Page - Create Account