zigzag differs from most indicators in that for the large precentage of time it's value is 0, with only an occassional non-zero number..... that renders it almost unusable in the standard iCustom form.....

// ---> zig = iCustom(NULL,0,"ZigZag",15,5,3, 0, i);

to be useful you almost certainly will have to create an array to store all the "non-zero" numbers..... such as;

if(zig>0)
{
zag[n] = zig;
}

then you can do the common

if(zag[1] > zag[2]) // do this

else // or

if(zag[1] < zag[2]) // do that


//------------