EA not run in real account
My robot runs in Demo in Backtest and not working in Real account. can someone help me?
Do you have a Smiley face in the top right of the chart ?
Have you enabled live trading in these 2 places ?
Have you started EAs running by clicking this button ?
Does your Broker allow EAs on live accounts ?
What messages do you get in the experts log about your EA ?
Yes my settings the same station. does not work! only in Demo and Backtesting. Another robo I did worked in Real. Please have some error on my EA? Help me...
double mov = Close[0] - Open[0]; double diferenca = Ask - Bid; int ordens = OrdersTotal(); Comment("ORDENS = " + ordens + "\n" + "ABERTURA = " + Open[0] + "\n" + "FECHAMENTO = " + Close[0] + "\n" + "MOVIMENTO = " + mov + "\n" + "DIFERENCA BID/ASK = " + diferenca + "\n" + "BID = " + Bid + "\n" + "ASK = " + Ask); if(Hour()>11 && Minute()>29 && Hour()<13 && Minute()<31){ if(ordens == 0){ if(mov > 0){ OrderSend(Symbol(),OP_BUY,0.10,Ask,3,Ask-80*Point,Ask+160*Point,0,0,0,Green); }else{ if(mov < 0){ OrderSend(Symbol(),OP_SELL,0.10,Bid,3,Bid+80*Point,Bid-160*Point,0,0,0,Red); } } } }
Yes my settings the same station. does not work! only in Demo and Backtesting. Another robo I did worked in Real. Please have some error on my EA? Help me...
And then read some of the links here: ECN and perform this test and report back here: https://www.mql5.com/en/forum/143043/page2#746319 #
does it solve?
int start() { //---- double mov = Close[0] - Open[0]; double diferenca = Ask - Bid; int ordens = OrdersTotal(); int ticket; Comment("ORDENS = " + ordens + "\n" + "ABERTURA = " + Open[0] + "\n" + "FECHAMENTO = " + Close[0] + "\n" + "MOVIMENTO = " + mov + "\n" + "DIFERENCA BID/ASK = " + diferenca + "\n" + "BID = " + Bid + "\n" + "ASK = " + Ask); if(Hour()>11 && Minute()>29 && Hour()<13 && Minute()<31){ if(ordens == 0){ if(mov > 0){ ticket = OrderSend(Symbol(),OP_BUY,0.10,Ask,3,Ask-80*Point,Ask+160*Point,0,0,0,Green); }else{ if(mov < 0){ ticket = OrderSend(Symbol(),OP_SELL,0.10,Bid,3,Bid+80*Point,Bid-160*Point,0,0,0,Red); } } } } //---- return(0);
does it solve?
No, read the links I gave you, check the return value ( ticket ) and if it tells you that the OrderSend() failed print the error and any relevant variables . . . it's explained in the thread and there is example code.
From the thread:
int TicketNumber; TicketNumber = OrderSend( . . . . . . . . ); if( TicketNumber > 0 ) { Print("Order placed # ", TicketNumber); } else { Print("Order Send failed, error # ", GetLastError() ); }
???
double mov = Close[0] - Open[0]; double diferenca = Ask - Bid; int ordens = OrdersTotal(); int ticket; Comment("ORDENS = " + ordens + "\n" + "ABERTURA = " + Open[0] + "\n" + "FECHAMENTO = " + Close[0] + "\n" + "MOVIMENTO = " + mov + "\n" + "DIFERENCA BID/ASK = " + diferenca + "\n" + "BID = " + Bid + "\n" + "ASK = " + Ask); if(Hour()>11 && Minute()>29 && Hour()<13 && Minute()<31){ if(ordens == 0){ if(mov > 0){ ticket = OrderSend(Symbol(),OP_BUY,0.10,Ask,3,Ask-80*Point,Ask+160*Point,0,0,0,Green); }else{ if(mov < 0){ ticket = OrderSend(Symbol(),OP_SELL,0.10,Bid,3,Bid+80*Point,Bid-160*Point,0,0,0,Red); } } if(ticket > 0){ Print("Order placed # ", ticket); }else{ Print("Order Send failed, error # ", GetLastError()); } } }
???
Whats your trade opening criteria
double mov = Close[0] - Open[0]; double diferenca = Ask - Bid; int ordens = OrdersTotal(); int ticket; Comment("ORDENS = " + ordens + "\n" + "ABERTURA = " + Open[0] + "\n" + "FECHAMENTO = " + Close[0] + "\n" + "MOVIMENTO = " + mov + "\n" + "DIFERENCA BID/ASK = " + diferenca + "\n" + "BID = " + Bid + "\n" + "ASK = " + Ask); if(Hour()>11 && Minute()>29 && Hour()<13 && Minute()<31){ if(ordens == 0){ if(mov > 0){ ticket = OrderSend(Symbol(),OP_BUY,0.10,Ask,3,Ask-80*Point,Ask+160*Point,0,0,0,Green); }else{ if(mov < 0){ ticket = OrderSend(Symbol(),OP_SELL,0.10,Bid,3,Bid+80*Point,Bid-160*Point,0,0,0,Red); } } if(ticket > 0){ Print("Order placed # ", ticket); }else{ Print("Order Send failed, error # ", GetLastError()); } } }Looks to me you already have
My robot runs in Demo in Backtest and not working in Real account. can someone help me?