Thank you Spirit
indeed that what I have done, but still cannot get the output right (getting a CSV only 1 row of data for the 31.12.2013).
Any idea what is wrong with my code?

Code:
function run()
{
  BarPeriod = 1;		
  StartDate = 20130101;
  EndDate = 20131231;		
  LookBack = 0;

  string line = strf("%02i/%02i/%02i %02i:%02i, %.5f, %.5f, %.5f, %.5fn",
    day(),month(),year()%100,hour(),minute(),
    priceOpen(),priceHigh(),priceLow(),priceClose());
  
  if(is(INITRUN))
  file_delete("Data\\export.csv");
  else
  char str[50000];
  strcat(str,line);
  
  if(is(EXITRUN))
  file_write("Data\\export.csv",str,0);
 }


Last edited by Sinuhet; 01/09/19 22:59.