Download MetaTrader 5
To add comments, please log in or register
Find out how your rating can be improved
sami awan
79
sami awan 2016.03.06 08:36 
I have written an mt4 EA. I want it to display my contact information in order comment. What exactly should i write in source code if i want my EA to display my email id that is, "sammiawan@gmail.com" in the order comments and charts.
Thank in advance.
peter.MT4Web
158
peter.MT4Web 2016.03.06 09:21  
If you want your email id as OrderComment, insert it in your OrderSend call.
Keith Watford
Moderator
9544
Keith Watford 2016.03.06 09:21  

You put it in the OrderComment parameter when using OrderSend().

You use Comment() on the chart

You've written an EA and you don't know this?

Vasyl Nosal
18463
Vasyl Nosal 2016.03.06 09:59  
Better to use #property description
sami awan
79
sami awan 2016.03.06 10:34  
sammiawan999:

Thanks brother. What exactly should i type in the source code?  Can you please type here for me? That complete line..

I actually wrote in ordersend () parameter but its not displaying :D
Keith Watford
Moderator
9544
Keith Watford 2016.03.06 10:46  
sammiawan999:

I actually wrote in ordersend () parameter but its not displaying :D
Not displaying where?
sami awan
79
sami awan 2016.03.06 10:49  
GumRai:
Not displaying where?

In the comment it is only displaying [tp] or [sl] as the case is.
Keith Watford
Moderator
9544
Keith Watford 2016.03.06 11:36  
sammiawan999:

In the comment it is only displaying [tp] or [sl] as the case is.
Then your broker is overwriting the comment. Check the order comment while it is still open.
sami awan
79
sami awan 2016.03.06 14:36  
GumRai:
Then your broker is overwriting the comment. Check the order comment while it is still open.

No when trade is open its showing blank:(((
This is what exactly my EA code contains:
OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,0,0,"sammiawan@gmail.com,MagicNumber,0,Blue);
Keith Watford
Moderator
9544
Keith Watford 2016.03.06 20:14  
sammiawan999:

No when trade is open its showing blank:(((
This is what exactly my EA code contains:
OrderSend(Symbol(),OP_BUY,Lots,Ask,Slippage,0,0,"sammiawan@gmail.com,MagicNumber,0,Blue);

You should get a compiler error because of the missing " after com

I can only guess that your broker is removing the order comments for some reason. Check with them

Vasyl Nosal
18463
Vasyl Nosal 2016.03.06 20:19  
GumRai:

You should get a compiler error because of the missing " after com

I can only guess that your broker is removing the order comments for some reason. Check with them

Oh gush. Order of comment changes if:order closes by tp or sl or partial close of order.
/ /12
To add comments, please log in or register