NexusFi: Find Your Edge


Home Menu

 





Relative Volatility Index


Discussion in Traders Hideout

Updated
      Top Posters
    1. looks_one Fat Tails with 3 posts (3 thanks)
    2. looks_two Srq1 with 2 posts (0 thanks)
    3. looks_3 Quick Summary with 1 posts (0 thanks)
    4. looks_4 rmejia with 1 posts (1 thanks)
    1. trending_up 4,958 views
    2. thumb_up 4 thanks given
    3. group 3 followers
    1. forum 7 posts
    2. attach_file 2 attachments




 
Search this Thread

Relative Volatility Index

  #1 (permalink)
 Srq1 
Sarasota, Fla
 
Experience: Beginner
Platform: Ninja Trader ,Tos
Broker: NinjaTrader Brokerage
Trading: NQ MNQ MES ES
Posts: 63 since Mar 2012
Thanks Given: 226
Thanks Received: 25

Hello guys:
I don't seem to find a tread about RVI (relative volatility Index), I use it on TOS charts but the Ninja trader does not match/equal to TOS, both at 14 /period, both on the 5 min chart.
Thank you in advance for your opinion and suggestion.
Srq1

Started this thread Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Futures True Range Report
The Elite Circle
ZombieSqueeze
Platforms and Indicators
Exit Strategy
NinjaTrader
New Micros: Ultra 10-Year & Ultra T-Bond -- Live Now
Treasury Notes and Bonds
The space time continuum and the dynamics of a financial …
Emini and Emicro Index
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Get funded firms 2023/2024 - Any recommendations or word …
65 thanks
Funded Trader platforms
42 thanks
Battlestations: Show us your trading desks!
25 thanks
NexusFi site changelog and issues/problem reporting
23 thanks
The Program
20 thanks
  #3 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


They are in fact slightly different.

To understand the difference, I would need to to see the thinkscript formula for the RVI.

Could anyone please publish the formula here?

Reply With Quote
  #4 (permalink)
 
rmejia's Avatar
 rmejia 
Puerto Rico
 
Experience: Intermediate
Platform: thinkorswim
Broker: TD Ameritrade
Trading: Options
Posts: 379 since Oct 2010
Thanks Given: 3,614
Thanks Received: 441


Fat Tails View Post
They are in fact slightly different.

To understand the difference, I would need to to see the thinkscript formula for the RVI.

Could anyone please publish the formula here?

Here is the thinkscript:

Relative Volatity Index
 
Code
#
# TD Ameritrade IP Company, Inc. (c) 2008-2015
#

declare lower;

input length = 14;

def highPrice = stDev(high, 10);
def lowPrice = stDev(low, 10);

def highAvgUp = ExpAverage(if high > high[1] then highPrice else 0, length);
def highAvgDown = ExpAverage(if high < high[1] then highPrice else 0, length);

def lowAvgUp = ExpAverage(if low > low[1] then lowPrice else 0, length);
def lowAvgDown = ExpAverage(if low < low[1] then lowPrice else 0, length);

def highRVI = 100 - 100 / (1 + highAvgUp / highAvgDown);
def lowRVI = 100 - 100 / (1 + lowAvgUp / lowAvgDown);

plot RVI = (highRVI + lowRVI) / 2;
plot OverBought = 70;
plot OverSold = 30;

RVI.setDefaultColor(GetColor(1));
OverBought.setDefaultColor(GetColor(5));
overSold.setDefaultColor(GetColor(5));

Reply With Quote
Thanked by:
  #5 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102


rmejia View Post
Here is the thinkscript:

Relative Volatity Index
 
Code
#
# TD Ameritrade IP Company, Inc. (c) 2008-2015
#

declare lower;

input length = 14;

def highPrice = stDev(high, 10);
def lowPrice = stDev(low, 10);

def highAvgUp = ExpAverage(if high > high[1] then highPrice else 0, length);
def highAvgDown = ExpAverage(if high < high[1] then highPrice else 0, length);

def lowAvgUp = ExpAverage(if low > low[1] then lowPrice else 0, length);
def lowAvgDown = ExpAverage(if low < low[1] then lowPrice else 0, length);

def highRVI = 100 - 100 / (1 + highAvgUp / highAvgDown);
def lowRVI = 100 - 100 / (1 + lowAvgUp / lowAvgDown);

plot RVI = (highRVI + lowRVI) / 2;
plot OverBought = 70;
plot OverSold = 30;

RVI.setDefaultColor(GetColor(1));
OverBought.setDefaultColor(GetColor(5));
overSold.setDefaultColor(GetColor(5));


That explains the difference.

The ThinkScript formula uses the standard smoothing constant for the exponential moving averages. However, the correct RVI formula uses Wilder's average for smoothing.

The difference between exponential and Wilder's moving average is the smoothing constant. Here is a way to calculate the RVI periods from the (higher) TOS-period:

RVI-period = (1 + TOS-period)/2

For example a TOS-period of 14 would result in a correct RVI-period of 7.5 (which does not exist). Therefore you need to settle for 7 or 8.

TOS-period = 2 * RVI-period - 1

For example the original default period of 14 for the RVI can be converted to a TOS-period of 27.

NinjaTrader follows the original concept. The Thinkscript solution is equivalent, if you change the parameter.

Reply With Quote
Thanked by:
  #6 (permalink)
 Srq1 
Sarasota, Fla
 
Experience: Beginner
Platform: Ninja Trader ,Tos
Broker: NinjaTrader Brokerage
Trading: NQ MNQ MES ES
Posts: 63 since Mar 2012
Thanks Given: 226
Thanks Received: 25

Fat Tails thank you for helping me with the RSI difference , like you said was on the different periods TOS and NT uses, now I can adjust NT to work like TOS.
Maybe you can point me on steps to add alerts or arrows when it hits 70 or 30 levels?
Appreciate your help
By the way, I have not been able to find much about RSI on futures.io , wonder why, not a reliable indicator to watch?
Thanks
srq1

Started this thread Reply With Quote
  #7 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,102

There are thousands of different indicators, and not all of them can be discussed.

I have fed the RVI into a divergence detection indicator and it gives promising results.

Charts attached (last 3 hours from Friday for CL 11-15).





Reply With Quote
Thanked by:
  #8 (permalink)
 jaant99 
Tallinn
 
Experience: Intermediate
Platform: InteractiveBrokers
Trading: ES, NQ, ZB
Posts: 1 since Jun 2017
Thanks Given: 1
Thanks Received: 0

Would it be possible that someone would help to get exactly the same RVI indicator to NinjaTrader 8 as it is in TOS? Thank You!

Reply With Quote




Last Updated on March 31, 2019


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
All information is for educational use only and is not investment advice. There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts