This is a tool to compress overgrown orders.dat file in place.
It has few modes:
- remove orphaned orders (where login equals to zero);
- remove expired pending orders;
- aggregate closed orders profit;
- aggregate balance orders profit;
- aggregate expired (on current date) credit operations profit.
It reads the file directly from disk and write compressed database back to disk. By default, it will make backup of original database. The tool uses users.dat database to perform double check its algorithms with actual users' balances twice: on start and at the end.
There is an option to specify user groups by using -groups parameter with corresponding regular expression. Same option available for logins.
Files can be downloaded from our website: http://nuget.cplugin.com/feeds/apps/CPlugin.Tools.CompressMT4DB
You also need to download and install from Microsoft's website: Download Microsoft .NET Framework 4.6.1 (Web Installer)
License grants usage of tool on a single server.
Without valid license program will run in read-only mode to calculate and demonstrate possible result.
To try out, how lesser your database might become after tool you can run it in read-only mode and do not specify starting and/or ending date. But you have to specify explicitly each mode you are going to use.
CPlugin.CompressMT4DB.exe -orders=c:\metatrader4\bases\orders.dat -users=c:\metatrader4\bases\users.dat -balance -closed -credit -orphaned -pending
Whenever you satisfied with results you can run in read/write mode by specifying -go flag.
It uses formula of
[starting, ending) way for looking a time being within range or not.
Also, spaces not allowed in parameters. So `starting` and `ending` field could only contain a date.