Understanding the Heiken Ashi Smoothed VolatilityStep Indicator for MetaTrader 5

Mike 2019.01.02 23:35 54 0 0
Attachments

Original Author: Eva Ruft

The Heiken Ashi Smoothed VolatilityStep indicator is a straightforward tool designed to measure the rounded volatility of financial assets. This indicator computes volatility in points, based on the highest and lowest prices of smoothed Heiken Ashi candlesticks.

To calculate volatility, we take the difference between the High and Low of the Heiken Ashi Smoothed candlesticks. The resulting value is then converted into points and rounded according to the grid step defined by the StartLevel and LevelsStep input parameters.

//+----------------------------------------------+//|  INDICATOR INPUT PARAMETERS                  |//+----------------------------------------------+input Smooth_Method     HMA_Method=MODE_JJMA;      // Smoothing methodinputuint              HLength=5;                 // Smoothing depth                    inputint               HPhase=100                // Smoothing parameter,//---- for JJMA within the range of -100 ... +100, it influences the quality of the transition process;//---- for VIDIA it is a CMO period, for AMA it is a slow average periodinputint               Shift=0                   // horizontal indicator shift in barsinputuint              LevelsTotal=20            // number of levelsinputuint              StartLevel=100            // initial levelinputuint              LevelsStep=100            // distance between levelsinputcolor             LevelsColor=clrDarkOrange; // color of levels

This indicator utilizes the SmoothAlgorithms.mqh library classes, which you can find by copying it to your terminal data folder at MQL5\Include. For a detailed explanation of how to use these classes, check out the article "Averaging Price Series for Intermediate Calculations Without Using Additional Buffers".

Fig.1. Volatility2Step indicator

Fig.1. Volatility2Step indicator

List
Comments 0