I'm trying to convert .csv data to .t6 and then compare what I get while Test is running. .t6 format was obtained by slight modification of CSVtoT6.c script. For sanity check .t6 file was converted back to .csv using CSVfromT6.c script. The results look like that:

original .csv:
2011-07-01 07:16:00,90.5008,90.5485,90.5370,90.5008
2011-07-01 07:17:00,90.5098,90.4689,90.4708,90.5098
2011-07-01 07:18:00,90.4197,90.4503,90.4463,90.4197
2011-07-01 07:19:00,90.3747,90.4056,90.4038,90.3747
2011-07-01 07:20:00,90.3927,90.4229,90.4169,90.3927
2011-07-01 07:21:00,90.3387,90.3649,90.3772,90.3387
2011-07-01 07:22:00,90.3567,90.3568,90.3535,90.3567
2011-07-01 07:23:00,90.3747,90.3839,90.3846,90.3747
2011-07-01 07:24:00,90.3747,90.3692,90.3812,90.3747
2011-07-01 07:25:00,90.4557,90.4567,90.4590,90.4557

.csv->.t6->.csv:
01/07/11 07:16, 90.50080, 90.54850, 90.53700, 90.50080
01/07/11 07:17, 90.50980, 90.46890, 90.47080, 90.50980
01/07/11 07:18, 90.41970, 90.45030, 90.44630, 90.41970
01/07/11 07:19, 90.37470, 90.40560, 90.40380, 90.37470
01/07/11 07:20, 90.39270, 90.42290, 90.41690, 90.39270
01/07/11 07:21, 90.33870, 90.36490, 90.37720, 90.33870
01/07/11 07:22, 90.35670, 90.35680, 90.35350, 90.35670
01/07/11 07:23, 90.37470, 90.38390, 90.38460, 90.37470
01/07/11 07:24, 90.37470, 90.36920, 90.38120, 90.37470
01/07/11 07:25, 90.45570, 90.45670, 90.45900, 90.45570

So looks quite consistent. However when I'm loading the data by the following script:

void run()
{
StartDate = 20110701;
EndDate = 2011;
LookBack = 0;
BarPeriod = 1;
string asset_y = "RUBRUBSBER";
asset(asset_y);

double dates = wdate(0);
double *open = series(priceOpen());
double *high = series(priceHigh());
double *low = series(priceLow());
double *close = series(priceClose());
char line[100];

sprintf(line,"%f,%f,%f,%f,%fn",dates,open[0],high[0],low[0] ,close[0]);
if(is(INITRUN))
file_delete("Historyexport_data.csv");
else
file_append("Historyexport_data.csv",line);
}

the prices are modified and instead of 10 datapoints I get only 8 (first two are absent).

2011-07-01 07:18:00 90.448299 90.450302 90.446297 90.448299
2011-07-01 07:19:00 90.404701 90.405602 90.403801 90.404701
2011-07-01 07:20:00 90.419899 90.422897 90.416901 90.419899
2011-07-01 07:21:00 90.371048 90.364899 90.377197 90.371048
2011-07-01 07:22:00 90.355148 90.356796 90.3535 90.355148
2011-07-01 07:23:00 90.384251 90.383904 90.384598 90.384251
2011-07-01 07:24:00 90.375202 90.369202 90.381203 90.375202
2011-07-01 07:25:00 90.457851 90.456703 90.459 90.457851

Any ideas of what I'm doing wrong?

Thank you in advance.

Last edited by suvor; 11/22/16 13:33.