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
5 registered members (Quad, AndrewAMD, Imhotep, TipmyPip, Edgar_Herrera), 809 guests, and 4 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
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: 204
Germany
Smon Offline
Member
Smon  Offline
Member

Joined: Dec 2014
Posts: 204
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,718
Chicago
AndrewAMD Online
Serious User
AndrewAMD  Online
Serious User

Joined: Feb 2017
Posts: 1,718
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