Download MetaTrader 5

OrderSend error 2 and error 3 at one broker, not at others

To add comments, please log in or register
billworld2
22
billworld2  

I'm doing multiple broker backtesting for some strategies I've created. The data used for testing is the same at all brokers (via import). I'm testing using MT4 build 1010 on all. I'm not seeing any errors when testing my strategies at FXCM, Tallinex and ForexWare/TradeWiseFX however when testing on FXChoice I'm consistently getting OrderSend error 2 and error 3 errors about 7/8ths thru the backtest (okay prior to that) after which no new trades are taken.

I've done some searching around but can't find an answer to the problem.

What might be causing this?

Marco vd Heijden
Moderator
4814
Marco vd Heijden  

Please see:

Files:
Carl Schreiber
6791
Carl Schreiber  
billworld2:

I'm doing multiple broker backtesting for some strategies I've created. The data used for testing is the same at all brokers (via import). I'm testing using MT4 build 1010 on all. I'm not seeing any errors when testing my strategies at FXCM, Tallinex and ForexWare/TradeWiseFX however when testing on FXChoice I'm consistently getting OrderSend error 2 and error 3 errors about 7/8ths thru the backtest (okay prior to that) after which no new trades are taken.

I've done some searching around but can't find an answer to the problem.

What might be causing this?

Well the error code tells you the reason! Error 3 means:

ERR_INVALID_TRADE_PARAMETERS

Invalid trade parameters


So just print out the values of your order function and compare them to what the broker requires, MatketInfo(..) or the mql5 one like SymbolInfo...()
billworld2
22
billworld2  
Carl Schreiber:

Well the error code tells you the reason! Error 3 means:

ERR_INVALID_TRADE_PARAMETERS

Invalid trade parameters


So just print out the values of your order function and compare them to what the broker requires, MatketInfo(..) or the mql5 one like SymbolInfo...()

Why then is it working about 7/8ths of the way and only then fails? There must be something cumulative at play here which builds up to cause the failure.

I suspected a MaxLots ceiling might be the issue, but, it is not. 

Carl Schreiber
6791
Carl Schreiber  

Well, I am sorry but my crystal ball has got a crack - you have to check your values youself and compare them with the limits of the broker!!

Either print them out or put them on the chart with Comment(..) or ue the debugger.

To add comments, please log in or register