Gamestudio Links
Zorro Links
Newest Posts
Performance report in trade mode
by jcl. 01/18/20 09:25
oldschool fps project
by 3run. 01/14/20 19:15
Question about Clipping
by Dooley. 01/13/20 04:16
Simple backtest for SPX intra weeklies
by interzonez. 01/13/20 03:42
Trojan Agent
by jcl. 01/12/20 08:36
Multiplayer c-script example
by Truth. 01/10/20 19:45
Virtual hedging @OANDA
by jcl. 01/10/20 12:53
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 (Dooley, kmerlo, Grat, txesmi, 3run, AndrewAMD, kvm, titanicpiano14), 645 guests, and 14 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Leohermoso, matchristrading, pablomfz, tenrally, TradeOperator
18357 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: 27,091
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,091
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