Gamestudio Links
Zorro Links
Newest Posts
SGT_FW
by Aku_Aku. 11/30/26 08:19
Removing outliers from files
by JeyKey II. 11/29/26 10:01
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
2 registered members (Quad, Martin_HH), 6,771 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 2 of 2 1 2
Re: Math problem... [Re: MMike] #295379
10/24/09 21:08
10/24/09 21:08
Joined: May 2008
Posts: 301
Oxy Offline
Senior Member
Oxy  Offline
Senior Member

Joined: May 2008
Posts: 301
if the reaction is 1:1 (one unit to one unit)
Then the percentage is:

(min : max) * 100

example: 90 units A and 120 units B

(90 : 120) = 0.75
0.75 * 100 = 75%


example: 55 units A and 7 units B

(7: 55) = 0.127
0.127 * 100 = 12.7%

Re: Math problem... [Re: Oxy] #295386
10/24/09 22:12
10/24/09 22:12
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
right.. i know! but to calculate the min and max of 2 numbers .. thats the point

because if you have 90/120 and what if you have 120/90 that wont work, so it must know the min, and you dont want to out that, thepc should calculate from what you have..

So i forgot the mnual , there is that function min(a,b) lool so much work

Re: Math problem... [Re: MMike] #295391
10/24/09 22:37
10/24/09 22:37
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Wouldnt this do what you are after?
result = minv(x,y) / maxv(x,y); as a 0.0->1.0 result
or
result = minv(x,y) / maxv(x,y) * 100; as a 0->100 (%) result


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Math problem... [Re: EvilSOB] #295401
10/25/09 00:13
10/25/09 00:13
Joined: Jul 2004
Posts: 1,710
MMike Offline OP
Serious User
MMike  Offline OP
Serious User

Joined: Jul 2004
Posts: 1,710
yes it would.. but i didnt know there was a minv :S lool other wise i would avoid that math stuff lol.. well but it was fun to go trough it lol

Re: Math problem... [Re: MMike] #295438
10/25/09 11:06
10/25/09 11:06
Joined: May 2008
Posts: 301
Oxy Offline
Senior Member
Oxy  Offline
Senior Member

Joined: May 2008
Posts: 301
come on, even of there where no min function,
you could use
if (a>b) max=a: min=b;
else max=b;min=a

you should be able to figure that out...

Page 2 of 2 1 2

Gamestudio download | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1