Login Page - Create Account

Support Board


Date/Time: Thu, 13 Nov 2025 07:54:36 +0000



Post From: Question on Zig Zag codes for alert conditions

[2025-09-25 18:49:06]
LongShortz - Posts: 26
Let me see if I can articulate this......

What I am trying to do is use two zig zags for structural analysis. Basically I'm using a smaller range zig zag to confirm trends on the higher range zig zag. I'm not a great coder so for this I am just using a 'Color Bar Based on Alert Condition' indicator to find structural entries with strong delta confirmation. Those structural entries would be identified wherever the higher range has already set a lower high and the lower range is confirming with its own lower high (or vice versa for longs). The problem I'm running into is that the confirmation on the lower range is almost never going to be in the same place as the higher ranges structural swing. Is there a way to configure a statement in the indicator that looks at whatever the last swing value was on the higher range?

Below is an example line of code that I might use for something like this. ID14 and ID35 are the low and high range zig zags respectively. The code value 3 represents higher low. However, this statement would require both zig zags to throw a value of 3 on the same candle. What I need is a way to say "ID35.SG2's last know value was 3" no matter how far back that value was thrown.

If what I've written above makes sense (LOL), is there a way to do this?

AND(ID5.SG1 > 500 , ID14.SG2 = 3 , ID35.SG2 = 3 , C > O)