Welcome Forex EA downloads & MT4/MT5 auto-trading resources — EAs, Gold EAs, quant tools and real-world automation.
Sign In Sign Up

Heiken_Ashi_Smoothed_VolatilityStep - MetaTrader 5 script

author EAcpu | 2 reads | 0 comments |

Heiken_Ashi_Smoothed_VolatilityStep - indicator for MetaTrader 5

Original author:

A simple indicator that calculates the rounded volatility of a financial asset. Volatility is calculated in pips based on the highest and lowest prices of smoothed Heiken_Ashi candlesticks .

Volatility is calculated as the highest value minus the lowest value of a Heiken_Ashi_Smoothed candlestick. The resulting values ​​are converted to points and rounded according to the coordinate grid step size defined by the start level and level step input values.

 //+------------------------------------------------------------------------+
//| Indicator input parameters |
//+------------------------------------------------------------------------+
Enter Smooth_Method HMA_Method=MODE_JJMA; // Smoothing method
Input unit H length = 5 ; // Smoothing depth
Input integer phase = 100 ; // Smoothing parameter,
3//----For JJMA in the range of -100...+100, it affects the quality of the transition process;
//----For VIDIA, it is the CMO cycle, for AMA, it is the slow average cycle
Input integer shift = 0 ; // indicator moves horizontally (in bars)
Input unit Total levels = 20 ; //Number of levels
Input unit starting level = 100 ; // initial level
Input units level step = 100 ; // distance between levels
Input color level color = clr dark orange ; // level color

The indicator uses the SmoothAlgorithms.mqh library class (copy it to terminal_data_folder\MQL5\Include). The use of the class "Average price series for intermediate calculations without using additional buffers" is described in detail in the article.

Heiken_Ashi_Smoothed_VolatilityStep - indicator for MetaTrader 5

Figure 1. Volatility 2nd order indicator


Attachment download

📎 Heiken_Ashi_Smoothed_VolatilityStep.mq5 (16.49 KB)

📎 SmoothAlgorithms.mqh (130.2 KB)

Source: MQL5 #23205

Verification code Refresh