How to debug .t6 files

Posted By: Cheulmen

How to debug .t6 files - 11/12/17 22:21

I'm trying to transform a .csv into a .t6 file to read price data, but although .t6 file is generated (and it is around15Mb/year), the scripts always say something like: "Error 047, Not enough bars". It is like the .t6 file hasn't got inside it the .csv data or something like that :?

My .csv is like this one, with 1min ohlcvv data, from 2014-12-01 to 2017-10-20 :

2017-10-20 01:51:00,5705.25,5705.25,5705.24,5705.25,2.6457291,15094.527857
2017-10-20 01:52:00,5705.01,5705.01,5705.01,5705.01,2.23999467,12779.191992
2017-10-20 01:53:00,5705.01,5705.01,5701.01,5701.01,1.90665984,10877.267534

The script I'm using is CSVToHistory(), with the format:

//Timestamp,Open,High,Low,Close,Volume1,Volume2
string Format = "%Y-%m-%d %H%M%S,f3,f1,f2,f4,f5,f6";

To test it, with the following ultra-simple script:
function run()
{
StartDate=2015;
BarPeriod=60;
PlotBars=100;
}

I tried to Plot() a bar without success. Also, using Verbose=7 Zorro says:

"2 Bars 2015-01-08...2016-01-13"
"Error 047: Not enough bars (81 missing)"

How could I debug what's being wrong?


Posted By: Cheulmen

Re: How to debug .t6 files - 11/13/17 10:45

OK, I found the problem,, my .csv data was in reverse order. To find it, I read the t6 file using the T6 struct, printed the internal data, and the problem appeared:

typedef struct T6
{
DATE time; // timestamp of the end of the tick in UTC, OLE date/time format
float fHigh,fLow;
float fOpen,fClose;
float fVal,fVol; // additional data, like ask-bid spread, volume etc.
} T6;
Posted By: jcl

Re: How to debug .t6 files - 11/13/17 10:52

You can also display t6 files with the HistoryEditor tool on the download page.
Posted By: Cheulmen

Re: How to debug .t6 files - 11/13/17 11:32

Oh! it is really a great tool, thanks!
© 2024 lite-C Forums