The volatility cycle indicator measure differences between current standard deviation of the price and its highest and lowest within the last “InpBandsPeriod” bars. It results of a bounded oscillator that can be read as:
- oscillator is low, expect a volatility explosion in the next periods or the end of the current trend
- oscillator is high, a trend is currently forming
The curve can be smooth much more to avoid false signals but with more lag.
This technical indicator should be used with other ones to confirm its information.
//PRC_Volatility Cycle | indicator
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
//converted and adapted from Metatrader4 version
InpBandsPeriod=18 // Period
Smooth=2 // Smoothness
StdDev = std[InpBandsPeriod](close)
highindex = highest[InpBandsPeriod](StdDev)
lowindex = lowest[InpBandsPeriod](StdDev)
if barindex>InpBandsPeriod then
VolDer = (StdDev-highindex)/(highindex-lowindex)
VolSmooth = average[Smooth](VolDer)
if VolSmooth>0 then
VolSmooth = 0
elsif VolSmooth<-1.0 then
VolSmooth = -1.0
RETURN VolSmooth as "Volatility Cycle"
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.ProRealTime ITF files and other attachments :