Broker specific modification.
Can't modify comments.
Metaquotes language: OrderComment() is not able to be modified - Expert Advisors and Automated Trading - MQL5 programming forum (2013)
Not a good idea to use comments, brokers can change comments, including complete replacement.
Broker specific modification.
Can't modify comments.
Metaquotes language: OrderComment() is not able to be modified - Expert Advisors and Automated Trading - MQL5 programming forum (2013)
Not a good idea to use comments, brokers can change comments, including complete replacement.
Thank you dear William, i got it. Now i know it is not good idea to use order comments.
Do you think OrderOpenTime() can work as a good filter to filter an order from others?
You have to see your broker specific … at my broker , for example , is the same… once the order is closed by SL or TP, a [SL] or a [TP will be added to the comment . But I have observed that if the trade is still open , or the trade was closed NOt by SL or tp, order comment remains as I have set it. But this doesn’t mean that it will be like this forever. As it has been said, should avoid using comments as filters
Hey dear Daniel
You are right, I use comments as filters but now i know its not good idea, so do you think OrderOpenTime() can work as a good filter?
Thank you for help
I guess it depends on the strategy… in your strategy, this EA will open many trades in the same chart?
Yes exactly
I want to create a filter to detect a closed order by tp and it is necessary to a parameter be unique for each order that i open or opened or will open.
I used order comment but today i got that broker could modify order comment in trade history puol. Its my new idea: use OrderOpenTime() that it is unique for each deal and i will save this time in somewhere for use next(i will not open 2 or more orders in same time).
If you need "something" that is unique to each trade then use their ticket numbers which are already unique. That is what the "ticket" is for. Why complicate matters?
If you need to group trades, then use the "Magic Number ID" that you can assign to them when you place the order.
So, in conclusion, use the "tickets" to uniquely identify each trade, and use the "magic number" to identify a basket or group of trades.
If you need "something" that is unique to each trade then use their ticket numbers which are already unique. That is what the "ticket" is for. Why complicate matters?
If you need to group trades, then use the "Magic Number ID" that you can assign to them when you place the order.
So, in conclusion, use the "tickets" to uniquely identify each trade, and use the "magic number" to identify a basket or group of trades.
Thank you dear Fernando
You are right I decided to use ticket number.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi everyone
I have a question
I printed comment of an order closed by Take profit (I selected deal with OrderSelect() from trade history)
I expected for get comment that i sent with OrderSend() but what i got in Print is this :
my ordercomment:
but what i got when printed:
Do [tp] append to end of closed deals by tp?
Thanks