• 概述
  • 评论
  • 评论 (13)
  • 新特性

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.


Settings

  • 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

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 https://www.forexfactory.com in the terminal settings. An example is shown in the figure.


A sample of the Calendar.txt file format

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

无评论
版本 1.32 - 2017.04.27
Version 1.32 of the script has been fixed for the new site address.

Old address
http://www.forexfactory.com/

New address
https://www.forexfactory.com/
版本 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.