Invalid Lots Amount ?

 

Hi everybody, from the attached EA I obtain the following message error:

2008.07.04 11:54:41 Inside Bar Lots EURJPY,H1: invalid lots amount for OrderSend function

2008.07.04 11:54:41 Inside Bar Lots EURJPY,H1: Error opening SELL order : 4051

Could you help to find the problem?

Thank you!

Files:
 

AJ

Use something like this immediately prior to each of the many OrderSend lines

Print("BUY Low[1] Lots: ", Lots);

If you make each Print output distinctive, you know immediately which line is culprit

-BB-

 

Try to check lotstep in your broker, some broker allow two digits lot i.e 0.03, 1.34, etc but the rest only allow one digit i.e 0.1, 0.4, 1.3, etc.

MarketInfo(Symbol(),MODE_LOTSTEP);
Reason: