I think this has worked....

Not sure where I was going wrong before.

for anyone else who is trying this.

Once you have the csv files, put them into the history directory. (13000 gets a bit much but it still works). And then use the following:

Code
// Strategy template ///////////////////////

// MKTS Daily line format: Date,Open,High,Low,Close,Volume
// 02/28/2020,108.4,110,107.475,107.575,44239
// string Format = "+%m/%d/%Y,f3,f1,f2,f4,f6";
string Format = "+%Y-%m-%d,f3,f1,f2,f4,f6";

function writeTheFile(string InName){
	if(!InName) return quit("No file"); 

	// apparently resets the file read thing
	dataNew(1,0,0);
	
	string OutName = strx(InName,".csv",".t6");
	dataParse(1,Format,InName);
	
	printf("writeTheFile: %s \n", OutName);
	dataSave(1,OutName); 
}


function run() {
	set(LOGFILE);	
	// you should change this to your history location folder
	string Name = file_next("D:\\asset-data\\norgate-as-csv\\*.csv");
	printf("the first file name is: %s \n", Name);
	bool breakLoop = false;
	while(!breakLoop){
		Name = file_next(0);
		printf("next file name is: %s \n", Name);
		writeTheFile(Name);

		if(Name==NULL){
			printf("last value: %s \n", Name);
			breakLoop = true;
		}
	}
	printf("success \n");
	return quit();
}


Last edited by jack_the_whack; 08/09/22 09:23. Reason: Formatting