Bonjour à tous
Peux t’on faire ressortir cet indicateur avec une échelle de 0 à 100 afin de pouvoir l’intégrer avec un autre ?
//PRC_Volatility Cycle | indicator
//02.12.2016
//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)[1]
lowindex = lowest[InpBandsPeriod](StdDev)[1]
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
endif
endif
RETURN VolSmooth as "Volatility Cycle"
En remplaçant la dernière ligne par :
RETURN (VolSmooth*100)+100 as "Volatility Cycle"
ça devrait coller à ta demande.
Merci beaucoup Nicolas, ça marche nickel !
graphe joint
Bonne soirée