OrderSend generates 131 error Invalid trade volume

 

Hi there,

 I'm using this code to open a couple pending orders and get the error as in subject.

extern double SLDistance=.0020;
double Lots=0.01;//MODE_MINLOT/Digits;
double LongEntry;
double ShortEntry;

 

LongTicket=OrderSend("EURUSD",OP_BUYSTOP,Lots,LongEntry,3,LongEntry-SLDistance,0,"",1);

      if(LongTicket<0)
        {
         Print("Unable to create pending long order: ",GetLastError());
        }

      ShortTicket=OrderSend("EURUSD",OP_SELLSTOP,Lots,ShortEntry,3,ShortEntry+SLDistance,0,"",1);

      if(ShortTicket<0)
        {
         Print("Unable to create pending short order: ",GetLastError());
        }

 I've read about MODE_MINILOT which is 23 according to the print out.

I've called the broker and they've confirmed their min lot size is 0.01.

Can you please advise? 

 
If you refer to the back-testing, then update to build 891.
Reason: