Gamestudio Links
Zorro Links
Newest Posts
Zorro S for Oanda US
by AndrewAMD. 06/06/20 16:39
The Black Book
by SteveG. 06/06/20 14:01
Indicator coding
by danatrader. 06/06/20 11:53
New AUM
by Aku_Aku. 06/06/20 10:10
Reading a TXT file on server
by Truth. 06/05/20 18:22
Oanda instruments
by Morris. 06/05/20 10:24
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
5 registered members (AndrewAMD, SteveG, kalmar, Grat, Mio), 473 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Frank_Shieh, PBSeven, Hardi01, Giuseppe, AdamWu
18461 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: 305
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 305
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