Download MetaTrader 5

I have some problem to publish my EA on the market

To add comments, please log in or register
Join MQL5 Cloud Network. Millions of traders are waiting for this!
Andrea Lanza
9131
Andrea Lanza 2016.01.05 12:29 

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:
Marco vd Heijden
Moderator
4704
Marco vd Heijden 2016.01.05 13:04  

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.

Andrea Lanza
9131
Andrea Lanza 2016.01.05 13:42  
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...

Alain Verleyen
Moderator
30742
Alain Verleyen 2016.01.05 14:52  
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.
Andrea Lanza
9131
Andrea Lanza 2016.01.05 16:02  
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
Alain Verleyen
Moderator
30742
Alain Verleyen 2016.01.05 16:17  
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.
To add comments, please log in or register