Standard realization of ZigZag is taken for base of the indicator.
From each node is drawn MA with increasing period.
For example:
"A" is a node of ZigZag.
ZMA[A]=Price_close[A],
ZMA[A+1]=(Price_close[A]+Price_close[A+1])/2,
ZMA[A+2]=(Price_close[A]+Price_close[A+1]+Price_close[A+2])/3 and etc.
Download:
MQ4/MT4 version.
viewtopic.php?f=17&t=3485
The indicator was revised and updated