Discussion of article "Universal ZigZag"

 

New article Universal ZigZag has been published:

ZigZag is one of the most popular indicators among the MetaTrader 5 users. The article analyzes the possibilities for creating various versions of the ZigZag. The result is a universal indicator with ample opportunities to extend its functionality, which is useful in the development of trading experts and other indicators.

For clarity, let us create an indicator that draws arrows when the indicator line changes direction (changes in the value of the DirectionBuffer buffer) and which places dots on the bars where the new High/Lows of the ZigZag had been registered (changes in the values of the LastHighBarBuffer and LastLowBarBuffer buffers). The code of this indicator will not be discussed in details, it can be found under the name of "iUniZigZagSWEvents" in the attachments. The indicator appearance is shown in the Fig. 8.

 
Fig. 8. The iUniZigZagSWEvents indicator

Author: Dmitry Fedoseev

Reason: