Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 5 Script | Swap Monitor

This is a service, which periodically inspects actual swaps for specified symbols and saves new values (if changes detected) into CSV-files. The files are created in folders under the names of corresponding symbols and splitted by months - for example, the file 202410.csv is for October of 2024. Every line in a CSV-file stores a datetime, long swap and short swap.

MetaTrader Experts, Indicators, Scripts and Libraries

Also the service check swaps of existing positions and alerts their changes (if any).

The source code can run as a script on a chart if the directive #property service is commented out. But it's recommended to install the program as a service.

The code base does not support services as one of available MQL5 program types, this is why the program is published as a script.

53007