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)

Licensing

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.

Quick start

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.

Usage:

example of included help by running app with '-?' parameter
Utility to compress orders.dat                                                       
 -?                : This help                                                       
 -go               : permit tool make its job, otherwise read-only mode will be used 
 -orders=<value>   : full path to 'orders.dat' file                                  
                     Type:System.String, Default value:'orders.dat'                   
 -users=<value>    : full path to 'users.dat' file                                   
                     Type:System.String, Default value:'users.dat'                    
 -nobackup         : do NOT backup current file                                      
 -balance          : compress balance trades                                         
 -closed           : compress closed trades                                          
 -credit           : compress credit trades                                          
 -orphaned         : delete orphaned trades                                          
 -pending          : delete expired pending orders                                   
 -groups=<value>   : user groups to proceed (MQ mask)                                            
                     Type:System.String, Default value:'*'                                       
 -logins=<value>   : user logins to proceed (MQ mask)                                            
                     Type:System.String, Default value:'*'
 -starting=<value> : starting date                                                   
                     Type:System.String, Default value:'01.01.0001'                   
 -ending=<value>   : ending date                                                     
                     Type:System.String, Default value:'31.12.9999'                                            

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.

Search this documentation

Popular Topics

No labels match these criteria.

Featured Pages

There is no content with the specified labels

Recently Updated Pages

  • No labels