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
6 registered members (EternallyCurious, AndrewAMD, ricky_k, 7th_zorro, 2 invisible), 478 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EternallyCurious, 11honza11, ccorrea, sakolin, rajesh7827
19046 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
It is easy for you. #477086
05/16/19 04:00
05/16/19 04:00
Joined: May 2018
Posts: 65
T
tuuPaul Offline OP
Junior Member
tuuPaul  Offline OP
Junior Member
T

Joined: May 2018
Posts: 65
hello, i tried to export date to .csv file but it does not work. "Crush in function:run() at bar 0" this error appeared. Please give me the solution. Script is below

function run()
{
StartDate = 20160101;
EndDate = 20161231;
TimeFrame = 1;
vars une = series(priceClose());
printf(TO_CSV,"nDate: %s",strdate(YMD,0));
}

Re: It is easy for you. [Re: tuuPaul] #477092
05/16/19 10:00
05/16/19 10:00
Joined: Sep 2003
Posts: 929
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 929
printf(TO_CSV is also wrong, it must be print(TO_CSV.

https://manual.zorro-project.com/printf.htm

Re: It is easy for you. [Re: Spirit] #477093
05/16/19 10:34
05/16/19 10:34
Joined: May 2018
Posts: 65
T
tuuPaul Offline OP
Junior Member
tuuPaul  Offline OP
Junior Member
T

Joined: May 2018
Posts: 65
okey works correct. I changed YMD with YMDH then i does not work. How to fix it? Also i want price and date must be locate in two separate columns. Now it located one columns. How fix it?

Re: It is easy for you. [Re: tuuPaul] #477099
05/16/19 13:43
05/16/19 13:43
Joined: Dec 2014
Posts: 206
Germany
Smon Offline
Member
Smon  Offline
Member

Joined: Dec 2014
Posts: 206
Germany
Your script doesn't export your "une" series at all, so this can't be the code that writes date and price in the same column. Please show us the code snippet that isn't working as intended.

Re: It is easy for you. [Re: Smon] #477106
05/16/19 14:21
05/16/19 14:21
Joined: May 2018
Posts: 65
T
tuuPaul Offline OP
Junior Member
tuuPaul  Offline OP
Junior Member
T

Joined: May 2018
Posts: 65
this script can export dates and une to .csv file. but i need to export une and dates not same column in .csv file. Alse want export time.

function run()
{

StartDate = 20160101;
EndDate = 20161231;
vars une = series(priceClose());
print(TO_CSV,"nDate: %s",strdate(YMD,0));
print(TO_CSV,"n une=%.3f",une[0]);

}

Re: It is easy for you. [Re: tuuPaul] #477110
05/16/19 14:39
05/16/19 14:39
Joined: Feb 2017
Posts: 1,725
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,725
Chicago
CSV means "comma separated values". You need to assemble the strings yourself.

A comma will divide columns. A newline character will divide rows.

Last edited by AndrewAMD; 05/17/19 13:18.

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1