• Home
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • User/Email: Password:
  • 5:10pm
Menu
  • Forums
  • Trades
  • News
  • Calendar
  • Market
  • Brokers
  • Login
  • Join
  • 5:10pm
Sister Sites
  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Options

Bookmark Thread

First Page First Unread Last Page Last Post

Printable Version

Similar Threads

How can I get News History Data from Forexfactory as XML file 6 replies

Get ff_calendar_thisweek .xml file by date range??? 13 replies

FF calendar change XML ff_calendar_thisweek .xml 0 replies

ff calendar xml usage 5 replies

  • Platform Tech
  • /
  • Reply to Thread
  • Subscribe
  • 3
Attachments: where to find FF "actual" calendar data within the xml file?
Exit Attachments

where to find FF "actual" calendar data within the xml file?

  • Post #1
  • Quote
  • First Post: Jul 5, 2017 11:09pm Jul 5, 2017 11:09pm
  •  tanwt
  • | Joined Feb 2016 | Status: Member | 76 Posts
Hi all,

i try to write an EA to make trade based on news results

i got the ff xml files and it has data for previous and forecast

but i can't find any info for actual

any idea if it exist and if yes where to find it?

http://www.forexfactory.com/ff_calendar_thisweek.xml
this is my source

if FF xml doesn't have this info, are there any other source to get the previous, forecast and actual data?

Thanks in advance
  • Post #2
  • Quote
  • Jul 6, 2017 5:47am Jul 6, 2017 5:47am
  •  tanwt
  • | Joined Feb 2016 | Status: Member | 76 Posts
anyone?
  • Post #3
  • Quote
  • Jul 6, 2017 12:27pm Jul 6, 2017 12:27pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,081 Posts
Quoting tanwt
Disliked
are there any other source to get the previous, forecast and actual data?
Ignored
There is no 'actual' or 'revised from' data in the XML file, nor any historical news data from previous weeks.
To get these values, your EA would need to download and parse the FF calendar HTML.
  • Post #4
  • Quote
  • Jul 6, 2017 11:40pm Jul 6, 2017 11:40pm
  •  tanwt
  • | Joined Feb 2016 | Status: Member | 76 Posts
Quoting hanover
Disliked
{quote} There is no 'actual' or 'revised from' data in the XML file, nor any historical news data from previous weeks. To get these values, your EA would need to download and parse the FF calendar HTML.
Ignored
thanks for the info

any mql4 template for this kind of parsing?
  • Post #5
  • Quote
  • Edited Jul 8, 2017 1:23am Jul 7, 2017 4:26am | Edited Jul 8, 2017 1:23am
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,081 Posts
Quoting tanwt
Disliked
any mql4 template for this kind of parsing?
Ignored
Sorry, no I don't have one, I wrote mine originally using Clarion, and then Autohotkey. Both of these process the HTML on a character by character basis; they do the required job, albeit somewhat inefficiently. They call curl to download the HTML, something like:
Attached Image
and then process the resulting file.

The FF calendar consists of a table of columns (<td>......</td>) within rows (<tr>.....</tr>). The 'impact' and 'revised from' data has to be extracted from within the HTML tokens, the other fields consist of text between <td> and </td>. The columns are consistently ordered throughout, making the job a little easier.

Here is a sample of what a news event looks like, and where to find the relevant fields (NOTE: for readability, I have inserted CR/LFs to separate each column of the table; in reality the entire calendar exists in one HTML line):
Attached Image (click to enlarge)
Click to Enlarge

Name: PPI 087.png
Size: 15 KB
You should be able to figure out the rest for yourself.

If you don't need 'FF event id', 'impact' or 'revised from', your best solution might be to find a high level language that has a native facility to extract the table/text from between the HTML tokens. That could potentially save a lot of work. Save this code as a DLL and call it from your EA's MQL4. Or you might be able to find and integrate something like this.

One final point: you'll need to update your code every time the FF programmers change the HTML format of the calendar. The bad news is that they do it without any warning; you simply notice that your code no longer works correctly. The good news is that they don't tend to do it very often.
  • Post #6
  • Quote
  • Dec 31, 2019 3:16pm Dec 31, 2019 3:16pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,081 Posts
Quoting hanover
Disliked
They call curl to download the HTML, something like:{image}and then process the resulting file.
Ignored
Update:
The downloader app no longer uses curl, instead it downloads the webpage using native autohotkey code:
Inserted Code
    URLDownloadToFile, https://www.forexfactory.com/calendar.php?week=%start_str%, ffcalout_%A_Index%        ;download requested webpage
  • Post #7
  • Quote
  • Jan 22, 2020 11:46am Jan 22, 2020 11:46am
  •  ADiTheMAN
  • | Joined Jan 2020 | Status: Member | 1 Post
I spend quite some time developing an EA in MT4 that is reading the Forex Factory Calendar (FFC) HTML. I’m stumbling now on an issue that I did not foresee and I’m unable to solve. Hopefully you can help me.
When the news event occurs, I want to extract the Actual number, and compare it with the forecasted number. The problem is that when the news event occurs, you will see in IE/Chrome a green button (see attachment) on which you need to press to request the Actual number. In the EA when the WebRequest is done you also don’t see the actual number but the code of this green button, even if the Actual number is available. After a minute or so the WebRequest will show the Actual number, but that’s of course too late.
Can you please help me on how to solve this issue so I can extract the Actual as soon as it’s available in the FFC? I was not able to find an asnwer to this. Thank you in advance!

PS: I’m using the HTML FFC and not the XML FFC as the XML does not contain the Actual number.
Attached Image (click to enlarge)
Click to Enlarge

Name: Capture.JPG
Size: 38 KB
  • Post #8
  • Quote
  • Jan 22, 2020 1:25pm Jan 22, 2020 1:25pm
  •  hanover
  • Joined Sep 2006 | Status: ... | 8,081 Posts
Quoting ADiTheMAN
Disliked
The problem is that when the news event occurs, you will see in IE/Chrome a green button (see attachment) on which you need to press to request the Actual number. In the EA when the WebRequest is done you also don’t see the actual number but the code of this green button, even if the Actual number is available. After a minute or so the WebRequest will show the Actual number, but that’s of course too late.
Ignored
I know what you mean about the green button and it's a great question. I wish I had a good answer but all I do is scrape the visible html, just as you're apparently doing.

You could try Googling something like "how to scrape data from a website that's hiding in javascript". I did and I got some hits that appear to be relevant. Good luck.
  • Post #9
  • Quote
  • Last Post: Jan 3, 2021 8:10am Jan 3, 2021 8:10am
  •  moron
  • | Joined Jan 2020 | Status: Member | 4 Posts
Quoting hanover
Disliked
{quote} Update: The downloader app no longer uses curl, instead it downloads the webpage using native autohotkey code: URLDownloadToFile, https://www.forexfactory.com/calenda...eek=%start_str%, ffcalout_%A_Index% ;download requested webpage
Ignored

hello. can you please post a link to the updated version of the downloader?
  • Platform Tech
  • /
  • where to find FF "actual" calendar data within the xml file?
  • Reply to Thread
0 traders viewing now
Top of Page
  • Facebook
  • Twitter
About FF
  • Mission
  • Products
  • User Guide
  • Media Kit
  • Blog
  • Contact
FF Products
  • Forums
  • Trades
  • Calendar
  • News
  • Market
  • Brokers
  • Trade Explorer
FF Website
  • Homepage
  • Search
  • Members
  • Report a Bug
Follow FF
  • Facebook
  • Twitter

FF Sister Sites:

  • Metals Mine
  • Energy EXCH
  • Crypto Craft

Forex Factory® is a brand of Fair Economy, Inc.

Terms of Service / ©2021