Download MetaTrader 5
To add comments, please log in or register
Share your programs. That will improve your rating.
Filip Hanzak
23
Filip Hanzak 2014.03.21 10:25 

Hi, I was wondering if anyone has experienced the same issue as me and possibly found a solution.

I am using my own EA which was written a long time ago (using pre-Build 600 Meta Editor) and I was using it successfuly for backtesting and optimization before AND after Build 600 was released. This week it suddenly started behaving strangely in live trading, but only sometimes. Despite being coded to have just a single trade at any one time (which was working 100% correctly before this week) it sometimes now opens a series of trades with 2-3 minutes intervals between them obviously coming from the same entry signal. When I looked into the log I have found the following:

02:05:39.425 '424587': order sell market 0.21 AUDUSD sl: 0.00000 tp: 0.00000
02:08:59.333 '424587': order sell 0.21 AUDUSD opening at 0.00000 sl: 0.00000 tp: 0.00000 failed [Trade timeout]
02:08:59.333 '424587': order sell market 0.21 AUDUSD sl: 0.00000 tp: 0.00000
02:12:19.242 '424587': order sell 0.21 AUDUSD opening at 0.00000 sl: 0.00000 tp: 0.00000 failed [Trade timeout]
02:12:19.742 '424587': order sell market 0.21 AUDUSD sl: 0.00000 tp: 0.00000
02:15:39.650 '424587': order sell 0.21 AUDUSD opening at 0.00000 sl: 0.00000 tp: 0.00000 failed [Trade timeout]
02:15:39.650 '424587': order sell market 0.21 AUDUSD sl: 0.00000 tp: 0.00000
02:18:59.558 '424587': order sell 0.21 AUDUSD opening at 0.00000 sl: 0.00000 tp: 0.00000 failed [Trade timeout]
02:19:00.058 '424587': order sell market 0.21 AUDUSD sl: 0.00000 tp: 0.00000
02:22:19.966 '424587': order sell 0.21 AUDUSD opening at 0.00000 sl: 0.00000 tp: 0.00000 failed [Trade timeout]
02:22:19.966 '424587': order sell market 0.21 AUDUSD sl: 0.00000 tp: 0.00000
02:25:39.874 '424587': order sell 0.21 AUDUSD opening at 0.00000 sl: 0.00000 tp: 0.00000 failed [Trade timeout]
02:25:40.374 '424587': order sell market 0.21 AUDUSD sl: 0.00000 tp: 0.00000
02:29:00.282 '424587': order sell 0.21 AUDUSD opening at 0.00000 sl: 0.00000 tp: 0.00000 failed [Trade timeout]
02:29:00.282 '424587': order sell market 0.21 AUDUSD sl: 0.00000 tp: 0.00000
02:32:20.190 '424587': order sell 0.21 AUDUSD opening at 0.00000 sl: 0.00000 tp: 0.00000 failed [Trade timeout]
02:32:20.705 '424587': order sell market 0.21 AUDUSD sl: 0.00000 tp: 0.00000
02:35:40.613 '424587': order sell 0.21 AUDUSD opening at 0.00000 sl: 0.00000 tp: 0.00000 failed [Trade timeout]
02:35:40.613 '424587': order sell market 0.21 AUDUSD sl: 0.00000 tp: 0.00000
02:39:00.521 '424587': order sell 0.21 AUDUSD opening at 0.00000 sl: 0.00000 tp: 0.00000 failed [Trade timeout]
02:39:01.192 '424587': modify order #38072057 sell 0.21 AUDUSD at 0.90312 sl: 0.00000 tp: 0.00000 -> sl: 0.90880 tp: 0.00000
02:42:21.101 '424587': modification of order #38072057 sell 0.21 AUDUSD at 0.90312 sl: 0.90880 tp: 0.00000 -> sl: 0.90880 tp: 0.00000 failed [Trade timeout]
02:42:21.101 '424587': modify order #38072365 sell 0.21 AUDUSD at 0.90249 sl: 0.00000 tp: 0.00000 -> sl: 0.90880 tp: 0.00000
02:45:41.009 '424587': modification of order #38072365 sell 0.21 AUDUSD at 0.90249 sl: 0.90880 tp: 0.00000 -> sl: 0.90880 tp: 0.00000 failed [Trade timeout]
02:45:41.009 '424587': modify order #38073247 sell 0.21 AUDUSD at 0.90260 sl: 0.00000 tp: 0.00000 -> sl: 0.90880 tp: 0.00000
02:49:00.918 '424587': modification of order #38073247 sell 0.21 AUDUSD at 0.90260 sl: 0.90880 tp: 0.00000 -> sl: 0.90880 tp: 0.00000 failed [Trade timeout]
02:49:00.918 '424587': modify order #38073579 sell 0.21 AUDUSD at 0.90219 sl: 0.00000 tp: 0.00000 -> sl: 0.90880 tp: 0.00000
02:52:20.826 '424587': modification of order #38073579 sell 0.21 AUDUSD at 0.90219 sl: 0.90880 tp: 0.00000 -> sl: 0.90880 tp: 0.00000 failed [Trade timeout]
02:52:20.826 '424587': modify order #38074621 sell 0.21 AUDUSD at 0.90200 sl: 0.00000 tp: 0.00000 -> sl: 0.90880 tp: 0.00000
02:55:40.734 '424587': modification of order #38074621 sell 0.21 AUDUSD at 0.90200 sl: 0.90880 tp: 0.00000 -> sl: 0.90880 tp: 0.00000 failed [Trade timeout]
02:55:42.999 '424587': modify order #38072057 sell 0.21 AUDUSD at 0.90312 sl: 0.90880 tp: 0.00000 -> sl: 0.90802 tp: 0.00000
02:59:02.907 '424587': modification of order #38072057 sell 0.21 AUDUSD at 0.90312 sl: 0.90802 tp: 0.00000 -> sl: 0.90802 tp: 0.00000 failed [Trade timeout]
02:59:02.907 '424587': modify order #38072365 sell 0.21 AUDUSD at 0.90249 sl: 0.90880 tp: 0.00000 -> sl: 0.90802 tp: 0.00000
03:02:22.815 '424587': modification of order #38072365 sell 0.21 AUDUSD at 0.90249 sl: 0.90802 tp: 0.00000 -> sl: 0.90802 tp: 0.00000 failed [Trade timeout]
03:02:22.815 '424587': modify order #38073247 sell 0.21 AUDUSD at 0.90260 sl: 0.90880 tp: 0.00000 -> sl: 0.90802 tp: 0.00000
03:05:42.724 '424587': modification of order #38073247 sell 0.21 AUDUSD at 0.90260 sl: 0.90802 tp: 0.00000 -> sl: 0.90802 tp: 0.00000 failed [Trade timeout]
03:05:42.724 '424587': modify order #38073579 sell 0.21 AUDUSD at 0.90219 sl: 0.90880 tp: 0.00000 -> sl: 0.90802 tp: 0.00000
03:09:02.633 '424587': modification of order #38073579 sell 0.21 AUDUSD at 0.90219 sl: 0.90802 tp: 0.00000 -> sl: 0.90802 tp: 0.00000 failed [Trade timeout]
03:09:02.633 '424587': modify order #38074621 sell 0.21 AUDUSD at 0.90200 sl: 0.90880 tp: 0.00000 -> sl: 0.90802 tp: 0.00000
03:12:22.542 '424587': modification of order #38074621 sell 0.21 AUDUSD at 0.90200 sl: 0.90802 tp: 0.00000 -> sl: 0.90802 tp: 0.00000 failed [Trade timeout]
03:12:22.542 '424587': modify order #38075724 sell 0.21 AUDUSD at 0.90195 sl: 0.00000 tp: 0.00000 -> sl: 0.90802 tp: 0.00000
03:15:42.451 '424587': modification of order #38075724 sell 0.21 AUDUSD at 0.90195 sl: 0.90802 tp: 0.00000 -> sl: 0.90802 tp: 0.00000 failed [Trade timeout]
03:15:42.451 '424587': modify order #38076905 sell 0.21 AUDUSD at 0.90193 sl: 0.00000 tp: 0.00000 -> sl: 0.90802 tp: 0.00000
03:16:07.720 '424587': login
03:16:07.876 '424587': previous successful authorization performed from 10.28.15.104
03:16:07.876 '424587': modify order #38077718 sell 0.21 AUDUSD at 0.90188 sl: 0.00000 tp: 0.00000 -> sl: 0.90802 tp: 0.00000
03:16:08.079 '424587': request was accepted by server
03:16:08.079 '424587': order #38077718 sell 0.21 AUDUSD at 0.90188 was modified -> sl: 0.90802 tp: 0.00000
03:16:08.079 '424587': modify order #38077881 sell 0.21 AUDUSD at 0.90182 sl: 0.00000 tp: 0.00000 -> sl: 0.90802 tp: 0.00000
03:16:08.111 '424587': request was accepted by server
03:16:08.111 '424587': order #38077881 sell 0.21 AUDUSD at 0.90182 was modified -> sl: 0.90802 tp: 0.00000
03:16:08.111 '424587': modify order #38077895 sell 0.21 AUDUSD at 0.90190 sl: 0.00000 tp: 0.00000 -> sl: 0.90802 tp: 0.00000
03:16:08.142 '424587': request was accepted by server
03:16:08.142 '424587': order #38077895 sell 0.21 AUDUSD at 0.90190 was modified -> sl: 0.90802 tp: 0.00000

So there were 10 attempts to open a trade all of which failed on trade timeout. Then there were attempts to modify the trades (add stop loss) all of which have failed on trade timeout as well. My first question here is - in order for an EA to try to modify an order, the order needs to be present on the server first, but in the log there is no confirmation of acceptance of any of the orders by the broker (just 10 failed attempts, no confirmation). Does it mean that the orders were eventually opened by the broker but my MT4 terminal was not sent a confirmation about it? Usually a confirmation of a new trade looks like: "request was accepted by server", "request in process", "order was opened : #123456..." Because there was no such confirmation my EA thought there is no trade and tried to open a new one again and again. Second question: can the broker somehow add the orders in the server history retrospectively without a confirmation (because this is exactly how it looks like)? All the orders are in my MT4 account history with the same timestamp as the opening a new order attempts that failed on trade timeout.

Then there was another series of attempts to modify the orders which were successful after the automated re-login that happened at 3:16:07.

This has happened on 3 independent computers all running Build 610 at 3 different times of the day (between 10:30pm and 6am UK time). As I have said, it only started happening this week and even during this week, there were other trades taken correctly just once on the same computer, on the same MT4 with the same EA. There were no such problems with exactly the same setup before build 600 or even with Build 600 until this week. Is my suspicion that this is more a problem on the broker's server side correct or not?


Thank you for any help.

whroeder1
13596
whroeder1 2014.03.21 13:24  
Fikorator: (just 10 failed attempts, no confirmation). Does it mean that the orders were eventually opened by the broker but my MT4 terminal was not sent a confirmation about it?
Second question: can the broker somehow add the orders in the server history retrospectively without a confirmation (because this is exactly how it looks like)?
Is my suspicion that this is more a problem on the broker's server side correct or not?
  1. No, it means the request was sent and no reply received. At that point an order may or may not have been opened on the server. I return from start and wait for the next tick, then do a OrderSelect loop to find out if an order was or wasn't opened.
  2. Each tick you get new prices and current history. If an order is closed (TP, SL, margin call) on the server, history is updated. Confirmation is irrelevant.
  3. It could be on the server or your connection - there is no way to know. But when you get a new tick, you now have current information (network connected and server ticking.)
Filip Hanzak
23
Filip Hanzak 2014.03.21 14:27  

The OrderSelect is performed every tick because the EA is supposed to open just 1 trade per magic number and it worked OK even later that same day, this is why I am so confused.

Thanks for the reply anyway.

/
To add comments, please log in or register