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

Re: Up/Down Ratio



PureBytes Links

Trading Reference Links

Martin Pring's Investment Tools Collection
       Market CD-ROM Companion

http://www.equis.com/products/catalog/educational/mpmktcomp.html

There's got to be some one on here with it : Jo...
---------------------------------------
Barry Marx wrote:

> Hi,
>
> IBD has an indicator called the "Up/Down Volume Ratio", which computes the
> ratio of volume on up days to volume on down days for the last 50 periods.
> A positive ratio is interpreted as a sign of accumulation.
>
> I programmed this into a Quotes Plus scan as shown below, but don't see any
> way to convert it into a MetaStock (6.5) indicator.  Is this possible in MS?
>
> Thanks,
>    Barry
>
> -------------------
>
> output="updnratio.lst";
>
> float volup, voldn, updnratio;
> integer i, Startindex;
>
> Startindex := -49;
> volup := 0;
> voldn := 0;
>
> for i = Startindex+1 to 0
> do
>     if close(i) > close(i-1) then
>        volup := volup + vol(i);
>     else
>        if close(i) < close(i-1) then
>           voldn := voldn + vol(i);
>        endif;
>     endif;
> next i;
>
> if voldn > 0 then
>    updnratio := volup/voldn;
> else
>    updnratio := -99999;
> endif;
>
> println symbol , ", " , Description, ", ", updnratio;