Another zigzag version with a simple code that correctly determines peaks.
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/11419
The Exp_KaufWMAcross trading system is based on change of the trend direction displayed by the KaufWMAcross indicator.BvsB_HTF
The BvsB indicator with the timeframe selection option available in input parameters.