Indentify an EA order

Jose Ramon Rosaenz Carmona  

Hi!!


I am testing two EA at same time but I can not identify which EA open each order...Would you mind to tell me which code shall I include in the EA code in order to identify each order in MT5?


I mean, I can see this in my MT5


EURUSD, Buy 0.01

1.09046 --> 1.09474

2020.04.09 16:00:02

SL = 1.08645                   Swap = -0.17

TP = 1.09645                  #609234289


And I would like to see this:


EURUSD, Buy 0.01

1.09046 --> 1.09474

2020.04.09 16:00:02 "EA Goofy"

SL = 1.08645                   Swap = -0.17

TP = 1.09645                  #609234289


Please, someone can help me??


Thaak you friends!

Jean Francois Le Bas  
Jose Ramon Rosaenz:

Hi!!


I am testing two EA at same time but I can not identify which EA open each order...Would you mind to tell me which code shall I include in the EA code in order to identify each order in MT5?


I mean, I can see this in my MT5


EURUSD, Buy 0.01

1.09046 --> 1.09474

2020.04.09 16:00:02

SL = 1.08645                   Swap = -0.17

TP = 1.09645                  #609234289


And I would like to see this:


EURUSD, Buy 0.01

1.09046 --> 1.09474

2020.04.09 16:00:02 "EA Goofy"

SL = 1.08645                   Swap = -0.17

TP = 1.09645                  #609234289


Please, someone can help me??


Thaak you friends!

use comments, or create a script that anaylises magic numbers and display it in the log

William Roeder  
  1. Magic number only allows an EA to identify its trades from all others. Using OrdersTotal/OrdersHistoryTotal (MT4) or PositionsTotal (MT5), directly and/or no Magic number filtering on your OrderSelect / Position select loop means your code is incompatible with every EA (including itself on other charts and manual trading.)
              Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 programming forum
              PositionClose is not working - MQL5 programming forum
              MagicNumber: "Magic" Identifier of the Order - MQL4 Articles

  2. Can't modify comments.
              Metaquotes language: OrderComment() is not able to be modified - Futures Trading - Expert Advisors and Automated Trading - MQL5 programming forum
    Not a good idea to use comments, brokers can change comments, including complete replacement.
Reason: