I'm using iCustom() to access values for ZigZag. It is not seeing values for low
ZigZag points. Here's the function:
double LastZZ, ZZarray;
ZZarray[i] = iCustom(NULL, 0, "ZigZag",ExtZZDepth,ExtZZDeviation,ExtZZBackstep,0,i);
This is about the 3rd way I've tried to look for the low zig zag points. The lows
should have a value equal to the low. This routine (and the others I tried before
it) all find the highs without difficulty, but they never see the lows, and skip
right past as if those bars have no zigzag value assigned.
Is there a problem with iCustom? Or ZigZag? Or my interpretation of them?
Was trying to use iCustom to save time, and now I'm wondering if it would've been
quicker to rebuild ZigZag within the EA.
Thanks for the help!
ZZarray[i] = iCustom(NULL, 0, "ZigZag",ExtZZDepth,ExtZZDeviation,ExtZZBackstep,0,i,0,1);
ZZarray[i] = iCustom(NULL, 0, "ZigZag",ExtZZDepth,ExtZZDeviation,ExtZZBackstep,0,i,1);
Thanks, Andrew, I may give that a try.
As far as 2 values, if you examine the ZigZag code, both values end up the same for a given point. It runs through and finds
the local highs and lows, then it goes back through again and keeps only the extremes
(if you have hi then a hi, then it only keeps the higher hi, and this ensures a
zig-zag, hi-lo-hi-lo pattern) and the last time through it sets both values to
the same value. So, both values inside of ZigZag both return the zig zag value
for a point. Any non-extreme bar will have zig zag value of zero. The extremes
will have zigzag value of their price. However, the lows are not showing up. Very
Thanks for the help, I'll look at sticking in extra parameters and such. I am probably
just going to have to build my own zigzag code, which I really was hoping wasn't
necessary after discovering iCustom. Hopefully the MQL4 folks will chime in and
show me my glaring error so I can fix it and move on!