Gamestudio Links
Zorro Links
Newest Posts
Data from CSV not parsed correctly
by EternallyCurious. 04/18/24 10:45
StartWeek not working as it should
by Zheka. 04/18/24 10:11
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (1 invisible), 692 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 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