Download MetaTrader 5

Off quotes for pending orders - page 2

To add comments, please log in or register
Do you need private account monitoring? The Signals will provide you one!
Simon Gniadkowski
Simon Gniadkowski 2011.09.03 11:42  
Maybe the Broker is doing something a little odd . . . might be a good idea to give them a call.
whroeder1 2011.09.03 16:05  
I assumed that the client would use a number of pips greater than the minimum distance for this value, the check is not explicitly made. I now perform the check in my last version.
Bad assumption. Are you adjust for 4/5 digit brokers in your pips to double?
//++++ These are adjusted for 5 digit brokers.
int     pips2points;    // slippage  3 pips    3=points    30=points
double  pips2dbl;       // Stoploss 15 pips    0.0015      0.00150
int     Digits.pips;    // DoubleToStr(dbl/pips2dbl, Digits.pips)
int     init(){
     if (Digits % 2 == 1){      // DE30=1/JPY=3/EURUSD=5
                pips2dbl    = Point*10; pips2points = 10;   Digits.pips = 1;
    } else {    pips2dbl    = Point;    pips2points =  1;   Digits.pips = 0; }
    // OrderSend(... Slippage.Pips * pips2points, Bid - StopLossPips * pips2dbl
//---- These are adjusted for 5 digit brokers.
    /* On ECN brokers you must open first and THEN set stops
    int ticket = OrderSend(...)
    if (ticket < 0)
       Alert("OrderSend failed: ", GetLastError());
    else if (!OrderSelect(ticket, SELECT_BY_POS))
       Alert("OrderSelect failed: ", GetLastError());
    else if (!OrderModify(OrderTicket()...)
       Alert("OrderModify failed: ", GetLastError());
FXTrader_X 2011.09.03 22:59  

Hi again,

I basically have a modular framework in place that contains a module with functions for platform independent tradeplacement (and correct errorhandling for all/most possible mql4 errors); thus, adjustment to 4/5 pip brokers and/or ECN orderplacement will always be made correctly. Unfortunately I forgot to call my functions that check minimum distances for pending orders and/or stoplosses.

The client already confirmed that he's using pipdistances of only 5 pips; If this gave a problem with the minimum distance then I still find it strange to receive the off quote error instead of the 130 (or possibly 3) error. Hopefullly the problem is resolved now that the minimum distance check is made but I'm still doubtfull.. we will see tomorrow.


hv24 2016.08.11 13:03  
HI man . last night i faced to this error like u. i called to my broker and they said that before the news you are not allowed to send pending orders....
To add comments, please log in or register