Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Indicator | Chaikin_Volatility_Histogram

Chaikin volatility indicator as a colored histogram.

//+-----------------------------------+  //|  INDICATOR INPUTS                 |  //+-----------------------------------+  input Smooth_Method XMA_Method=MODE_EMA_;//smoothing method  input int XLength=10;                    //smoothing depth                      input int XPhase=15;                     //smoothing parameter,  //---- For JJMA, changing within -100 ... +100, affects the transient process quality;  //---- For VIDIA this is CMO period, for AMA this is a slow average  input uint ROCPeriod=10;                 //second smoothing depth   input uint HighLevel=50;                 // highest volatility level  input uint MiddleLevel=20;               // medium volatility level  input uint ZeroLevel=0;                  // zero volatility level  input int LowLevel=-20;                  // minimum volatility level  input int Shift=0;                       // indicator horizontal shift in bars  

The indicator uses the classes of the SmoothAlgorithms.mqh library. Working with that class was described in details in the article "Averaging Price Series for Intermediate Calculations Without Using Additional Buffers".

MetaTrader Experts, Indicators, Scripts and Libraries

Fig. 1. Chaikin_Volatility_Histogram indicator

21498