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.
Parameters:
- 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.
![图片[1]-HZZM 外汇EA-EA侦探社 - 全球领先的MQL5官网外汇EA机器人MT4自动化交易EA资源免费分享网站](https://sp-ao.shortpixel.ai/client/to_webp,q_glossy,ret_img/https://www.mql5.vip/wp-content/uploads/2024/05/20240514162928-66439168cc0f6.gif)
 ![图片[2]-HZZM 外汇EA-EA侦探社 - 全球领先的MQL5官网外汇EA机器人MT4自动化交易EA资源免费分享网站](https://sp-ao.shortpixel.ai/client/to_webp,q_glossy,ret_img/https://www.mql5.vip/wp-content/uploads/2024/05/20240514162929-6643916916df3.gif)
 
© 版权声明
文章版权归作者所有,未经允许请勿转载。
THE END


























































