Interbank account ECN with ActivTRades

 

Hi, I have an interbank account /ECN with activtrades. In my backtest the EA works fine, all orders open correctly and S/L und T/P works well. But in live trading, the EA did not open a trade (live trading is activ and smily also ), can you help me? Here is my EA coding part for open the order:


OrderSend("USDJPY-fx",OP_BUY,lotUSDJPYEP,Ask,0,0,0,"RainUSDJPYEP_long_M30",MagicNumberUSDJPYEP,0,White);


S/L und T/P is created later automatically when some signals in the EA are reached...


Thanks for helping and regards


Christian

 
schranzi9 wrote >>

Hi, I have an interbank account /ECN with activtrades. In my backtest the EA works fine, all orders open correctly and S/L und T/P works well. But in live trading, the EA did not open a trade (live trading is activ and smily also ), can you help me? Here is my EA coding part for open the order:

OrderSend("USDJPY-fx",OP_BUY,lotUSDJPYEP,Ask,0,0,0,"RainUSDJPYEP_long_M30",MagicNumberUSDJPYEP,0,White);

S/L und T/P is created later automatically when some signals in the EA are reached...

Thanks for helping and regards

Christian

You set Slippage to 0 ?

Your Value for Symbol (USDJPY-fx in this case) is correct?

The expert or journal tab will give you maybe some explanation...

 

S

Has the account been enabled for EA's by your broker?

Any error messages in the Journal or Experts tab?

-BB-

 
Print the values used, Bid, Ask, MarketInfo( Symbol(), MODE_STOPLEVEL ) all to Digits resolution, and GetLastError(), Symbol()
 
WHRoeder:
Print the values used, Bid, Ask, MarketInfo( Symbol(), MODE_STOPLEVEL ) all to Digits resolution, and GetLastError(), Symbol()

Hi, I have check the broker and it is possible to use the EA. Could the reason be the Symbol() part? The interbank account use for usdjpy the symbol USDJPY-fx and in backtesting I have no problems with this coding, but I am not sure if I need to use slippage because at the moment I use 0:


OrderSend("USDJPY-fx",OP_BUY,lotUSDJPYEP,Ask,0,0,0,"RainUSDJPYEP_long_M30",MagicNumberUSDJPYEP,0,White);


The price for oder buying comes from Ask.


Can you describe here the correct coding or a link for the correct open order process with the ECN Broker? For my understanding, in the most situations we must open first the order with OrderSend and later with sleep() the S/L and T/P with ModifyOrder(). Is that correct?


Regards


Christian

 
Just put Print() everywhere and anywhere until you isolate the problem.
 

Hello,

I have exactly the same problem.

On the DEMO account and server everthing is ok and order are place correctly.

But with the real server and real account with the same EA nothing append ??

Do you have an idea of one parameters for activetrades interbank ?

Thank

 
hebustech:

Hello,

I have exactly the same problem.

On the DEMO account and server everthing is ok and order are place correctly.

But with the real server and real account with the same EA nothing append ??

Do you have an idea of one parameters for activetrades interbank ?

Thank

Please start a new thread.

Have you tried debugging the data flow by Print() log messages.??

 
hebustech:

Hello,

Sorry I'm completly lost. I'm not a programmer.

I'm using this website to create a very simple EA http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/

You ask to me to put Print() where ???


Before posting please read some of the other threads . . . then you would have seen numerous requests like this one:

Please use this to post code . . . it makes it easier to read.

 
schranzi9:

Hi, I have an interbank account /ECN with activtrades. In my backtest the EA works fine, all orders open correctly and S/L und T/P works well.

But in live trading, the EA did not open a trade

OrderSend("USDJPY-fx",OP_BUY,lotUSDJPYEP,Ask,0,0,0,"RainUSDJPYEP_long_M30",MagicNumberUSDJPYEP,0,White);

  1. Use SRC
  2. Use the real symbol name.
  3. Check ALL your return codes. First the ticket, then the orderSelect.You're not issueing an error message when the OrderSend Fails
    if(Ticket > 0) { // OrderSend returns -1 on failure not zero.
       if (OrderSelect(Ticket, SELECT_BY_TICKET, MODE_TRADES)) {
         Print("BUY order opened : ", OrderOpenPrice());
         if (SignalMail) SendMail(...
       } else {
           Print("Error opening BUY order : ", GetLastError()); // This prints when OrderSelect fails
       }
       // No print if the ticket < 0.
    }

  4. Ticket = OrderSend(Symbol(), OP_BUY, Lots, Ask, Slippage, StopLossLevel, TakeProfitLevel, 
                       "Buy(#" + MagicNumber + ")", MagicNumber, 0, DodgerBlue); 
    Your EA must adjust for 4/5 digit brokers (tp, sl, AND slippage.) Your EA must adjust for ECN brokers. You're not doing either.
    //++++ These are adjusted for 5 digit brokers.
    int     pips2points;    // slippage  3 pips    3=points    30=points
    double  pips2dbl;       // Stoploss 15 pips    0.015      0.0150
    int     Digits.pips;    // DoubleToStr(dbl/pips2dbl, Digits.pips)
    int     init(){                                             OptInitialization();
         if (Digits % 2 == 1){      // DE30=1/JPY=3/EURUSD=5 forum.mql4.com/43064#515262
                    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(..., 0,0,...)
        if (ticket < 0)
           Alert("OrderSend failed: ", GetLastError());
        else if (!OrderSelect(ticket, SELECT_BY_TICKET))
           Alert("OrderSelect failed: ", GetLastError());
        else if (!OrderModify(OrderTicket(), OrderOpenPrice(), SL, TP, 0))
           Alert("OrderModify failed: ", GetLastError());
         */
    

  5. if (EachTickMode) TickCheck = True;
    if (!EachTickMode) BarCount = Bars;
    Bars is unreliable (max bars in chart), Volume is unreliable (you can miss ticks.) Always use time.
 
hebustech:

Hello,

Sorry I'm completly lost. I'm not a programmer.

I'm using this website to create a very simple EA https://www.mql5.com/go?link=http://sufx.core.t3-ism.net/ExpertAdvisorBuilder/

Now you are using an ExpertAdvisorBuilder program to code your program

We had here before topics with programs made by an ExpertAdvisorBuilder

It might be look an easie way to get your program but if you haven't learn yourself the basics of programming

then you will not recognize the errors your EABuilder is making and how to solve it...

AND become also a programmer

..... start learning read, test and play with codes mql

Reason: