Download MetaTrader 5
To add comments, please log in or register
Post web links to paid signals. Receive the partner's share!
Julie
11
Julie 2015.10.27 23: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 

qjol
3243
qjol 2015.10.28 04:51  

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

search the experts log

Keith Watford
Moderator
7904
Keith Watford 2015.10.28 04: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.

Carl Schreiber
5940
Carl Schreiber 2015.10.28 06: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...?

Julie
11
Julie 2015.10.28 15:13  
Great, thank you for the replies! Doing that via magic number turned out the easiest. 
/
To add comments, please log in or register