Results 1 to 2 of 2
 0 Attachment(s)    

Thread: Error code 129

  1. #1

    Default Error code 129

    I've been getting this error code only recently, since I'm starting to trade with 2 charts, each running their own EA.

    11:49:53 MyEA EURUSD,M1: open #90248917 buy 0.10 EURUSD at 1.37940 sl: 1.37870 ok
    11:51:12 MyEA EURUSD,M1: close #90248917 buy 0.10 EURUSD at 1.37940 sl: 1.37870 at price 1.37996
    11:51:12 MyEA EURUSD,M1: Error: 129

    This is the output that I'm getting. When I try close the order, I get the error 129.

    My close is very straight forward:

    if buy then "OrderClose(OrderTicket(),OrderLots(),Bid,Slippage ,Red);"
    if sell then "OrderClose(OrderTicket(),OrderLots(),Ask,Slippage ,Red);"

    I'm using Alpari as my broker. Has anyone had similar problems?

    Thanks

  2. #2
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by italiangoose View Post
    I've been getting this error code only recently, since I'm starting to trade with 2 charts, each running their own EA.

    11:49:53 MyEA EURUSD,M1: open #90248917 buy 0.10 EURUSD at 1.37940 sl: 1.37870 ok
    11:51:12 MyEA EURUSD,M1: close #90248917 buy 0.10 EURUSD at 1.37940 sl: 1.37870 at price 1.37996
    11:51:12 MyEA EURUSD,M1: Error: 129

    This is the output that I'm getting. When I try close the order, I get the error 129.

    My close is very straight forward:

    if buy then "OrderClose(OrderTicket(),OrderLots(),Bid,Slippage ,Red);"
    if sell then "OrderClose(OrderTicket(),OrderLots(),Ask,Slippage ,Red);"

    I'm using Alpari as my broker. Has anyone had similar problems?

    Thanks
    Hi italiangoose,

    You have to create a loop.

    Close buy :

    Code:
    RefreshRates();
       if(OrdersTotal()>0){
          for(int i=OrdersTotal()-1;i>=0;i--){
             OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
             if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic && OrderType()==OP_BUY){
                OrderClose(OrderTicket(),OrderLots(),Bid,slippage);
             }
          }
       }
    Close sell :

    Code:
    RefreshRates();
       if(OrdersTotal()>0){
          for(int i=OrdersTotal()-1;i>=0;i--){
             OrderSelect(i,SELECT_BY_POS,MODE_TRADES);
             if(OrderSymbol()==Symbol() && OrderMagicNumber()==magic && OrderType()==OP_SELL){
                OrderClose(OrderTicket(),OrderLots(),Ask,slippage);
             }
          }
       }

Similar Threads

  1. Ex4 write error
    By fxtester in forum MQL programming
    Replies: 0
    Last Post: 12-04-2015, 19:47
  2. OrderClose error 138
    By fxtester in forum MQL programming
    Replies: 0
    Last Post: 02-11-2015, 21:39
  3. OrderSend error 134
    By fxtester in forum MQL programming
    Replies: 0
    Last Post: 02-11-2015, 21:39
  4. Error in checktime()?
    By Clearpaper in forum MQL programming
    Replies: 3
    Last Post: 08-19-2010, 17:32
  5. Where is error ?
    By przem81621 in forum MQL programming
    Replies: 2
    Last Post: 07-09-2009, 07:34

Tags for this Thread

alpari, broker, eurusd, slippage

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •