Login Page - Create Account

Support Board


Date/Time: Sun, 06 Jul 2025 21:16:39 +0000



[Programming Help] - Calculate the difference between swings

View Count: 1006

[2020-02-28 10:26:30]
grantx - Posts: 244
Zig Zag study prints the size of the swings. How would I get the difference between the current swing high and the last swing high? for example:

In the picture:
I would like to know the difference between point 2 and point 1.
I would like to know the difference between point 4 and point 3.

etc..
image1.png / V - Attached On 2020-02-28 10:25:52 UTC - Size: 35.47 KB - 293 views
[2020-02-28 13:28:33]
Sawtooth - Posts: 4236
Use this method:
Spreadsheet Example Formulas and Usage: Return Last Two Zig Zag Reversal Values
[2020-02-28 14:34:29]
grantx - Posts: 244
tomgilb that works great. But it appears to be only reporting on the up swings and not the down swings.
So it skips the lower swing sizes and only reports 2 back. If you get what I mean? I posted a pic.
Date Time Of Last Edit: 2020-02-28 14:36:18
image1.png / V - Attached On 2020-02-28 14:36:09 UTC - Size: 26.91 KB - 320 views
[2020-02-28 14:46:13]
Sawtooth - Posts: 4236
it appears to be only reporting on the up swings and not the down swings
The example formulas return every reversal price, alternating both highs and lows.

It works for me, not sure what you're doing.
Date Time Of Last Edit: 2020-02-28 14:51:43
[2020-02-28 15:10:16]
grantx - Posts: 244
What does the @3 part mean?
[2020-02-28 15:19:39]
Sawtooth - Posts: 4236
It refers to row 3.
Working with Spreadsheets: References to Study Subgraph Columns when using the Spreadsheet Study
Date Time Of Last Edit: 2020-02-28 15:44:44

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

Login

Login Page - Create Account