Invalid lots

 

Hello,

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

Much appreciated. 

 
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.

 

Look at this comment: https://www.mql5.com/en/forum/146370

Trailing Bar Entry EA - MQL4 forum
  • www.mql5.com
Trailing Bar Entry EA - MQL4 forum
Reason: