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.
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.
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...
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.
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...
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...
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
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...