ZigZag Question

 
Does anyone have an Idea how I can modify the ZigZag inidcator to use the number of pips between the Highs and Lows to determine which highs and lows are used to draw the ZigZag?

Thank You for your Time
EK
Reason: