Hello
Wanting to do percentage price move calc for say points s/start and n/now
Please bear with the 5yr old logic below...
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
Since not understand - my phrasing is most likely incorrect - but would appreciate any clarification
Cheers
Wanting to do percentage price move calc for say points s/start and n/now
Please bear with the 5yr old logic below...
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
Since not understand - my phrasing is most likely incorrect - but would appreciate any clarification
Cheers