Comment in MT5 trading history report

 
I want to analyse each EA trading from the trading history report in MT5. If a position closed by SL or TP, [sl xxx.xx] or [tp xxx.xx] is written in comment field in the report instead of original comment. I don't know which EA trades the position. Is there any way to keep original comment which EA write?
 
Mitsuru:
I want to analyse each EA trading from the trading history report in MT5. If a position closed by SL or TP, [sl xxx.xx] or [tp xxx.xx] is written in comment field in the report instead of original comment. I don't know which EA trades the position. Is there any way to keep original comment which EA write?

Please show code or screenshots of what you want corrected.

So you want a custom comment to show on the trade history?

 
Mitsuru:
Is there any way to keep original comment which EA write?
 
fxsaber #:

Yes, I know, and I want to change that. Or, I would like to know how to find an openning order that corresponds to that SL/TP order and finally to know which EA traded each position.

 
Busingye Tusasirwe #:

Please show code or screenshots of what you want corrected.

So you want a custom comment to show on the trade history?

My problem is same to the link from fxsaber.

 
Mitsuru #:

Yes, I know, and I want to change that. Or, I would like to know how to find an openning order that corresponds to that SL/TP order and finally to know which EA traded each position.

Forum on trading, automated trading systems and testing trading strategies

price slippage on pending order

fxsaber, 2022.06.14 07:32

#property script_show_inputs

#include <MT4Orders.mqh> // https://www.mql5.com/en/code/16006

input long inTicket = 0; // Position Ticket

#define PRINT(A) Print(#A + " = " + (string)(A))

void OnStart()
{
  if (OrderSelect(inTicket, SELECT_BY_TICKET))
  {
    OrderPrint();
    
    PRINT(OrderComment());
  }
}

Details.

 
Meta trader5my I'd 26712 but not a good platform I was scammed by a man or a girl. What is money? Will there be profit of 100 usd in 1 week or will they handle my account too but I have filed a report against them. I have been paid 200 usd.  
 
fxsaber #:

Details.

Brocker changes the comments...

In general, EA users often want to analyze EA trading results, but how do they do that?

We can do that with MT4 but cannot with MT5?

 
Mitsuru #:

Brocker changes the comments...

In general, EA users often want to analyze EA trading results, but how do they do that?

We can do that with MT4 but cannot with MT5?

Run the script above and enter the ticket for the position you are interested in.


 
fxsaber #: Details.

I'm sorry but I don't understand which script. Could you put the script file?

I want to analyze hundreds of records. Therefore, I need a batch processing program, not an interactive one. I may be able to develop it by looking at your code.

 
Your topic has been moved to the section: Expert Advisors and Automated Trading
Please consider which section is most appropriate — https://www.mql5.com/en/forum/172166/page6#comment_49114893
Reason: