2018.05.16 18:05:40 failed market buy 0.15 XAUUSD, close #2 sell 0.15 XAUUSD 1321.220 [Invalid price]
2018.05.16 18:05:40 CTrade::OrderSend: market buy 0.15 XAUUSD [invalid price]
2018.05.16 18:05:40 *** FAILED Closing Position. Return code=10015. Code description: invalid price__ Invalid price
When I run the backtest with "OHLC Minute" or "Tick based on every tick" I still get a lot of these error messages but now the EA does manage to open and close several positions during the backtest period.
I use the
bool CTrade::PositionClose(const ulong ticket,const ulong deviation)
The broker is ForexTime.
It's an MT5 bug.
XAUUSD tick size is 0.01 on this broker
But the strategy tester returns ticks with prices like 1310.291.
You need to report this to your broker and write to Metaquotes ServiceDesk.
Yes, this seems to be the problem. Thank you.
We have reported the issue and we'll keep you posted for anything new.