Download MetaTrader 5

Invalid lots

To add comments, please log in or register
NAZMTAZ
3564
NAZMTAZ  

Hello,

Could anyone please show how to solve in experts file 'invalid lots amount for order send function'? Please advise.

Much appreciated. 

Osama Shaban
1584
Osama Shaban  
NAZMTAZ:

Hello,

Could anyone please show how to solve in experts file 'invalid lots amount for order send function'? Please advise.

Much appreciated. 

Use MarketInfo() for detecting Max lots and Min lots ...

Check if calculated lot is in the limit ...     Max Lot <= Lot >= Min Lot 

Then,

NewLot = NormalizeDouble(lot, LotDigits);

 Where, LotDigits is the number of digits after the decimal point. Normally, 2.

Drazen Penic
2724
Drazen Penic  
Trailing Bar Entry EA - MQL4 forum
  • www.mql5.com
Trailing Bar Entry EA - MQL4 forum
To add comments, please log in or register