Gamestudio Links
Zorro Links
Newest Posts
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 08/21/19 14:59
Alarm whenever logged out from Broker
by chsmac85. 08/21/19 14:36
What are you working on?
by 3run. 08/21/19 13:28
file_write var array ?
by laz. 08/20/19 17:18
Updating Assets<Brokername
>.csv

by Sabre. 08/20/19 15:40
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
8 registered members (RealSerious3D, 3run, AndrewAMD, Southqvist, kankan, 3 invisible), 640 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
GorgonzolaBYTE, Southqvist, tawin, Raedwulf, Sabre
18270 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: 854
Spirit Offline

Moderator
Spirit  Offline

Moderator

Joined: Sep 2003
Posts: 854
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: 133
Germany
sdh309795gaas Offline
Member
sdh309795gaas  Offline
Member

Joined: Dec 2014
Posts: 133
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: sdh309795gaas] #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: 739
Chicago
AndrewAMD Online
User
AndrewAMD  Online
User

Joined: Feb 2017
Posts: 739
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.

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1