make a zigzag indicator with only a point shift from the current price on the last low / high

 

Hallo everybody . i want to make the zig zag indicator with only a point shift from the current price on the last low / high so i don't know how to integrate this condition in zigzag . Please can you help me. you can look my exemple if you don't understand my explanation. Thanks

Files:
zigzag.png  76 kb
Reason: