Gamestudio Links
Zorro Links
Newest Posts
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
Release 2.68 replacement of the .par format
by Martin_HH. 09/23/25 20:48
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
0 registered members (), 18,161 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 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,806
Chicago
AndrewAMD Offline
Serious User
AndrewAMD  Offline
Serious User

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