How create a ZigZag on Ticks (chart)

Hi all,

I would like to insert the zigzag lines on a ticks on chart indicator.

I tried with the classic zigzag but the code only fits with the High Low prices!

I'm realy lost, could you help me?

Thanks in advance,
Fabiano

Files:

Thank you for help but I looking for a simple function ;)