Login Page - Create Account

Support Board


Date/Time: Thu, 25 Apr 2024 23:11:13 +0000



How to Refer to Zigzag Previous Leg Mid line?

View Count: 1882

[2017-02-26 23:18:34]
User268363 - Posts: 10
I'd like to create an alert when price gets near previous zigzag leg mid line(50% retracement), but I don't seem to be able to refer to previous zigzag leg mid line. I tried SG1.ID7 and SG1.SG7[-1] and both only refer to current zigzag leg mid line. Could you please let me know how to refer to the previous zigzag leg mid line? Much appreciated!
[2017-02-27 04:21:51]
Sierra Chart Engineering - Posts: 104368
It is SG7[-1] . This is all you need to use when setting an Alert Condition Formula on the zig zag study.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2017-02-27 05:30:08]
Sawtooth - Posts: 3976
It's not possible to reference the previous ZZ leg's mid line value with a Simple Alert formula, but it could be done with a formula in the Spreadsheet Study study.
[2017-02-27 06:05:01]
Sierra Chart Engineering - Posts: 104368
We apolgize. We had not paid close enough attention to you wanting the prior Zig Zag midpoint, especially with the incorrect references given in post #1.
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, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2017-02-27 21:51:17
[2017-02-27 21:03:17]
User268363 - Posts: 10
Thanks Tom! I've never created a formula in the spreadsheet study,so could you please tell me what's the formula I should use for that?
[2017-02-28 01:32:39]
Sawtooth - Posts: 3976
It would take various formulas in several columns, depending on what you want. Attached is an example.

-Put both attached files in your Sierra Chart \Data folder.
-Move your existing Zig Zag study to the top of the Studies to Graph list.
-In your Zig Zag study's settings, set 'Additional Output for Spreadsheets' to Yes.
-Go to Analysis >> ZZ mid line alert+ and choose 'No' when asked 'Clear Existing Studies on Chart?'

The attached will alert when price approaches the previous ZZ mid line and is n ticks from it.
Use cell H2 on the spreadsheet to choose the offset.
Alerts are set on the Settings and Inputs tab, not on the Alerts tab
Alerts for approach from below mid line are in Column K
Alerts for approach from above mid line are in Column M

Edit: uploaded corrected spreadsheet file

Date Time Of Last Edit: 2017-02-28 23:03:58
attachmentZZ mid line alert+.StdyCollct - Attached On 2017-02-28 01:30:51 UTC - Size: 9.4 KB - 303 views
attachmentZZ mid line alert.scss - Attached On 2017-02-28 23:02:33 UTC - Size: 130.36 KB - 290 views
[2017-02-28 21:11:33]
User268363 - Posts: 10
Thank you so much Tom! I really appreciate it.

I put it on my chart and tested it out, and the alerts works. Beautifully done. But I noticed sometimes when price comes near 50% retracement of previous leg, there's no alert. Tried different zigzag setting on different type of chart, still no alert. Then I figured out the reason: say when there's a big zigzag down leg, the pink mid line will show up initially for the big down leg,but as price retraces, the pink alert line got moved to the recent up move leg mid line instead. I guess it's just the way zigzag leg is calculated. Tom, if it's not too much trouble, could you please add the mid line alert for the zigzag leg before the previous leg? I went through your spreadsheet trying to figure it out myself, but couldn't :)
[2017-02-28 22:24:22]
Sawtooth - Posts: 3976
I found an error. The formula in cell M3 should be:
=AND(AA3=0,O3>0,D3>Q3,D3-Q3<$H$2*$J$21)

Please explain again what you'd like me to add.
Do you want the mid line and colored price bars on all previous legs?
[2017-02-28 23:40:32]
User268363 - Posts: 10
Hi Tom,I tried to copy and paste the new formula in the sell, but it seems that I couldn't edit it. Not sure it's that I need to do something first to edit it, or the spreadsheet just can't be edited? I was trying to figure out why some of the alerts are missing, and thought maybe it's the leg before previous leg that I needed(leg[-2] :)), but maybe the new formula will fix that problem.

Thank you so much for your help. Since I have your attention, I have to ask you this- I've always wished the zigzag study can show the 61.8% retracement line, as 50% retracement is the entry, and 61.8% is the stop and I manually draw that level on every leg. Is it possible that you could create a 61.8% retracement line and set an alert for that? That will be a big help. :)
[2017-03-01 00:11:54]
Sawtooth - Posts: 3976
Sierra Chart spreadsheets have a different user interface than Excel. To edit a cell, focus the cell, press Enter, edit, press the OK button.

But you don't need to edit the cell if you download the corrected version in post #6.

Yes, it's possible to draw a 61.8% retracement line of a ZZ leg using a spreadsheet formula.
Contact me here and we'll dialog more about it:
http://www.sawtoothtrade.com/contact.html

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

Login

Login Page - Create Account