How to track partial closes

Back to topics list To post a new topic, please log in or register
avatar
3
jgreb 2015.10.28 00:23
 

Dear all,

I'm puzzled with how to track partial closes in MT4 account history when multiple EAs are running on the same account, and more than one of them are doing partial closes. What I see in the comment field instead of the EA name is something like from '#24048391' or' to #24062061'.  Even though there is a number which I though was a reference to the original order, it turns out to be not. It's a vicious circle, and all trades with "to#number" lead to "from#number" and vice versa. Any ideas on how to recover the name of the original EA that placed the order? Thanks.

Julie 

avatar
3134
qjol 2015.10.28 05:51 #
 

comments are not reliable (it can be changed by the broker)

search the experts log

avatar
Moderator
3408
GumRai 2015.10.28 05:58 #
 

You cannot recover the EA name, but you can recover the Magic Number, so use a different number for each EA and symbol.

The other way would be to code your EA to write to a file with details of the trade and WindowExpertName() whenever a trade is opened.

 

avatar
2017
gooly 2015.10.28 07:21 #
 

the reminding order has got a new ticket number (reference of your broker) which is not returned by a function other then the initial ticket number which is returned by OrderSend(..).

The magic number (your reference) remains.

So you have to search in the open order pool for magic number and Symbol() and a lot size that is smaller that the initial one by...?


avatar
3
jgreb 2015.10.28 16:13 #
 
Great, thank you for the replies! Doing that via magic number turned out the easiest. 
Back to topics list  

To add comments, please log in or register