Support Board
Date/Time: Thu, 28 Nov 2024 18:28:37 +0000
[Programming Help] - zig zag swings count
View Count: 493
[2023-04-06 23:34:29] |
whats1thingnow - Posts: 407 |
hi support or anyone else who might know, hope this finds you well is there a way to count how many zig zag swings there has been on the chart? interested in knowing the number of turning points for everyday, calculated by the zig zag indicator thanks |
[2023-04-07 07:00:45] |
Sierra_Chart Engineering - Posts: 17204 |
You can modify the Zig Zag study and add a count for this. 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 |
[2023-04-07 11:20:14] |
Sawtooth - Posts: 4120 |
is there a way to count how many zig zag swings there has been
You could also do it with the Spreadsheet Formula study, or a spreadsheet study.
|
[2023-04-07 20:18:56] |
whats1thingnow - Posts: 407 |
You could also do it with the Spreadsheet Formula study
thank you for your response! i don't think i can run a spreadsheet study as this instance is already running at higher ram and higher processing power compared to the other instances however, spreadsheet formula can do this? do you have a small example formula of what you are thinking? i can try to figure it out from there! thanks!! |
[2023-04-08 23:25:32] |
Sawtooth - Posts: 4120 |
Try this in the Formula field of the Spreadsheet Formula study: =IF(BARDATE>BARDATE[-1],0,IF(ID6.SG3>0,ID7.SG1[-1]+1,ID7.SG1[-1])) where ID6 is the Zigzag study, and ID7 is this Spreadsheet Formula study. This will reset at a new day, then count every ZZ reversal. |
[2023-04-10 16:22:39] |
whats1thingnow - Posts: 407 |
thank you @tomgilb solution works amazing and simple to implement!! thank you thank you thank you |
To post a message in this thread, you need to log in with your Sierra Chart account: