• Overview
  • Reviews
  • Comments (10)
  • What's new

Download news file

The script allows you to download news starting from 2007 and to save the data to a text file named Calendar.txt.

The news history is downloaded from the forexfactory.com site.

Calendar.txt can be later applied in Expert Advisors that use the news in their strategies, for testing or optimization.

To download the news it is necessary to run the script on any chart of any currency.

The download process will be displayed on the chart.


  • Start_Download The date to start downloading from.
  • GMT_Auto Automatic identification of the GMT offset of the forexfactory site, for saving news with the GMT 0 time offset
  • GMT_Forex_Factory Set a different GMT offset, it is necessary to set GMT_Auto= false
  • Overwrite_Update Force the updates of the previously downloaded data (Recommended - true. At false there might be errors when switching to and from the daylight saving time)

The file is saved to \MQL4\files\Calendar.txt

It is also copied to the common folder for all terminals, for example C:\Users\admin\AppData\Roaming\MetaQuotes\Terminal\Common (for the strategy tester)

It is necessary to add the link http://www.forexfactory.com in the terminal settings. An example is shown in the figure.

A sample of the Calendar.txt file contents

This is the news history with GMT 0, it can serve as an example for determining the correctness of the GMT of your file.

2007.01.01 22:30;AUD;L;AIG Manufacturing Index

2007.01.02 02:30;CNY;M;Caixin Manufacturing PMI

2007.01.02 05:30;AUD;M;Commodity Prices y/y

2007.01.02 08:15;EUR;L;Spanish Manufacturing PMI

2007.01.02 08:45;EUR;L;Italian Manufacturing PMI

2007.01.02 09:00;EUR;M;Final Manufacturing PMI

No reviews
Version 1.27 - 2016.04.07
The forexfactory.com site has changed the html code of its web pages. Because of that the script version 1.26 stopped working.
The new script version 1.27 is redesigned for the new format of the site.