Support Board
Date/Time: Thu, 06 Feb 2025 15:08:20 +0000
[Programming Help] - [SPREADSHEET] - Reference previous Swing High/Low Points
View Count: 1570
[2020-04-28 02:19:42] |
User355030 - Posts: 163 |
I am trying to reference previous high/low points and can't seem to figure it out. The study I am using to derive these values is the "Auto-Retracement/Projection." The problem is because the value plots a straight line, so the values repeat until they change. For example, when price is going through previous high, my logic stops working bc the value of the "High" is now changing.
|
[2020-04-28 23:32:48] |
User355030 - Posts: 163 |
@tomgilb
|
[2020-04-29 02:59:49] |
Sawtooth - Posts: 4170 |
For example, when price is going through previous high, my logic stops working bc the value of the "High" is now changing.
You would need to reference the previous segment/bar/row4, that won't change?
|
[2020-04-29 13:10:19] |
User355030 - Posts: 163 |
For example, when price is going through previous high, my logic stops working bc the value of the "High" is now changing. You would need to reference the previous segment/bar/row4, that won't change? @tomgilb - I would need to reference the value of the previous high. The problem is with the spreadsheet it will keep repeating the value of the high until it is changed so I don't know which row will have the previous value. |
[2020-04-29 13:20:32] |
Sawtooth - Posts: 4170 |
I don't know which row will have the previous value.
Row 4 will have the most recent previous value. The value in row 4 does not change.Is your 'previous' value earlier than row 4? |
[2020-04-29 13:55:57] |
User355030 - Posts: 163 |
@tomgilb - Row 4 will not have the previous value because the studies plot a straight line so the current value repeats down the rows so the previous value is always somewhere down the rows randomly.
|
[2020-04-29 14:03:45] |
Sawtooth - Posts: 4170 |
If the 'previous' value you are referring to occurs randomly in a row below, you can use this method to find it: Spreadsheet Example Formulas and Usage: Return Last Two Zig Zag Reversal Values |
[2020-04-29 14:22:27] |
User355030 - Posts: 163 |
@tomgilb - That wont work because there is not 0"s separating the different values... The rows data will be like 2788,2788,2788,2788,2788,2700,2700,2700
|
[2020-04-29 14:31:05] |
User355030 - Posts: 163 |
Sorry @tomgilb I think you're right, something like this should workIF(X3>X4,X4,V4)
|
[2020-04-29 14:35:02] |
Sawtooth - Posts: 4170 |
something like this should workIF(X3>X4,X4,V4)
Yes, you just need to find the price transitions.
|
To post a message in this thread, you need to log in with your Sierra Chart account: