better Zig Zag

 
Is there anyone that is in possession code for any kind of indictor similar or the same as ZZ, which wouldn't omit the some highs/lows? and which would work on closed candles so it wouldn't change its past values(of ZZ).
 
Have you googled? There are lots of versions of ZigZag!
Reason: