AccountBalance()

 

Hello,

I use function AccountBalance() to get the lot value:

LotValue = (AccountBalance() * (RiskPercentage / 100.0))/(10.0 * SL);

Should I consider the account currency for this calculation?

Is the amount returned by this function in the account currency?

I will use this EA in EURUSD.

Thanks

 

desert:

Should I consider the account currency for this calculation?

Is the amount returned by this function in the account currency?


If the account currency is not USD then the 10.0 figure in . . "(10.0 * SL);" will be incorrect . . . also has your SL been adjusted to take account of 4 vs 5 digit broker feed ?

there has been plenty written on this subject, use the search function . . .

or click here: http://tinyurl.com/3lltue3

 
RaptorUK:

If the account currency is not USD then the 10.0 figure in . . "(10.0 * SL);" will be incorrect . . . also has your SL been adjusted to take account of 4 vs 5 digit broker feed ?

there has been plenty written on this subject, use the search function . . .

or click here: http://tinyurl.com/3lltue3


Thanks, you are right, I have found many posts about this, but really I did not see a lot size function which works ok or easy to understand :(

Could anyone please point me out to a function which calculate the lot size? The risk and the SL are fixed, also the function should consider the account currency.

Thanks a lot!!