[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[amibroker] Re: RVI indicator by Donald Dorsey



PureBytes Links

Trading Reference Links

Thanks for the help guys



--- In amibroker@xxxxxxxxxxxxxxx, "Rakesh Sahgal" <rakeshsahgal@xxx> 
wrote:
>
> If I understood the description of the indicator correctly then it 
is simply
> coded by using RSIa i.e. RSI of array.
> 
> SD10=StDev(C,10);
> RVI=RSIa(SD10,10);
> Plot(RVI,"RVI",colorBlack,styleLine);
> 
> The above is, I repeat again, subject to the caveat that I have 
understood
> the description of the indicator correctly.
> 
> 
> R
> 
> 
> On 4/23/07, dbw451 <dbw451@xxx> wrote:
> >
> >  Shane,
> >
> >
> >
> > I took a stab at the indicator, but I can't seem to get it to 
work right.
> > The indicator displays sometimes, then becomes zero as I move 
around my
> > dataset.  I'm not sure what's wrong.  Maybe someone else can spot 
my error.
> > The work in process code is below.
> >
> >
> >
> > Regards,
> >
> >
> >
> > David
> >
> >
> >
> >
> >
> > // RVI - Relative Volatility Index
> >
> > /*
> >
> > Taken from Stocks & Commodities, V. 11:6 (253-256): The Relative
> >
> > Volatility Index by Donald Dorsey
> >
> >
> >
> > "The RVI is simply the relative strength index (RSI) with the
> >
> > standard deviation over the past 10 days used in place of daily 
price
> >
> > change. Because most indicators use price change for their
> >
> > calculations, we need a confirming indicator that uses a different
> >
> > measurement to interpret market strength. The RVI measures the
> >
> > direction of volatility on a scale of zero to 100. Readings above 
50
> >
> > indicate that the volatility as measured by the 10-Day standard
> >
> > deviation of the closing prices is more to the upside. Readings 
below
> >
> > 50 indicate that the direction of volatility is to the downside. 
The
> >
> > initial testing indicates that the RVI can be used wherever you 
might
> >
> > use the RSI AND in the same way, but the specific purpose of this
> >
> > Study is to measure the RVI's performance as a confirming 
indicator."
> >
> >
> >
> > The RVI was designed to measure the direction of volatility. It
> >
> > calculates price strength by measuring volatility rather than 
price
> >
> > change.
> >
> > */
> >
> >
> >
> > SetBarsRequired( 100000, 100000 );
> >
> >
> >
> > dROC = ROC(*C*,1);
> >
> > dStDev = StDev(*C*,10);
> >
> >
> >
> > RVIdn = 0;
> >
> > RVIup = 0;
> >
> > PREVdn = 0;
> >
> > PREVup = 0;
> >
> > tmpDn = 0;
> >
> > tmpUp = 0;
> >
> >
> >
> >
> >
> > *for* (i=1; i<*BarCount*; i++) {
> >
> >        // RVI down
> >
> >        PREVdn[i] = RVIdn[i-1];
> >
> >        *if*(dROC[i] < 0)
> >
> >               tmpDn[i] = dStDev[i];
> >
> >        *else*
> >
> >               tmpDn[i] = 0;
> >
> >        RVIdn[i] = ( PREVdn[i]*13 +  tmpDn[i] )/14;
> >
> >
> >
> >        // RVI up
> >
> >        PREVup[i] = RVIup[i-1];
> >
> >        *if*(dROC[i] > 0)
> >
> >               tmpUp[i] = dStDev[i];
> >
> >        *else*
> >
> >               tmpUp[i] = 0;
> >
> >        RVIup[i] = ( PREVup[i]*13 +  tmpUp[i] )/14;
> >
> > }
> >
> >
> >
> > RVI = (100 * RVIup) / (RVIup + RVIdn);
> >
> >
> >
> > Plot( RVI, "RVI", ParamColor("RVI color", *colorRed* ), ParamStyle
("RVI
> > style") );
> >
> >
> >
> >
> >
> >
> >  ------------------------------
> >
> > *From:* amibroker@xxxxxxxxxxxxxxx 
[mailto:amibroker@xxxxxxxxxxxxxxx] *On
> > Behalf Of *bakermrms
> > *Sent:* 04/22/2007 5:20 AM
> > *To:* amibroker@xxxxxxxxxxxxxxx
> > *Subject:* [amibroker] RVI indicator by Donald Dorsey
> >
> >
> >
> > Hi
> >
> > I wondered whether anybody had managed to code the RVI indicator
> > (relative volatility index) by Donald Dorsey for Ami and would be
> > willing to share?
> >
> > Taken from Stocks & Commodities, V. 11:6 (253-256): The Relative
> > Volatility Index by Donald Dorsey
> >
> > "The RVI is simply the relative strength index (RSI) with the
> > standard deviation over the past 10 days used in place of daily 
price
> > change. Because most indicators use price change for their
> > calculations, we need a confirming indicator that uses a different
> > measurement to interpret market strength. The RVI measures the
> > direction of volatility on a scale of zero to 100. Readings above 
50
> > indicate that the volatility as measured by the 10-day standard
> > deviation of the closing prices is more to the upside. Readings 
below
> > 50 indicate that the direction of volatility is to the downside. 
The
> > initial testing indicates that the RVI can be used wherever you 
might
> > use the RSI and in the same way, but the specific purpose of this
> > study is to measure the RVI's performance as a confirming 
indicator."
> >
> > The RVI was designed to measure the direction of volatility. It
> > calculates price strength by measuring volatility rather than 
price
> > change.
> >
> > All of the following formulas are required:
> >
> > @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"))
> >
> > Many thanks for any help offered.
> >
> > Cheers
> >
> > Shane
> >
> > 
> >
>




Please note that this group is for discussion between users only.

To get support from AmiBroker please send an e-mail directly to 
SUPPORT {at} amibroker.com

For NEW RELEASE ANNOUNCEMENTS and other news always check DEVLOG:
http://www.amibroker.com/devlog/

For other support material please check also:
http://www.amibroker.com/support.html
 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/amibroker/

<*> Your email settings:
    Individual Email | Traditional

<*> To change settings online go to:
    http://groups.yahoo.com/group/amibroker/join
    (Yahoo! ID required)

<*> To change settings via email:
    mailto:amibroker-digest@xxxxxxxxxxxxxxx 
    mailto:amibroker-fullfeatured@xxxxxxxxxxxxxxx

<*> To unsubscribe from this group, send an email to:
    amibroker-unsubscribe@xxxxxxxxxxxxxxx

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/