Support Board
Date/Time: Mon, 25 Nov 2024 16:52:46 +0000
[User Discussion] - Swing High and Low using spreadsheets for automated trading
View Count: 435
[2024-02-25 08:32:15] |
aswade3451 - Posts: 19 |
I am attempting to create a condition that allows a short only if the last swing high is lower that the last swing high. How can I use the spreadsheet to save the value of the current swing high and prior swing high so that I can create a formula to compare them? Attached I supplied a Screenshot of what I am looking at as well as my spreadsheet... |
Screenshot 2024-02-25 002916.png / V - Attached On 2024-02-25 08:29:41 UTC - Size: 12.1 KB - 72 views Screenshot 2024-02-25 003017.png / V - Attached On 2024-02-25 08:30:34 UTC - Size: 42.56 KB - 55 views Attachment Deleted. |
[2024-02-25 14:38:46] |
Sawtooth - Posts: 4120 |
How can I use the spreadsheet to save the value of the current swing high and prior swing high
Use this example:Spreadsheet Example Formulas and Usage: Return Last Two Zig Zag Reversal Values |
[2024-02-27 00:27:12] |
aswade3451 - Posts: 19 |
Using that example code just copied the study values from the original cells to O3. I need every value > 0 to print on this line only. Unless I can compare the last value >0 to the previous value >0
|
Screenshot 2024-02-26 162337.png / V - Attached On 2024-02-27 00:24:28 UTC - Size: 18.81 KB - 43 views Screenshot 2024-02-26 162405.png / V - Attached On 2024-02-27 00:24:33 UTC - Size: 10.95 KB - 41 views |
[2024-02-27 01:05:51] |
Sawtooth - Posts: 4120 |
That example creates a persistent value of the most recent event, and the second most recent event, and brings both values to row 3, in columns O and P respectively, where you can compare them. Use a formula like this in O3: =IF(ID3.SG1@3 > 0, ID3.SG1@3, O4) Use a formula like this in P3: =IF(ID3.SG1@3 > 0, O4, P4) -where the Swing High and Low study is ID3. This is for the Swing High. Replicate in two other Formula Columns for the Swing Low. |
[2024-02-27 02:50:20] |
aswade3451 - Posts: 19 |
That code does work. I think I was getting confused because didn't have the second subgraph enabled Code used for swing highs (HH is the Cell for Swing high) =IF(HH3>0, HH3, O4) --- Cell O =IF(HH3>0, O4, P4)--- Cell P =IF(HH3>0, P4, Q4)--- Cell Q Code used for swing LOWS (HI is the Cell for Swing Low) =IF(HI3>0, HI3, R4)--- Cell R =IF(HI3>0, R4, S4)--- Cell S =IF(HI3>0, S4, T4)--- Cell T |
Screenshot 2024-02-26 184948.png / V - Attached On 2024-02-27 02:49:54 UTC - Size: 168.73 KB - 46 views |
To post a message in this thread, you need to log in with your Sierra Chart account: