ZigZag difference

There are differences between the Zig function implementations.

Because the Zig function is used by Peak, PeakBars, Trough and TroughBars function, these functions are affected too.

Example: Zig(Open,15);

It seems that AmiBroker is wrong. Look at the next pictures. Apparently there is more than 15% peak in the price on 2012-03-16. But it is not shown as the peak by AmiBroker.

Figure 2. AmiBroker ZIG


Figure 3. Seetu ZIG