Volatility Changes - MetaTrader 5 Script | Forex Indicator Downloads - MT4/MT5 Resources - MetaTrader 5 Resources

There are many ways to measure volatility (variability). One of them is to calculate the standard deviation of returns over a certain period. Sometimes, current volatility over a short period (eg 6 days) is correlated with volatility over a longer period (eg 100 days). This indicator calculates the correlation between short volatility Vol_short and long volatility Vol_long:
Vol_change=Vol_short/Vol_long
The standard deviation here is not the difference between the closing prices, but the logarithm of the correlation between the closing price of the current day and the closing price of the previous day:
Mom[i]=Close[i]/Close[i+1]
Vol_k=Std(mother,k),
where k is the period of volatility change.
The indicator uses the SmoothAlgorithms.mqh library class (must be copied 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.
The indicator was first implemented in MQL4 and released in the code base on February 3, 2008.

Attachment download
📎 changeofvolatility.mq5 (7.48 KB)
📎 smoothalgorithms.mqh (133.8 KB)
Source: MQL5 #773
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •