Login Page - Create Account

Support Board


Date/Time: Sat, 11 May 2024 15:10:58 +0000



Post From: Return Last Two Zig Zag Reversal Values - Possible to store n number of values?

[2019-07-30 16:56:28]
TapeReader - Posts: 88
Is there a way to store the prior x values without using one column for each value in a spreadsheet as is demonstrated in the following copied from the help files?


The following set of formulas can be used with the Spreadsheet Study in order to obtain the values of the three most recent Zig Zag reversals. The concept can be continued on to obtain however many Zig Zag reversal points are desired.

This example assumes that the Zig Zag study is ID1 and that the Zig Zag Input Option for Additional Output for Spreadsheets is set to Yes.

Cell O3: =IF(ID1.SG3@3 > 0, ID1.SG1@3, O4)
This sets cell O3 to the Price of the most recent Zig Zag reversal point.
Cell P3: =IF(ID1.SG3@3 > 0, O4, P4)
This sets cell P3 to the Price of the second most recent Zig Zag reversal point.
Cell Q3: =IF(ID1.SG3@3 > 0, P4, Q4)
This sets cell Q3 to the Price of the third most recent Zig Zag reversal point.