Tools to calculate dividends
Installation
First of all, ensure your server has the Visual Studio 2015 redistributable installed.
The package can be downloaded from the CPlugin.Dividender feed.
In MySQL you need to have a table like this:
CREATE TABLE `dividends` (
`name` VARCHAR(12) NULL DEFAULT NULL COMMENT 'symbol name',
`amount` DECIMAL(10,6) NULL DEFAULT NULL COMMENT 'amount',
`ddate_expiration` DATE NULL DEFAULT NULL COMMENT 'expiration date'
) ENGINE=InnoDB;
The program needs these files to be present in the application's folder:
mt4manapi.dlllibmysql.dllconfig.cfg
Copy config.cfg.example to config.cfg to use it as the default settings file.
When the application starts, it:
- reads data from the MySQL database;
- reads open trades from MT4;
- calculates those dividends whose
ddate_expirationequals the current date; - makes trade transactions in MT4.
The program maintains storage for successfully credited dividends, to avoid duplicate trade transactions after multiple executions during a single day.
Run
By default, when you launch the application it runs in read-only mode to avoid mistakes. To enable write mode, use the -w command-line switch.
Without a valid license the program only calculates dividends — the actual trade transactions in MT4 will not happen.

