Find out if the previous Zig Zag was below average at that point in the past and not at the current point in time.
-
Hi friends I want to identify if the previous zig zag was below average at that moment and not at the current moment.
I realize that if I create a rule where I want to check if the previous high zig zag is below average then it is actually looking at the current price of the average against the price of the previous altar zig zag and the average moves down and crossing his price down.
Knowing that that previous zig zag was formed below average would be enough.Can anyone guide me on how to do this correctly?

@miro1360 You are very good at this, can you help me?
-
@ontradingx H0 is current if on way up, L0 is last low (almost fixed but will occasionally repaint), H1,L1,H2,L2 etc are the points before, reverse for when L0 is on the way down.
-
@jstap Thanks my friend for wanting to help me.
I understand about identifying who's who.
The problem is that I have a condition that looks at whether the previous zig zag (was) at that time below or above average.
If you look, imagine that I'm at the exact moment a L0 zig zag formed, so right now I want to know if the H0 zig zag (was/in the past) below average, not if it (is/in the current moment).
If I observe it is evident that it was below average in the past, but if we create a rule to verify it will accuse that the zig zag is above average because it is looking at the (current) average price that is already below the price of the zig zag h0.
Did you understand? -
@ontradingx In the picture your arrows point at H3, by average you mean the moving average? The L0,L1 etc will give you the price value, Miros code will give you the candle ID so you can compare candle H/L to the MA.
-
@jstap That's right, I need to compare the candle id of the zig zag with that of the moving average, and know if at that exact moment it was actually below.
Where is this code? -
@ontradingx Get @miro1360 code, if on mt5 it is in the comments, this will give you the candle ID variable to use in a condition block.