Greetings All!
I am trying to get to the bottom of an incredibly strange issue, where my experts log and journal log are not matching up. The primary problem is that i am seeing two trades taken in the journal, but only 1 in the experts log, which from looking at the code is impossible.
Please see key part of experts log below:
the one that is missing from the experts log is 12:10:53 which you will notice there is a complete gap in the experts log for.
Any ideas?
Are you copy and pasting from the experts tab or from the log file ?
Hi Raptor,
All are taken from the Experts log file / journal log file.
Hi,
i did think that, but i do not think this is the case in this example. the reason being is that the rogue trade is appearing BEFORE we get the logs in the expert log. If this was a double up trade, we would expect to see the expert log as normal, but then a second trade triggered after the first one had been sent through.
Hi,
i did think that, but i do not think this is the case in this example. the reason being is that the rogue trade is appearing BEFORE we get the logs in the expert log. If this was a double up trade, we would expect to see the expert log as normal, but then a second trade triggered after the first one had been sent through.
No it isn't, you actually say in your first post that it is the middle trade that is not in the Experts log.
Hi,
there are two trades in the experts log, and three in the journal. The first trade in the experts links up perfectly with the first trade in the journal, it is the next trade that is duplicated. I can tell that the middle trade is a copy of the last trade by looking at the unique ID we assign to the trades in their comment field.
was just about to post this, but thought why not double check, and your right, its the first trade that is duplicated.
this is good news because at least it explains why there is a lack of logging, but the double trade is still clearly a big issue.
don't suppose you have any links to those other threads?
ok, so found a couple of the other threads.
i see the some others had issues with multiple charts / terminals running. i checked all of that first of course, but the fact that 3 trades have appeared in this journal log means that this specific terminal sent them. (i tested this with 2 terminals different directories and they do not pick up trades placed by other terminals).
allowing for the print statements i have in the code, the only logical explanation is that the terminal is sending two orders.
this has happened 3 times over past week on 2 different accounts .....
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Greetings All!
I am trying to get to the bottom of an incredibly strange issue, where my experts log and journal log are not matching up. The primary problem is that i am seeing two trades taken in the journal, but only 1 in the experts log, which from looking at the code is impossible.
Please see key part of experts log below:
12:10:51 TC EURUSD,H1: Trade: 11740585 received by client
12:10:51 TC EURUSD,H1: Order on GBPUSD received. Trading 0.30000000 lots at 1.59261000
12:10:52 TC EURUSD,H1: open #33447961 buy 0.30 GBPUSD at 1.59261 ok
12:10:52 TC EURUSD,H1: Order 33447961 filled successfully
12:10:54 TC EURUSD,H1: Trade: 11740590 received by client
12:10:55 TC EURUSD,H1: Order on GBPUSD received. Trading 0.30000000 lots at 1.59260000
12:10:56 TC EURUSD,H1: open #33448090 buy 0.30 GBPUSD at 1.59260 ok
12:10:56 TC EURUSD,H1: Order 33448090 filled successfully
This clearly shows that two trades were received, and two were opened, one at 12:10:52, the other at 12:10:56
now if we look at the journal below, we see this:
12:10:51 'xxx': instant order buy 0.30 GBPUSD at 1.59261 sl: 0.00000 tp: 0.00000
12:10:51 'xxx': request was accepted by server
12:10:51 'xxx': request in process
12:10:52 'xxx': order was opened : #33447961 buy 0.30 GBPUSD at 1.59261 sl: 0.00000 tp: 0.00000
12:10:52 'xxx': instant order buy 0.30 GBPUSD at 1.59261 sl: 0.00000 tp: 0.00000
12:10:52 'xxx': request was accepted by server
12:10:52 'xxx': request in process
12:10:53 'xxx': order was opened : #33448026 buy 0.30 GBPUSD at 1.59261 sl: 0.00000 tp: 0.00000
12:10:55 'xxx': instant order buy 0.30 GBPUSD at 1.59260 sl: 0.00000 tp: 0.00000
12:10:55 'xxx': request was accepted by server
12:10:55 'xxx': request in process
12:10:56 'xxx': order was opened : #33448090 buy 0.30 GBPUSD at 1.59260 sl: 0.00000 tp: 0.00000
We now have 3 trades, one at 12:10:52, 12:10:53, and 12:10:56
the one that is missing from the experts log is 12:10:53 which you will notice there is a complete gap in the experts log for.
we know 100% that there would have had to be a trade received log entry in it, as otherwise it would not have the information it requires to place the trade.
Here is the method for opening the trade:
As you can see its impossible to hit OrderSend without going through a number of log functions. The code for the Log function is here:
As you can see we do use an external function to write the log to a database, but there is a simple Print before that.
I have seen strange issues in the past where a DLL that is not built correctly can cause buffer overruns that effects the print functions of an EA, at this stage this is the only assumption i can make. what is more weird about this is that this code has been stable and running on hundreds of platforms for nearly 3 months, its only in the past week or so we have noticed this issue.
Any ideas?