Tools to calculate dividends

Installation

First of all, ensure your server has the Visual Studio 2015 redistributable installed.

To get the files, contact us.

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.dll
  • libmysql.dll
  • config.cfg

Copy config.cfg.example to config.cfg to use it as the default settings file.

When the application starts, it:

  1. reads data from the MySQL database;
  2. reads open trades from MT4;
  3. calculates those dividends whose ddate_expiration equals the current date;
  4. 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.