In this short tutorial, Rimantas explains how to configure Local Trade Copier not to close specific positions.
Client EA has a unique parameter called MarkAllTrades_DoNotClose. We’ve added it for advanced users who have lots of open positions that should not be closed by the Client EA.
It can get quite advanced because you can mark which trades cannot be closed by the Client EA and you can also do this from your Expert Advisor or even manually. Usually, only advanced users require such functionality, and therefore this parameter is available just for the VIP plan.
How to set Trade Copier NOT to close my trades
Let’s mark the trades with a “do not close” tag.
Step #1: Tell the Client EA mark these trades with the “Do not close” tag.
When you execute a Client EA with this parameter set to TRUE, it will mark all currently open trades as “do not close“. It means Client EA will never close them under any circumstances even after you restart MT4 or the Client EA.
Client EA will mark the trades in a few seconds and then tell you to restart it.
Remove the Client EA from the chart and start it again.
Step #2: Restart the Client EA in your normal operational mode to continue its work.
Restart the Client EA with this parameter set to FALSE to continue regular Client EA operation. Any new trades will be copied/modified/closed but those marked as “do not close” will not be closed, but only adjusted to match the master (SL/TP changes, etc.).
Important things to know about the ‘Do Not Close’ tag
The “Do Not Close” tags would be lost if you reinstall MT4 or move the account to another MT4 platform because the data is stored in Tools->Global Variables.
It’s possible to move the data to another account too in case you need it sometimes; you need to copy the file named “\profiles\gvariables.dat” from your MT4 terminal Data Folder.
You can also create these “Do not close” marks (Global Variables) manually if needed in the Tools->Global Variables and Client EA will not close those trades. The format for the name of the Global Variable is: DoNotClose-ORDERTICKET
For example, a GV with the name DoNotClose-44323698 will tell the Client EA to never close the trade 44323698. Important is only the name. Values of these GV’s are ignored.