Ideally you should move with price. of price has moved up, start fib from down and move up and vice verca.
But it doesnt matters which way you draw it as the fib levels are symmetric. the 37% level becomes 63% when drawn other way and vice verca. 50% level remains the same in drawing both ways.
Thanks for the reply, I need to show the relative number so I know the position of the current price quickly. So 10 or 90 it is not so important, but if you determine the direction of the previous zigzag then you can know it is exactly 10 or 90.
As an example I have a fibonacci line with zigzag and know the exact position of the price, but I need a return function so I can set up a dashboard so I can see quickly without opening each chart.
I have used two simple functions that return the highest and lowest values of the zigzag line, but they don't seem to work.
   double zz1 = iCustom(NULL,0,"ZigZag",Depth,Deviation,Backstep,1,i);
   double zz2 = iCustom(NULL,0,"ZigZag",Depth,Deviation,Backstep,2,i);