I have found a reference to this oscillator here: http://www.traderpedia.it/wiki/index.php/Formula_Relative_Volatility_Index_(RVI)
It is written in italian, but this is the translation:
“Confirmation indicator that highlights the trend. It is normally used to confirm RSI signals By examining volatility. The following formula comes from the article “The relative volatility index,” written by Dorsey, Donald, in June 93 Published by Technical Analysis of STOCKS & COMMODITIES. Category: Volatility Formula for MetaStock ™:
INIZIO FORMULE
§ RVI Down
((PREV*13)+If(ROC(C,1,%)<0,Stdev(C,10),0))/14
§ RVI Up
((PREV*13)+If(ROC(C,1,%)>0,Stdev(C,10),0))/14
§ RVI
(100*Fml(“§ RVI Up”))/(Fml(“§ RVI Up”)+Fml(“§ RVI Down”))
FINE FORMULE”
Can it be converted to PRT code?
Many thanks.
AVT replied here: https://www.prorealcode.com/topic/trading-the-5-min-bar/
I never used that oscillator before, nor I ever heard of it, will that code do?
I also found this: https://www.mql5.com/en/code/8035
Can anyhone translate it to PRT?
Thanks.
Roberto
Found this code in the prorealtime official website:
REM Relative Vigor Index (RVI) by John Ehlers
REM Paramètres : Per1 = période de la sommation (12 par défaut)
diff = close - open
ind1 = (diff + 2*diff[1] + 2*diff[2] + diff[3]) / 6
ind2 = (Range + 2*Range[1] + 2*Range[2] + Range[3]) / 6
cond = Summation[per](ind2)
IF cond = 0 THEN
temp = 0.0001
ELSE
temp = cond
ENDIF
RVI = Summation[per](ind1) / temp
RVIsig = (RVI + 2*RVI[1] + 2*RVI[2] + RVI[3]) / 6
RETURN RVI COLOURED (255, 0, 0) AS"Relative Vigor Index", RVIsig COLOURED (0, 0, 255) AS"Relative Vigor Index Signal"
Hi Nicolas,
Thanks for availing that code.
However, I’ve noticed that the “per” value is not defined.
Try 12 as below at Line 3
Per = 12 //période de la sommation (12 par défaut)