Nonparametric zigzag. The monotonicity condition for the ascending segment of the zigzag: the High of any subsequent bar must not be lower than any Low of the ascending segment. Similarly, for the descending segments of the ZigZag.
The ZigZag line (ZigZagLineBuffer) is plotted from the lowest High to the highest Low and vice versa. The "outer" extermums are marked with blue and red lines (HighBuffer and LowBuffer). The arrows ordering may be "wrong" (two consecutive red or two blue arrows may appear).
The indicator doesn't repaint.
I think that this ZigZag can be used to convert the chart into the segments for further analysis.
Translated from Russian by MetaQuotes Software Corp.
Original code: https://www.mql5.com/ru/code/278
Nonparametric ZigZag, based on the "a-la Clyde Lee Patterns".A la "Bobsley" Expert Advisor
The Expert Advisor uses the Moving Average and Stochastic indicators.
This is the simplified implementation of multicurrency mode in MetaTrader 5. It isn't necessary to consider the details how does it work. It has minimum settings and simple structure. It can be used in Strategy Tester.eKeyboardTrader
The Expert Advisor allows to trade using the keyboard.