Change of volatility

Category: Indicators By: Nicolas Created: August 5, 2020, 8:19 AM
August 5, 2020, 8:19 AM
Indicators
0 Comments

There are a lot of ways to measure volatility (changeability). One of them is calculation of the standard deviation of returns for a certain period of time. Sometimes the current volatility on a short period of time (for example, 6 days) is correlated with volatility of a larger period (for example 100 days). This indicator calculates the correlation of a short volatility Vol_short and a long volatilityVol_long. Vol_change=Vol_short/Vol_long

Standard deviation here is not that from a difference of closing prices, but from logarithms of the correlation of the current day closing price and closing price of a previous day: Mom[i]=Close[i]/Close[i+1].

Vol_k=Std(Mom,k),
where k is the period of volatility change.

(description from the author)

Indicator of volatility converted following a request in the indicators forum section.

//PRC_Change of Volatility | indicator
//05.08.2020
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//converted from MT4
//https://www.prorealcode.com/topic/conversion-of-indicator-change-of-volatility-from-mt4/

// --- settings 
Short      = 6
Long       = 100
SigMA      = 15
SigMAMode  = 2 //0 = SMA 1 = EMA 2 = WMA 3 = Wilder 4 = Triangular 5 = End point 6 = Time series 7 = Hull (PRT v11 only) 8 = ZeroLag  (PRT v11 only)
// --- end of settings 

Moment=Momentum[1](close)/100
HVBuffer=std[Short](Moment)/std[Long](Moment)
Ma = average[SigMA,SigMAMode](HVBuffer)

return HVBuffer coloured(255,0,0) style(histogram), Ma coloured(255,255,0) style(line,1)

 

Download
Filename: PRC_Change-of-Volatility.itf
Downloads: 170
Nicolas Master
I created ProRealCode because I believe in the power of shared knowledge. I spend my time coding new tools and helping members solve complex problems. If you are stuck on a code or need a fresh perspective on a strategy, I am always willing to help. Welcome to the community!
Author’s Profile

Comments

Logo Logo
Loading...