To answer the question myself in case anyone else is having the same trouble...
I think the broker's server may be set up differently in some cases but the following has solved my issues. In the file ExpertTrade.mqh are two functions, bool CExpertTrade::Buy & bool CExpertTrade::Sell. I have added the following line of code in each of these functions immediately after the line
stops_level=m_symbol.StopsLevel()*m_symbol.Point();
add this:
SetTypeFilling(ORDER_FILLING_IOC);
Re-compile this file and also any code units that reference it and, in my case anyway, the tester now places orders correctly.
Regards, Paul.
Forum on trading, automated trading systems and testing trading strategies
fxsaber, 2017.04.09 09:37
Look at here.You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Despite several attempts and re-downloading the latest versions, I'm still unable to get a successful test on the example experts supplied with MT5. I always receive the following errors (example)
failed market buy 0.79 EURUSD [Unsupported filling mode]
CTrade::OrderSend: market buy 0.79 EURUSD [invalid fill]
Is the tester broken or do I need to set it up differently?
Regards, Paul.