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

Re: RE: [amibroker] Percent - Math 101?



PureBytes Links

Trading Reference Links

Thank you Geoff. That explains it for me. I had the mistaken idea that 
there was a single "percent difference" between any two numbers, but I now 
see from your explanation that idea was wrong.

Tomasz I found the ROC function and I ended up using that as it is easier.

Tomasz, perhaps you should consider starting a forum. Here are 2 of the big 
web based ones:

http://www.ezboard.com/
http://www.coolboard.com/

Nice discussion over there :-))))
Goeff is right, the only thing I want to say
that there is a built-in function for calculating
percentage change

percent_chg = ROC( array, periods );

one-day percentage change of close is:

percent_chg = ROC( close, 1 );


>
> The start value must be the denominator. Whether its larger or smaller 
just affects the sign of the outcome (numerator). You have
to accept that the result can be negative ie a decrease, as well as 
positive. If you only want the magnitude square the no. and take
the sqrt.
>
> If a is the start value 5 and b is the end value 7 then the % increase is
> 40%.
>
> % = (7-5)/5 = 2/5 = 0.4 = 40% increase.
>
> If a was 7 (ie start at 7) and b = 5 (ie the end value)
>
> % = (5-7)/7 = -2/7 = - 0.286 = 28.6 % decrease.


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com