English

## What is the correct way to get the 1% of the account?

 94 trader201 2014.07.04 17:46   Hello. What is the correct way to obtain a percentage in MQL4?I see rule of 3 it work (Y*X/100), but is this the right way? (I just want to confirm). When I use "X = y%", have the problem of two "=" signs (X=X=Y%;). It does not allow to write "X*1%" . Soo, What is the correct way to obtain a percentage in MQL4?Thank you in advancetrader201
 1815 SDC 2014.07.04 18:01 #   you are over thinking it .... divide account balance by 100.
 94 trader201 2014.07.04 22:24 #   SDC: you are over thinking it .... divide account balance by 100. divide account balance by 100.doesn´t work. When I use this value (account/100) and put this in "Alert", it say me the value. But when I use this value to determine the lots in OrderSend ((Account/100) and then divide this /SL), it does not work. The way I said before it does. My question is: using the rule of 3 (Y*X/100), that worked, is the right way, or I can have a problem later?What is the way to obteing % in mql4?
 748 honest_knave 2014.07.04 22:27 #   I think the issue is with your method of calculating the lot size.As SDC says, AccountBalance() / 100 is most definitely 1% of your account balance.
Moderator
3517
GumRai 2014.07.04 23:57 #

SDC:
you are over thinking it .... divide account balance by 100.

divide account balance by 100 doesn´t work.

Of course it works.