Calculate maximum lots

 

Hi Guys,

First of all let me thank all of you for keeping this wonderful place on the net...

I have a question, tough I think it has been answered many times - yet I don't seem to be able to find straight answer anywhere. For many people I'm sure this problem is just a thumb excercise, but unfortunately I'm not one of those lucky souls...

I'm new to MQL4, and I would need some code example of how to calculate the following: You have X account balance on symbol/pair Y. (For example, balance USD 500 and you want to trade EURGBP.) How do you calculate, what formula do you use to get what is the maximum lot you can open a trade with (0.3, 0,6, 1, etc)?

Thanks if anyone answers. And I'm sorry if I'm redundant with this...

Levente

 
 

Thank you!!!!

Reason: