Download MetaTrader 5
To add comments, please log in or register
Trade like successful traders - subscribe to their signals!
brettosm8
241
brettosm8 2015.10.12 07:46 

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? 

Ovo Cz
2963
Ovo Cz 2015.10.12 07:57  
If you refer to the back-testing, then update to build 891.
/
To add comments, please log in or register