Nonparametric Zig Zag, A-la Clyde Lee Patterns – indicator MetaTrader 5

Nonparametric Zig Zag, A-la Clyde Lee Patterns
The upward ZigZag segment starts when bullish (rising) patterns for High and Low has appeaed on the current bar. The same is for the downward ZigZag segments. The ZigZag line (ZigZagLineBuffer) is plotted starting from the beginning of the segment up to begining of the opposite segment. The number under the bar indicates the pattern