Add Comment to EA

 

Hi, Ca anyone please let me know what the code is to add a comment to an EA. When I look at my account history as an example I want to see the EA name (GridTrader) in the comment filed. Any help greatly appreciated

Best rgds and Thank you

 

You have to place it along with OrderSend() (when you open an order)

The order send format is the following :

int OrderSend( string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment=NULL, int magic=0, datetime expiration=0, color arrow_color=CLR_NONE)

Specify the EA name in the comment parameter of the order send function. Just be aware that in cases of partial closes that field (the comment field) is going to be altered by your brooker and that you will, in case of partial closes, lose the name in the comment field

 

Thank you mladen!! Much appreciated!

 

i am new dont know the  any coding language .. plz tell me  how to add this  word by word :( becoz i dont know how to add and where add  . i want same

 
  1. Naveed Iqbal: dont know the  any coding language .
    If you don't learn MQL4/5, there is no common language for us to communicate. If we tell you what you need, you can't code it. If we give you the code, you don't know how to integrate it into yours.

    or pay (Freelance) someone to code it.
              Hiring to write script - General - MQL5 programming forum

  2. Naveed Iqbal: i dont know how to add and where add  
    Perhaps you should read the manual. You would have found an example here.
Reason: