Gamestudio Links
Zorro Links
Newest Posts
Why Zorro supports up to 72 cores?
by 11honza11. 04/26/24 08:55
M1 Oversampling
by 11honza11. 04/26/24 08:32
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (VoroneTZ, Quad, EternallyCurious, 1 invisible), 844 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Retrieving and Using Data from a Website #448158
01/22/15 01:51
01/22/15 01:51
Joined: Apr 2014
Posts: 482
Sydney, Australia
B
boatman Offline OP
Senior Member
boatman  Offline OP
Senior Member
B

Joined: Apr 2014
Posts: 482
Sydney, Australia
I've got a short-term strategy that performs well in general, but not so well around the release of major economic news. I would therefore like to test the impacts of not trading around news releases.

This leads me to the idea of pulling an economic calendar from the web, reading the data into a file, and then using that data to control my strategy. I'm still very much a beginner with this stuff, and I was hoping to get some feedback on whether my method would work, and if there are more efficient approaches.

This is how I am thinking of approaching this:

1. Use Zorro's exec function to open the website containing the data and download it to a CSV file. Using the address http://www.dailyfx.com/files/Calendar-MM-DD-YYYY.csv (where MM-DD-YYYY is the date of the Sunday of the current week) results in a download of the week's economic calendar in CSV format.
2. Use Zorro's file_read function to read the CSV file into an array.
3. Use the data from the array to modify the behavior of the script. For example, if a NFP release is detected, cease trading one hour before the release time.

I've been reading online about using APIs to access data from other sources, such as this one: https://www.quandl.com/
I'm not sure if this would be a better approach, or if using it is even feasible??

Can anyone out there comment on my approach above? Would I be better off directing my efforts towards a different approach, or is this one appropriate? Any comments or recommendations most appreciated!

Re: Retrieving and Using Data from a Website [Re: boatman] #448269
01/26/15 17:51
01/26/15 17:51
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
I would not use the exec function to open the website in a browser. Better use the HTML functions for reading the website directly.

Re: Retrieving and Using Data from a Website [Re: jcl] #448286
01/27/15 11:35
01/27/15 11:35
Joined: Apr 2014
Posts: 482
Sydney, Australia
B
boatman Offline OP
Senior Member
boatman  Offline OP
Senior Member
B

Joined: Apr 2014
Posts: 482
Sydney, Australia
OK, thanks for the tip!

Re: Retrieving and Using Data from a Website [Re: boatman] #448484
02/06/15 13:00
02/06/15 13:00
Joined: Sep 2013
Posts: 64
Spain
yosoytrader Offline
Junior Member
yosoytrader  Offline
Junior Member

Joined: Sep 2013
Posts: 64
Spain
- code an external program/script that automatically runs on Sundays, and downloads with Wget the HTML, extracts the news data and saves it to a .csv

- let Zorro read the .csv


Happy trading laugh

Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1