Checking the server time changes due to the daylight saving time (DST) changeover – script MetaTrader 5

Checking the server time changes due to the daylight saving time (DST) changeover - script for MetaTrader 5
Unfortunately, I discovered that some brokers are a bit sloppy with the server timechange due to the daylight saving time (DST), which I did not expect and which surprised me a lot.The FOREX session is exactly 120 hours:from Sunday 5:00 p.m. Eastern Standard Time (North America) or EST to Friday 5:00 p.m. EST.The problem arises … Read more

Strategy report output into a chart – script MetaTrader 5

Blue and red arrows displaying deals
Follow these steps: Put report_into_chart.mql5 into ¨\MQL5\Scripts” folder. Compile report_into_chart.mql5 and get report_into_chart.ex5. Unzip StrategyTester.zip and put StrategyTester.html into ¨\MQL5\Files” folder. Refresh your Metatrader 5. Run report_into_chart script from Metatrader and all deals will be displayed on the selected chart as blue (buy positions) or red (sell positions) arrows. Later you can replace StrategyTester.html file with … Read more

Script to Map Market Watch Symbols Based on Similarity – script MetaTrader 5

Script to Map Market Watch Symbols Based on Similarity - script for MetaTrader 5
This script is a reference solution designed to help developers and MetaTrader 5 users solve a common problem: the mismatch between configured symbol names and the actual names provided by brokers. As a developer, I have faced this challenge when working on configurable Expert Advisors (EAs), especially those that handle multi-symbol strategies. It is common … Read more

Swap Monitor – script MetaTrader 5

Swap Monitor - script for MetaTrader 5
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 … Read more

Script to extract Candlesticks data from all time frames to CSV. – script MetaTrader 5

Script to extract Candlesticks data from all time frames to CSV. - script for MetaTrader 5
Overview of the CandlesticksData Script The CandlesticksData script is designed for the MetaTrader 5 trading platform, allowing traders and developers to export detailed candlestick data into a CSV file for further analysis or record-keeping. This script is particularly useful for quantitative analysis, backtesting trading strategies, or for educational purposes, enabling users to examine historical price … Read more

TimeServerDaylightSavings – script MetaTrader 5

Example of week opening hour changes in quotes due to DST switch
This script introduces the function TimeServerDaylightSavings() that is missing among the built-in ones, which provide only TimeDaylightSavings() for local computer. In addition the attached header mqh-file includes some other helpful server-bound time-related functions, in particular allowing you to know if your broker uses DST switches in general. All this is based on empirical analysis of … Read more

Code To Check And Delete Chart Objects For MT5 – script MetaTrader 5

Code To Check And Delete Chart Objects For MT5 - script for MetaTrader 5
To Check And Delete Chart Objects For MT5 Check And Delete Chart Object Script Scans through the current chart for any available chart objects, Counts and delete them accordingly -And log the the names of the objects on the chart respectively. Code To Check And Delete Chart Objects For MT5 – script for MetaTrader 5