• Overview
  • Reviews (3)
  • Comments (3)
  • What's new


This is an adaptive ZigZag based on modification of HZZ indicator (original source code is available in this article).

Most important changes in this version:

  • two additional indicator buffers added for zigzag evolution monitoring - they show cross signs at points where zigzag direction first changes;
  • zigzag range (H) autodetection on day by day basis;
  • time-dependent adjustment of zigzag range.


  • H - zigzag range in points; this parameter is similar to original HZZ, but it can take 0 value - in this case HZZM calculates current daily range of price and use it as H (it changes on every bar); default value - 0;
  • MinBars - number of bars to process; default value - 0 means all bars;
  • SaveData - enable/disable output of zigzag data to a file; default value - false;
  • Original - enable/disable original algorithm of HZZ; default value - false, that is the modified version is active; when it is true, the result is the same as original HZZ;

When Original is false, HZZM works in adaptive mode. It adjusts H according to number of bars passed since the last extremum. The larger the distance, the larger correction for H is made - H is decreased in a non-linear way. This means that longer (in time) zigzag edges can alter direction in shorter price move than usual.

The combination of H equal to 0 and the on-the-fly range adjustment produce an effect of adaptive processing similar to using several zigzags with different settings, when every set is suitable for specific market conditions.

Maksym Mudrakov
2016.08.31 17:02 

User didn't leave any comment to the rating

Rodrigo da Silva Boa
2015.11.24 03:21 

User didn't leave any comment to the rating

2014.07.06 02:25 

User didn't leave any comment to the rating

Version 1.5 - 2015.05.14
Indicator values are now displayed using digit number of a current symbol.
Version 1.3 - 2014.10.28
- Fixed "array out of range" error.
- Comments are disabled if the indicator is invoked from another indicator as resource.