Maths brain needed please! I'm stuck on percentage change calcs

ukt

Junior member
Messages
20
Likes
0
Hello

Wanting to do percentage price move calc for say points s/start and n/now

Please bear with the 5yr old logic below... :rolleyes:

if s==6 && n==10
then percentMove = abs(s-n)/s*100

or abs(6-10)/6*100 giving 66% //rounded down

If above is ok then the price moved from 6 up to 10 giving a 66% price move away from the start price of 6.


My sticking point (assuming above is ok) is that for numbers like:
s/1.8006 and n/1.8010
the above calc not work as not working in units of 1

I get 0.02221 if do: abs(1.8006-1.8010)/1.8006*100

I just can't conceptualise it. Am wanting to get %move with numbers that are, I guess not really related to the 1..100% type of thinking.

Think I better stop else the hole I've dug for self will be very big indeed :eek:

Since not understand - my phrasing is most likely incorrect - but would appreciate any clarification ;)

Cheers
 
Your problem is scaling. Just use the significant digits.

1.8006 to 1.8010 is a small percentage move of the total. But you're really only interested in the pips.
 
Hi,

I'm not sure I understand what you're trying to do, but if what you want to do is to calculate a percentage move, I suggest this way:

I think you're thinking in terms of pn=pi + p * pi, where p is the percentage change? This is the same as pn=(1 + p)*pi. If you want to express the result in terms of p, this is

p=pn/pi - 1

In your example,

pi=1.8006
pn=1.8010

pn/pi - 1 = 1.00022 - 1 =0.00022

Now if you want to express the result in terms of %, you have to do that times 100 (because you want it in 'per-cents'), then the percentage change above is 0.022%, which is correct. So there is no problem with your calculation, that's the correct result. I hope this helped, I didn't understand very well what your problem was, hence the long explanation above.

Good luck with that calculator, and check the batteries :cheesy:

Silvia.
 
Aleph Sigma Chi

Ok, yes... your comment has kick-started the brain - scaling + the digits of the fractional part interested in.

Thank you
 
Silvia

You have done big effort - interesting to read. Yes, my framing of question is too wordy and basically not easy for reader to understand - please excuse me. I must work on this - thankfully you took time to unravel my post!

I will be using what you have expanded on in tandem with the scaling of interested in digits.

Batteries? I gotta get the axe sharper to keep hacking at trees to keep 'da steam up :cheesy:

Many thanks!
 
Top