Gamestudio Links
Zorro Links
Newest Posts
Any Old Timers Still Around?
by pyramide. 08/24/19 18:23
Script filename
by MatPed. 08/24/19 17:18
Oanda FIFO issue?
by AndrewAMD. 08/24/19 12:10
IG plugin initial release
by Dalla. 08/24/19 06:06
Tutorial for Vector Graphics
by Dooley. 08/23/19 22:32
Issue with dataParse function
by byakuren81. 08/23/19 21:57
Multiplayer subscription
by Truth. 08/23/19 20:08
candle pattern on weekly bars
by AndrewAMD. 08/23/19 13:20
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 (pyramide, 3run, AndrewAMD, MatPed, byakuren81, Realspawn, 2 invisible), 644 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Ysbail, trader4321, GorgonzolaBYTE, Southqvist, tawin
18272 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Issues with converting .csv to .t6 #477616
07/16/19 10:56
07/16/19 10:56
Joined: Jul 2019
Posts: 2
C
chtostoic Offline OP
Guest
chtostoic  Offline OP
Guest
C

Joined: Jul 2019
Posts: 2
Hello

I'm trying to convert my .csv data to .t6, but it doesn't work as it should.
Using Chart gets errors and doesn't plot.

Chart compiling........... t6 AAPL_2007
Using AAPL_2007.t6
Warning 035: AAPL_2007 ticks overlap on 2007-01-03 14:31:00
Error 055: No bars generated

.csv format:
[Linked Image]

Converted .t6 looks fine in ZHistoryEditor:
[Linked Image]

My amendments in CSVtoHistory default file:
Code
#define SPLIT_YEARS

string InName = "AAPL_1M_12282006_28062019_UTC.csv";  // name of a single year CSV file
string OutName = "AAPL.t6";

string Format = ",%Y-%m-%d %H:%M:%S,f3,f1,f2,f4,f6";


Example of converted .t6 file: https://fex.net/s/dtrbtd2

Data is fine, without gaps.


Thanks in advance

P.S. I need to convert around 500 files from .csv to .t6, so I will be grateful for a hint how to automate this task.

Re: Issues with converting .csv to .t6 [Re: chtostoic] #477617
07/16/19 11:46
07/16/19 11:46
Joined: Jul 2019
Posts: 2
C
chtostoic Offline OP
Guest
chtostoic  Offline OP
Guest
C

Joined: Jul 2019
Posts: 2
Found the answer in another topic.

Originally Posted by AndrewAMD
Your csv is oldest to newest, but Zorro uses data from newest to oldest. Change your format string to indicate the reverse order.

Originally Posted by AndrewAMD
That works too. I was referring to adding a + sign to the front of the string, to indicate ascending order.



Added + sign resolved the issue
Code
string Format = "+,%Y-%m-%d %H:%M:%S,f3,f1,f2,f4,f6";



Still asking for a recommendation how to automate convertation of 500 .csv data files to .t6. Total newbie in Lite-C.

Thanks

Re: Issues with converting .csv to .t6 [Re: chtostoic] #477618
07/16/19 14:46
07/16/19 14:46
Joined: Jul 2000
Posts: 26,996
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 26,996
Frankfurt
If the names of the 500 files follow a convention, you can import them all with dataParse() in a loop.


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