I have some problem to publish my EA on the market

 

Hello everyone,

like the subject suggest, I have problem for my engine, because continuosly is reject due to ordersend error 130.

The problem is that I cannot be able to repeat this error in my backtest.

I use Alpari RU history data with spread set to 10 and, in my backtest, the engine works fine with no error.

This is a piece of code of my EA:

if(Bid-MarketInfo(Symbol(), MODE_STOPLEVEL)*Point>Low[1]) Ticket=OrderSend(Symbol(),OP_SELLSTOP,Lots,NormalizeDouble(Low[1],Digits),Slippage,SL,TP,"Lorenzo EA v1.0",20090130,0,Red);

and

if(Ask+MarketInfo(Symbol(), MODE_STOPLEVEL)*Point<High[1]) Ticket=OrderSend(Symbol(),OP_BUYSTOP,Lots,NormalizeDouble(High[1],Digits),Slippage,SL,TP,"Lorenzo EA v1.0",20090130,0,Blue);

I tested it on EURUSD and USDJPY and I receive NO error.

Can someone test the engine to verify this?

I attach the demo version of ex4.

thank you...

Files:
 

You should check the return value of OrderSend().

Returned value,

Returns number of the ticket assigned to the order by the trade server or -1 if it fails. To get additional error information, one has to call the GetLastError() function.

 
Marco vd Heijden:

You should check the return value of OrderSend().

Returned value,

Returns number of the ticket assigned to the order by the trade server or -1 if it fails. To get additional error information, one has to call the GetLastError() function.

Yes, but the problem is to avoid to have the error write in the journal of MT4.
Also if I check the return value the error is still written in the journal tab.

I have problem because with my backtest I have No error.

I'm using a PRO.ECN account from Alpari RU.


Thank you...

 
Andrea Lanza:
Yes, but the problem is to avoid to have the error write in the journal of MT4.
Also if I check the return value the error is still written in the journal tab.

I have problem because with my backtest I have No error.

I'm using a PRO.ECN account from Alpari RU.


Thank you...

You have to test your EA with Metaquotes-Demo server.
 
Alain Verleyen:
You have to test your EA with Metaquotes-Demo server.

I download a fresh MT4 from metaquotes website and I create a new demo account on NoorCM-Demo (the only server in the server list) and download USDJPY from metaquotes.

After that I start backtest with my EA for all the 2015 period with daily timeframe and 10 points spread.

The same thing happen, I receive NO error.

I attach the image for the period 28 of October until 03 of November.

HELP...

Files:
Immagine1.png  33 kb
Immagine2.png  29 kb
 
Andrea Lanza:

I download a fresh MT4 from metaquotes website and I create a new demo account on NoorCM-Demo (the only server in the server list) and download USDJPY from metaquotes.

After that I start backtest with my EA for all the 2015 period with daily timeframe and 10 points spread.

The same thing happen, I receive NO error.

I attach the image for the period 28 of October until 03 of November.

HELP...

Ask more information to Market's moderator, he can say you how to reproduce the problem.
Reason: