Can anybody explain this "ghost" trade to me?

 

I am doing demo trading where an EA (called "Morning System") places pending trades which I then manage further. Now and then (so far it happened two times out of 45 trades) MT4 opens and closes a trade after the closing time of the original trade with an incorrect lot size (based on a parameter in the EA) and what is strange is that the open and close time for this phantom "ghost" trade is the same and is equal to the close time to the trade. I have inserted an example below and you will see that the original trade on AUDUSD which closed at a profit of $316.00 at 2015.07.15 17:00:18 has another "ghost" trade that shows an opening and closing time the same as the original trade and in the Comments column it refers to the original trade like so: from #2022157393

Here is the example data:

  

2022157393

2015.07.15 11:40:25

sell

0.79

audusd

0.74508

0.74503

0.74108

2015.07.15 17:00:18

0.74108

-2.12

0.00

0.00

316.00

 

336699

[tp]Morning System


2022197592

2015.07.15 17:00:18

sell

0.01

audusd

0.74508

0.74503

0.74108

2015.07.15 17:00:18

0.74108

-0.03

0.00

0.00

4.00

 

336699

from #2022157393


 
 from #2022157393 means that the trade #2022157393 was partially closed and a new trade was opened with the remaining lots
 
GumRai:
 from #2022157393 means that the trade #2022157393 was partially closed and a new trade was opened with the remaining lots
Thank you for that, but I don't do partial closes. Especially leaving just 0.01 lot over from a 0.79 lot size. You can see from the data I supplied that the trade was closed by the Take Profit setting, which specifies only one price level. Also both closing times are exactly the same to the second for both trades. Normally if you do a partial close the second close will be at a later time. So this does not make sense for me. Am I missing something?
 
http://www.mbtrading.com/metatrader4.aspx FAQ states that partial fills are possible on ECN/STP environments https://forum.mql4.com/31514, resulting in multiple ticket IDs.
Perhaps the same on close with your broker.
 
Thank you WHRoeder. Remember this is a demo account so there is no need for a proper fill on the other side of the trade. Trades are done by computer program in an instant.
 
ernest02:
Thank you WHRoeder. Remember this is a demo account so there is no need for a proper fill on the other side of the trade. Trades are done by computer program in an instant.
You get partial fills on demo too. It lets you test your EA's handling of them.
Reason: