Login Page - Create Account

Support Board


Date/Time: Tue, 26 Nov 2024 15:42:00 +0000



[Programming Help] - Applying "Swing High And Low" to the Volume study

View Count: 328

[2023-11-21 04:18:22]
funbun - Posts: 90
I'm trying to plot a point above each volume bar that's a "pivot", meaning,
the volume bar is higher than "X" volume bars to the left and right of the bar.

Changing "Based On" to the Volume study didn't work.

Any other ideas of how to make it work?
[2023-11-21 04:41:51]
Sierra_Chart Engineering - Posts: 17182
The Swing High and Low study is going to require open, high, low, close data.

If you want to use the Volume study you have to develop your own custom study. Refer to:
How to Build an Advanced Custom Study from Source Code
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, use the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2023-11-21 04:42:30
[2023-11-21 14:28:26]
Sawtooth - Posts: 4120
I'm trying to plot a point above each volume bar that's a "pivot", meaning,
the volume bar is higher than "X" volume bars to the left and right of the bar.

You can do it with the Color Bar Based On Alert Condition study, using a formula like this on its Alerts tab:
=V>MAX(V[-1:-10])
Study/Chart Alerts And Scanning: Referencing A Range of Data

To plot a point above each volume bar, follow these instructions:
Color Bar Based on Alert Condition: Coloring Subgraphs of Other Studies
[2023-11-22 13:55:45]
funbun - Posts: 90
That's an original angle for a solution but this formula only tests the bars on the left, not on the right as well.
[2023-11-22 14:23:30]
Sawtooth - Posts: 4120
That's an original angle for a solution but this formula only tests the bars on the left, not on the right as well.

Use this formula instead:
=AND(V>MAX(V[-1:-10]),V>MAX(V[1:10]))
[2023-11-22 16:20:53]
funbun - Posts: 90
OK, now I'm impressed! Worked like a charm...

I didn't know formulas could do that, thanks!

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

Login

Login Page - Create Account