Using comments in the OrderSend() function

 
Hi,
The MQL reference about the comment argument of the OrderSend() function says the following:
Last part of the comment may be changed by server
.
Can somedy explain what does last part mean?
Can the trade server add additional text to this comment? If yes, is there a separator between my comment and the one added by the trade server?
Best regards,
Levente
 
Yes, the trade server can add additional text to the comment of an order. Usually are [tp] and [sl].
 
Hi and thanks for your reply!
Does the trade server ever truncate or modify parts of my comment, or it will always append to it?
Best regards,
Levente
 
comment is seperit words fuly ok
see comment in Terminil>(rite click)>Comments ... will showe you comment fully ok list all, yes.
 
Hello!
I am sorry, but did not understand the above explanation.
Could you please re-phrase it?
For me it is very important to get back the same text as the one I have sent.
If some additional information is appended to it, that's fine, but I want to know if the text I created remains untouched.
Best regards,
Levente
 
See "MQL4: OrderSend"

Parameters:
symbol - Symbol for trading.
cmd - Operation type. It can be any of the Trade operation enumeration.
volume - Number of lots.
price - Preferred price of the trade.
slippage - Maximum price slippage for buy or sell orders.
stoploss - Stop loss level.
takeprofit - Take profit level.
comment - Order comment text. Last part of the comment may be changed by server.
magic - Order magic number. May be used as user defined identifier.
expiration - Order expiration time (for pending orders only).
arrow_color - Color of the opening arrow on the chart. If parameter is missing or has CLR_NONE value opening arrow is not drawn on the chart.
 
I would like to see some parameters to let us retry the send during busy times, like: the number of retries, the time between retries, and a range of points outside of which the send is not executed. Return codes denoting exactly why the send fails would also be appropriate. I'm currently using the OrderReliable_V1_1_1.mqh file which helps, but this logic whould be available in the commands themselves.
 
"should" be available - sorry
 
Hi,

Where can I download the OrderReliable_V1_1_1.mqh file mentioned in the previous answer?
I need to write code that makes sure that a trade is created.
Looking to the documentation of the OrderSend() function, there are many possible scenarios for errors.

My strategy so far was the following:
1. try create the trade repeteadly a configurable number of times within the start() callback.
2. if trade creation fails, leave the start() method, and retry in the next start() callback.
This assumes maintaining on my side some bookeeping information about failed trades.

Does anyone have a better solution for accomplishing this?

Best regards,
Levente
 
Levente: Google the file name - you'll find it. I saw it on a site with a collection of of MT4 experts. It's an include, so it's source code and you can see what it's doing. I use it as is, and my orders do seem to be more "reliable" lately. <grin>
 
I just see your posting - thanks a lot for the tip!
Regards,
Levente
Reason: