I have the following question:
how can I calculate the Lots I can use to enter a trade?(say the max lots size)
for an account of say 100 $( the deposit ) and leverage 10:1 then following the logic I would have: max_lot_size= leverage * balance /1e5 = 0.01?
I receive an error - not enough moeny ... 4753 :)
...
Lot size is determined by free margin and cost of 1 lot in base currency (left side currency of the pair) and not the account currency!
So it would be something like: max lot size = AccountFreeMargin/OrderCalcMargin(for 1 lot).
See the detail of the syntax in the documentation.
- www.mql5.com
it doesn't seem to work - in order to get rid of the annoying error I need to increase the deposit in the tester : the Lot (volume ) for the order is calculated by:
OrderCalcMargin(ORDER_TYPE_BUY,tradeReq.symbol,tradeReq.volume,tradeReq.price,tmpMargine);//tradeReq.volume=1
on success the volume to trade is calculated by
tradeReq.volume=AccountInfoDouble(ACCOUNT_FREEMARGIN)/tmpMargine;
to no avail I get the not enough money notification ....
- www.mql5.com
put it in another way:
how to calculate the amount in lots for
MqlTradeResult volume?
so that you will not get the not enough money error?
- www.mql5.com

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I have the following question:
how can I calculate the Lots I can use to enter a trade?(say the max lots size)
for an account of say 100 $( the deposit ) and leverage 10:1 then following the logic I would have: max_lot_size= leverage * balance /1e5 = 0.01?
I receive an error - not enough moeny ... 4753 :)
...