Gamestudio Links
Zorro Links
Newest Posts
Blobsculptor tools and objects download here
by NeoDumont. 03/28/24 03:01
Issue with Multi-Core WFO Training
by aliswee. 03/24/24 20:20
Why Zorro supports up to 72 cores?
by Edgar_Herrera. 03/23/24 21:41
Zorro Trader GPT
by TipmyPip. 03/06/24 09:27
VSCode instead of SED
by 3run. 03/01/24 19:06
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Nymphodora, Quad), 894 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
sakolin, rajesh7827, juergen_wue, NITRO_FOREVER, jack0roses
19043 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
downloading data from Quandl #479463
03/31/20 10:45
03/31/20 10:45
Joined: Jul 2016
Posts: 64
G
gtell Offline OP
Junior Member
gtell  Offline OP
Junior Member
G

Joined: Jul 2016
Posts: 64
Hi, I am using the following script to download data from Quandl:

Code
#include <contract.c>

function run()
{
  StartDate = 2015;
  EndDate = 2018;
  BarPeriod = 1440;
  set(PLOTNOW);
  
  if(is(INITRUN)) {
    assetAdd("DXY");
    int Handle = assetHistory("CHRIS/ICE_DX1",FROM_QUANDL|VOLATILE|OVERRIDE);
    if(Handle) dataSave(Handle,"DXY.t6");
	
  }
  asset("DXY");
  
  string line = strf(
		"%02i/%02i/%02i %02i:%02i, %.5f, %.5f, %.5f, %.5f\n",
		day(),month(),year()%100,hour(),minute(),
		priceOpen(),priceHigh(),priceLow(),priceClose());
  if(is(INITRUN))
		file_delete("Data\\present.csv");
  else
		file_append("Data\\present.csv",line);

  
}


Quandl key is in my ZorroFix.ini file and I am not getting any error.
With curl command I can get data from command line.
With Zorro I am getting a present.csv file which has all lines empty except the last:


Code
13/03/20 15:40, 0.00000, 0.00000, 0.00000, 0.00000
16/03/20 15:40, 0.00000, 0.00000, 0.00000, 0.00000
17/03/20 15:40, 0.00000, 0.00000, 0.00000, 0.00000
18/03/20 15:40, 0.00000, 0.00000, 0.00000, 0.00000
19/03/20 15:40, 0.00000, 0.00000, 0.00000, 0.00000
20/03/20 15:40, 0.00000, 0.00000, 0.00000, 0.00000
23/03/20 15:40, 0.00000, 0.00000, 0.00000, 0.00000
24/03/20 15:40, 0.00000, 0.00000, 0.00000, 0.00000
25/03/20 15:40, 0.00000, 0.00000, 0.00000, 0.00000
26/03/20 15:40, 0.00000, 0.00000, 0.00000, 0.00000
27/03/20 15:40, 0.00000, 0.00000, 0.00000, 0.00000
30/03/20 15:40, 1641.19995, 1652.80005, 1607.19995, 1622.00000



DXY.t6 is not created in History folder.
Do you know what can be the reason?

Thanks.

Re: downloading data from Quandl [Re: gtell] #479494
04/02/20 13:07
04/02/20 13:07
Joined: Apr 2008
Posts: 585
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 585
Austria
assetHistory knows CHRIS/ICE but not CHRIS/ICE_DX1. It does not look like valid quandl code. If Quandl has DX1 in the ICE then the correct code would be probably CHRIS/ICE/DX1.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1