Movatterモバイル変換


[0]ホーム

URL:


Relative Volatility Index (RVI)

1. Introduction

TheRelative Volatility Index (RVI) is a technical indicator designed to measure the direction and magnitude of volatility. Unlike other volatility indicators that focus solely on the level of price fluctuations (such as Bollinger Bands or ATR), the RVI incorporates the trend direction, making it a valuable tool for identifying potential trade opportunities.

Developed in 1993 by Donald Dorsey, the RVI is often used in combination with trend-following indicators to confirm signals. It resembles the Relative Strength Index (RSI) but instead of measuring price momentum, it focuses onvolatility direction.

2. Calculating the RVI

The RVI is calculated based on the standard deviation of price changes, smoothed over a predefined period. Here’s the step-by-step process:

  1. Standard Deviation Calculation:

    • The indicator computes thestandard deviation (σ) of price over a selected period.
    • The standard deviation can be calculated using either thepopulation orsample method.
  2. Directional Volatility Components:

    • If the closing price of the current bar is higher than the previous close, the volatility is consideredpositive.
    • If the closing price is lower, the volatility isnegative.
  3. Smoothing the RVI:

    • The RVI is obtained by smoothing the ratio of positive volatility to total volatility over a set period.

The formula for the RVI is:

Values range from 0 to 100, where higher values indicate stronger upward volatility, and lower values signal downward volatility.

3. Configuration and Parameters

The RVI can be customized using several key parameters:

  • Standard Deviation Length (stdevLength): Defines the period for the standard deviation calculation (default: 10).
  • Smoothing Length (smoothLength): Defines the period used to smooth the RVI calculation (default: 14).
  • Overbought Level (obLevel): A predefined level where volatility suggests an overbought market (default: 80).
  • Oversold Level (osLevel): A predefined level where volatility suggests an oversold market (default: 20).
  • Moving Average Length (maLengthInput): Optional smoothing with a moving average (default: 14).
  • Bollinger Bands Activation (useBB): Allows the addition of Bollinger Bands around the RVI.

4. Interpretation and Trading Strategies

How to Use the RVI in Trading?

The RVI is commonly used to confirm trend strength and identify potential reversals:

  • Trend Confirmation:

    • A rising RVI suggests increasing bullish volatility, confirming an uptrend.
    • A falling RVI suggests increasing bearish volatility, confirming a downtrend.
  • Overbought/Oversold Signals:

    • If the RVI crosses above80, it may indicate an overbought condition.
    • If the RVI drops below20, it may signal an oversold condition.
  • Divergences:

    • If price makes anew high, but the RVI fails to do so, abearish divergence may indicate weakening momentum.
    • If price makes anew low, but the RVI remains stable or rises, abullish divergence may signal a potential reversal.

Strategy Ideas Using the RVI

  1. RVI + Moving Average:

    • Use amoving average of the RVI to filter out noise.
    • Buy when the RVI crosses above its moving average.
    • Sell when the RVI crosses below its moving average.
  2. RVI + Bollinger Bands:

    • If the RVI moves outside theupper Bollinger Band, it signals extreme bullish volatility.
    • If the RVI moves outside thelower Bollinger Band, it signals extreme bearish volatility.
  3. Breakout Confirmation:

    • Highlight breakouts by coloring the area where the RVI crosses key levels.
    • If RVI crosses above 80and price breaks resistance, it confirms strong bullish momentum.

5. Implementation in ProRealTime

The RVI can be programmed inProRealTime’s ProBuilder language, ensuring flexibility in customization. The implementation follows these key steps:

  1. Compute the standard deviation using the selected calculation method.
  2. Determine directional volatility (upward or downward).
  3. Apply smoothing to refine the final RVI value.
  4. Optionally, add a moving average andBollinger Bands for additional analysis.
  5. Visualize the indicator with color-coded levels to highlight overbought and oversold zones.

The ProBuilder code follows these principles and allows easy parameter adjustments.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
//------------------------------------------------------//
//PRC_RVI relative volatility Index
//version = 0
//06.02.2025
//Iván González @ www.prorealcode.com
//Sharing ProRealTime knowledge
//------------------------------------------------------//
// Inputs
//------------------------------------------------------//
stdevLength=10
stdevType=1//boolean variable 1 means Population
smoothLength=14
obLevel=80
mdLevel=50
osLevel=20
highlightBreakouts=1//boolean variable
maTypeInput=0
maLengthInput=14
useBB=1
bbMultInput=2
src=close
//------------------------------------------------------//
// Standard deviation calculation
//------------------------------------------------------//
//Type=1 Population else Sample
ifstdevType=1then
selectedStdev=STD[stdevLength](src)
else
dev=src-average[stdevLength](src)
variance=summation[stdevLength](pow(dev,2))/(stdevLength-1)
selectedStdev=sqrt(variance)
endif
//------------------------------------------------------//
// RVI original version (1993)
//------------------------------------------------------//
up=(src>=src[1])*selectedStdev
down=(src<src[1])*selectedStdev
 
upsum=average[smoothLength,1](up)
downsum=average[smoothLength,1](down)
 
rvi=100*upsum/(upsum+downsum)
//------------------------------------------------------//
// Moving average
//------------------------------------------------------//
maRVI=average[maLengthInput,maTypeInput](rvi)
ifuseBBthen
bbUpperband=maRVI+std[maLengthInput](rvi)*bbMultInput
bbLowerband=maRVI-std[maLengthInput](rvi)*bbMultInput
endif
//------------------------------------------------------//
// Plot
//------------------------------------------------------//
//---Rvi color
ifrvi>oblevelthen
r=14
g=187
b=35
elsifrvi<oslevelthen
r=255
g=0
b=0
else
r=244
g=183
b=125
endif
//---HighlightBreakouts
ifrvi>oblevelandhighlightBreakoutsthen
rob=0
gob=255
alphaob=40
else
alphaob=0
endif
ifrvi<oslevelandhighlightBreakoutsthen
ros=255
gos=0
alphaos=40
else
alphaos=0
endif
colorbetween(100,oblevel,rob,gob,0,alphaob)
colorbetween(0,oslevel,ros,gos,0,alphaos)
//------------------------------------------------------//
returnrvias"RVI"coloured(r,g,b)style(line,2),maRVIas"MA RVI"coloured("blue"),oblevelas"Overbought Level"coloured("black")style(dottedline),oslevelas"Oversold Level"coloured("black")style(dottedline),mdLevelas"MidLevel"coloured("black")style(dottedline),bbUpperbandas"BBUp"coloured("blue")style(dottedline),bbLowerbandas"BBDn"coloured("blue")style(dottedline)

6. Conclusion

TheRelative Volatility Index (RVI) is a powerful tool that provides insight into thedirection of volatility, helping traders confirm trends and identify reversals. While it should not be used in isolation, combining it withmoving averages, Bollinger Bands, or other momentum indicators can enhance its effectiveness.

Share this

Risk disclosure:

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 :How to import ITF files into ProRealTime platform?

Find other exclusive trading pro-tools onProRealCode Marketplace

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

avatar
115 days ago

88 posts • 163 Followers
avatar
115 days ago

88 posts • 163 Followers
avatar
Register orLogin

Likes

avataravataravatar
Related users ' posts
avatar
VioletIvan, it looks as if something is really wrong with this indicator. When I import and apply ...
avatar
IvánHello! For proper visualization, it is recommended to have more than 1k bars loaded.
avatar
VioletThanks Ivan. Though it does not remove the 'tapering at the beginning' phenomenon, it does m...
avatar
lkiklkikthanks for the hard work and sharing
avatar
LucasBestThanks for the translation. This one can be compared to dynamic zone RSI
avatar
sam00075Accuracy is on point.
avatar
Mubin1308Bonjour à tous,J'ai importé le fichier mais ça ne marche pas, rien qui s'affiche. Pourriez...
avatar
NicoGB67Excelente trabajo!!
avatar
JrmjrmBonsoir est-il possible d'avoir cet indicateur, mais à la place du Wilder Average, utiliser ...
avatar
geronimanmerci Ivan, super indicatuer. Les cours vont souvent toucher 50% des zones vertes ou rouges....
avatar
IvánPour ajouter une ligne supplémentaire, il suffit de créer une nouvelle variable, par exemple...
avatar
Maurizio A.excellent indicateur ! comment puis-je modifier le code pour afficher uniquement les dernier...
avatar
IvánHi! just change line13 for this:showsignals=1
avatar
QuinoHi Excellent indicator as usual. Just 2 questions:Why LenH and LenL = 15 as Len could be...
avatar
IvánHi! good question. This is a code request traslation from other platform. I took same inputs...
avatar
P. MarloweMuy bueno. ¿Podría hacerse para señalar extremos por el lado bajista? Lo mismo a la inversa....
avatar
MiroEsta es una versión del indicador, para ambos extremos. //-------------------------------...
avatar
P. MarloweMuchas gracias ¡¡
avatar
luxrungrazie Ivàn!
avatar
leeThank you. Is it possible to convert this to a screener that displays instruments when bulli...
avatar
Iván//---------------------------------------------------------------////PRC_Pollan Indicator/...
avatar
FaisalxChatGPTHola Iván. Gracias por tu excelente trabajo.Te agradecería si pudieras echarle un...
avatar
Ivánok, perfecto! me pongo con ello
avatar
sam00075Tried it the last two days, accuracy is impressive.
avatar
IvánAllora crei un nuovo post. Lo aspetterò.
avatar
StenozarCiao Ivan, ho inserito il post con la richiesta di traduzione. Se puoi vedere, grazie!
avatar
Ivánperfect!
avatar
IvánHi,Sorry, but what do you mean?
avatar
luiskohnenHola, queria saber si el indicador repinta, porque a mi me parecio que si. Saludos y gracias...
avatar
DiamantBonsoir,L'un d'entre vous peut-il me donner les définissions de LL-HH-LH et HL. Merci d'av...
avatar
larouedegannTIMEFRAME(15minutes) apparemment ne fonctionne pas
avatar
IvánBonjourJe ne comprends pas bien le problème. L'indicateur fonctionne dans n'importe quelle...
avatar
larouedegannOUI je le sais, il fonctionne dans toutes les unités de temps. Mais je souhaite utiliser l'i...

Top
Trading on leveraged financial instrumentsmay expose you to risk of loss greater than your deposits and is only suitable for experienced clients with the financial means to bear such risk.Trading on foreign exchange instruments (Forex) and contracts for difference (CFDs) is highly speculative and particularly complex and comes with a high level of risk due to leverage. You must ensure that you understand how these instruments work and that you can afford to take the high risk of losing your money. No information on this site is investment advice or a solicitation to buy or sell any financial instruments.
|contact@prorealcode.com | Copyright © 2016-2025 ProRealCodeprorealcode icon
 contact@prorealcode.com
We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok

[8]ページ先頭

©2009-2025 Movatter.jp