Sound like partial close.
...
Unfortunately, no good news for you (at least with Metatrader 4, version 5 with "one order per symbol" will not have that problem, but that is a completely different story)
__________________________
The problem is that partial close changes not just your ticket number (the remaining part becomes a whole new ticket), but also that whatever you place on an original ticket as description is overwritten. Now I would not mind that if it was not for a "minor" detail : we (the users) can not change the description field as opposed to brokers that can. So we can not keep track of a trade going through partial closes, since brokers can and are happily changing our initial description for the trade.
We (the users) in fact do not have a single field of an order that we can change without changing the crucial parts of order itself (something like "whatever field")
__________________________
I know that this is not the answer you were hopping for, but...
regards
mladen
Hi, can anyone tell me why the following is happening? It is playing havoc with my EA.
I have a position open for some time. Without my intervention, it is closed and replaced with a new position. The original (now closed) position has "to # (then the new ticket number)" posted in its Comment field. The new (replacement) position has "from # (then the old ticket number)" posted in its Comment field. The opening price of the replacement position is identical to the closing price of the original position.
My EA depends upon retaining the original ticket number, so you can imagine how frustrating this is...
Any help much appreciated.
ThanksThanks for your help
Enforcer, mladen,
Thanks very much for pointing me in the right direction. My EA was indeed, due to a coding fault, closing only part of an open position.
You've saved me a lot of time - much appreciated!
Kind regards,
GannFan
One way of "tricking" a system which is based on partial closes is to instead of taking 1 trade (say 0.5 lot trade), have the EA take 5 separate trades one after the other. Then the closing becomes simple. You might have a slight difference in price, but only small.
I know you've solved your problem (fault in coding) but in case anyone else has the problem.
Happy trading,
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- 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, can anyone tell me why the following is happening? It is playing havoc with my EA.
I have a position open for some time. Without my intervention, it is closed and replaced with a new position. The original (now closed) position has "to # (then the new ticket number)" posted in its Comment field. The new (replacement) position has "from # (then the old ticket number)" posted in its Comment field. The opening price of the replacement position is identical to the closing price of the original position.
My EA depends upon retaining the original ticket number, so you can imagine how frustrating this is...
Any help much appreciated.
Thanks