Download MetaTrader 5

Can I see which EA that was trading?

To add comments, please log in or register
All MQL5.community events are grouped together. Have a look at the Wall!
Staffan Ofwerman
1031
Staffan Ofwerman 2015.11.03 10:41 

Is there a way to see which trade was running afterwards?

If I have 4 charts with EURUSD running at the same time with different EA's. Is it possible to see which one did best? Or which one is working bad.

If they are running on a vps server and I only see the order id afterwards, then it's hard to know which one was triggered during the day.

Since they all have different MagicNumber I guess there should be a way to which trade was connected to  which EA. Any ideas?

Stuart Browne
5811
Stuart Browne 2015.11.03 11:45  
Check history against MagicNumber
Siti Latifah
6458
Siti Latifah 2015.11.03 12:31  
Stuart Browne:
Check history against MagicNumber
give comment on each orders
Osama Shaban
1448
Osama Shaban 2015.11.03 18:25  

As every one has different magic number, in such case, I prefer to link the account to myfxbook website and analyse it in deep details.

This is the best way ever. 

Staffan Ofwerman
1031
Staffan Ofwerman 2015.11.06 18:38  
Is it possible to make the comment inside the EA code (my own EA). Not sure what command to use for that.
Marco vd Heijden
Moderator
4700
Marco vd Heijden 2015.11.06 19:43  

it depends on the language.

struct MqlTradeRequest
  {
   ENUM_TRADE_REQUEST_ACTIONS    action;           // Trade operation type
   ulong                         magic;            // Expert Advisor ID (magic number)
   ulong                         order;            // Order ticket
   string                        symbol;           // Trade symbol
   double                        volume;           // Requested volume for a deal in lots
   double                        price;            // Price
   double                        stoplimit;        // StopLimit level of the order
   double                        sl;               // Stop Loss level of the order
   double                        tp;               // Take Profit level of the order
   ulong                         deviation;        // Maximal possible deviation from the requested price
   ENUM_ORDER_TYPE               type;             // Order type
   ENUM_ORDER_TYPE_FILLING       type_filling;     // Order execution type
   ENUM_ORDER_TYPE_TIME          type_time;        // Order expiration type
   datetime                      expiration;       // Order expiration time (for the orders of ORDER_TIME_SPECIFIED type)
   string                        comment;          // Order comment

  };

for MQL5

and for MQL4

ticket=OrderSend(NULL,OP_SELL,Lots,Bid,3,0,0,"COMMENT",magic,0,Red);}
Stuart Browne
5811
Stuart Browne 2015.11.07 01:10  
Staffan Ofwerman:
Is it possible to make the comment inside the EA code (my own EA). Not sure what command to use for that.
Just be aware that the server can overwrite your comment under certain conditions eg reaching SL or TP, partially closing an order etc
Staffan Ofwerman
1031
Staffan Ofwerman 2015.11.07 11:26  
Thank you Marco. I think I solved it now.
To add comments, please log in or register