Some users testing the EA on a demo account reported spurious errors. The standard MT5 logs do not provide enough details to understand what is happening, therefore version 1.90 now keeps an extensive log of the trade execution. The command sent to the broker's server and the reply received back is logged in full detail, including timing, slippage, network disconnects, etc. When the broker disabled trading from their server-side this is also logged. Check the messages in the terminal to find the exact file name of the log file.
Warning: this expert advisor is still experimental and might contain bugs. Use on live account at your risk.
Example logging:
Warning: this expert advisor is still experimental and might contain bugs. Use on live account at your risk.
Example logging:
Inserted Code
2021-11-15 09:45:00.201188: Opening buy order 0.10 lots at ask price 1.14372, no stop loss, no take profit
2021-11-15 09:45:00.201412: Sending order to trade server:
Last EURUSD tick:
bid : 1.14372
ask : 1.14372
time : 2021-11-15 10:45:00.205
Request:
action : TRADE_ACTION_DEAL
magic : 1003
order : 0
symbol : EURUSD
volume : 0.10
price : 1.14372
stopLimit : 0.00000
sl : 0.00000
tp : 0.00000
deviation : 6
type : ORDER_TYPE_BUY
type_filling : ORDER_FILLING_IOC
type_time : ORDER_TIME_GTC
expiration : (none)
comment :
position : 0
position_by : 0
2021-11-15 09:45:00.580165: Received response from trade server:
OrderSend:
success : true
lastError : 0 (Ok)
duration : 378.598 milliseconds
Result:
retcode : 10009 (Request completed)
deal : 119548555
order : 168581081
volume : 0.10
price : 1.14373
bid : 1.14373
ask : 1.14373
comment : "Request executed"
request_id : 76
retcode_external : 0
2021-11-15 09:45:00.580226: Order executed successfully
2021-11-15 09:45:00.580245: Order #168581081 opened successfully (delay 378.6 msec, slippage 0.1 pips) 1