Download MetaTrader 5

Invalid lots

To add comments, please log in or register
Sell products right in MetaTrader. Millions of traders are waiting for this!
NAZMTAZ
3447
NAZMTAZ 2015.06.07 20:55 

Hello,

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

Much appreciated. 

Osama Shaban
1447
Osama Shaban 2015.06.07 21:34  
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
2539
Drazen Penic 2015.06.07 22:49  
Trailing Bar Entry EA - MQL4 forum
  • www.mql5.com
Trailing Bar Entry EA - MQL4 forum
To add comments, please log in or register