- build 600 is killing my account
- [Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2.
- Indicators: FX Multi-Meter II
One thing is to say "comments are not reliable" and an other is there is no comment without warning message. Until build 509 all comments have worked fine.
I am not referring to the modification of the comments after a partial closure, but the original comment in the opening position.
One thing is to say "comments are not reliable" and an other is there is no comment without warning message. Until build 509 all comments have worked fine.
I am not referring to the modification of the comments after a partial closure, but the original comment in the opening position.
Up to build 509 comment are automatically truncated after the 31th, without any warning message. The only bug in my opinion is in the documentation who don't mention this limitation.
It's a bad coding practice to base your code on information that can be changed by the broker without any warning. Maybe it's time to find a more reliable way ?
Up to build 509 comment are automatically truncated after the 31th, without any warning message. The only bug in my opinion is in the documentation who don't mention this limitation.
It's a bad coding practice to base your code on information that can be changed by the broker without any warning. Maybe it's time to find a more reliable way ?
But a such response is not enough for solve a lot of interest linked to comments.
I don't wanna talk about comment after a partial closing but the comment after the opening! I have seen that if the waited comment is longer than 32 character what appears is a couple of brackets with magic number inside.
Nowadays we work with 64 bits OS, the millenium bug is so far from us but a comment still preserves a lenght limit! No truncate solution (at least) but a substitution!! Let's think an EA that generates hedge orders linked to a specific base order (i.e. #567) and every hedge order have to report in comment their pedigree with a special string into the comment (i.e. "Hedge of #567# "). We can have some base orders and for every ones we can have one or more hedge orders. To keep EA secure, transportable and get full fail over compliance, we need to incorporate infos in the comment (best solution will be to add a field "TAG" in the order properties...). We can't think to work with Platform variables or file I/O (if I have to change PC these information will be lost).
I think that the solution is simple: in the struct/class of the order, enlarge the variable size from nchar to varchar and change the feature of comment rendering from substitution solution to truncate (in case of nchar).
P.S. I send also this post in Highlight thead "MetaTrader 4 Client Terminal build 646: New Smart Search, Books in the Market and Updated Window of MQL4 Application Settings", because of in the latest version of the platform (646) the bug persists again.
But a such response is not enough for solve a lot of interest linked to comments.
I don't wanna talk about comment after a partial closing but the comment after the opening! I have seen that if the waited comment is longer than 32 character what appears is a couple of brackets with magic number inside.
Nowadays we work with 64 bits OS, the millenium bug is so far from us but a comment still preserves a lenght limit! No truncate solution (at least) but a substitution!! Let's think an EA that generates hedge orders linked to a specific base order (i.e. #567) and every hedge order have to report in comment their pedigree with a special string into the comment (i.e. "Hedge of #567# "). We can have some base orders and for every ones we can have one or more hedge orders. To keep EA secure, transportable and get full fail over compliance, we need to incorporate infos in the comment (best solution will be to add a field "TAG" in the order properties...). We can't think to work with Platform variables or file I/O (if I have to change PC these information will be lost).
I think that the solution is simple: in the struct/class of the order, enlarge the variable size from nchar to varchar and change the feature of comment rendering from substitution solution to truncate (in case of nchar).
P.S. I send also this post in Highlight thead "MetaTrader 4 Client Terminal build 646: New Smart Search, Books in the Market and Updated Window of MQL4 Application Settings", because of in the latest version of the platform (646) the bug persists again.
Don't lost your time arguing about how order's comment should be, there is no bug at all. It's a fact that it can't be used reliably, so you have to find an other way.
The documentation for OrderComment states: "comment=NULL [in] Order
comment text. Last part of the comment may be changed by server."
I have found the OrderComment to be extremely reliable and usefull in coding strategies for placing opposing pending orders just prior to news or economic report times just by adding to the comment a sequence number that identifies the pair of orders.
The comment placed by the expert remains intact until the order is closed at which time the servers of some brokers append "sl" or "tp".
It is horrendous to try another way like using a different OrderMagicNumber for each pair becomes a nightmare!
Should the Broker alter the behaviour of OrderComment() and does not notify you then you can claim or certainly make sure that the Broker gets a bad press report.
Why would you need to do that. Filter by magic number and pair in the OrderSelect loop. Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 forum
Use a range of numbers to differentiate different timeframes or different strategies.
Why would you need to do that. Filter by magic number and pair in the OrderSelect loop. Symbol Doesn't equal Ordersymbol when another currency is added to another seperate chart . - MQL4 forum
Use a range of numbers to differentiate different timeframes or different strategies.
Your suggestion has merit, however report trading strategy is usually run automatically from one expert filtering a csv file which lists the multi currency reports to be carried out for the next week.
Your suggestion has merit, however report trading strategy is usually run automatically from one expert filtering a csv file which lists the multi currency reports to be carried out for the next week.
If we operate in professional way we cannot use i/o streaming. Using files force the strategy to follow the client life. What's happen if an electrical shutdown occurs? We are lost and all our trades too. No, thanks you! I must be able to activate a secondary client that reads all necessary info and get full control of the strategy.
The solution is a new field in Order properties: Tag. Like in other object (class object) the Tag property is a multi purpose field, useful for storage extra info. If in MetaQuotes don't want implement such a field, at least enlarge the size of OrderComment property and set reliable his content.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use