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) Ticket=OrderSend(Symbol(),OP_SELLSTOP,Lots,NormalizeDouble(Low,Digits),Slippage,SL,TP,"Lorenzo EA v1.0",20090130,0,Red);
if(Ask+MarketInfo(Symbol(), MODE_STOPLEVEL)*Point<High) Ticket=OrderSend(Symbol(),OP_BUYSTOP,Lots,NormalizeDouble(High,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.
You should check the return value of OrderSend().
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()
I have problem because with my backtest I have No error.
I'm using a PRO.ECN account from Alpari RU.
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.