continue my homework:

after change on this:
Code
 int loadPredict(const string idx, const string TF, const int nHandle){
   string InName = strf("Predikce\\%s_%s_%s.csv",strx(Asset,"/",""),idx,TF);  // name of a single year CSV file
   string Format = "%t,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,f,i,f";
   int Records = dataParse(nHandle,Format,InName);
    
    
   int i,j;
	for (j=0;j<Records;j++)
	{
		print(TO_LOG,"\n %d",dataStr(nHandle,j,0));
		printf("\n");
		for (i=1;i<21;i++)
			print(TO_LOG," %f",dataVar(nHandle,j,i));
		print(TO_LOG," %d",dataInt(nHandle,j,ERR_WIN));
		print(TO_LOG," %f",dataVar(nHandle,j,ERR_ACT));
   }
	printf("\n\n");
   return Records;    
  }


unixtime index is converted from 1585754100 to 497878664 ( show with print(TO_LOG,"\n %d",dataStr(nHandle,j,0)); )

stil not work the findData fce
Code
int findRow(var dDate,const int nHandle){
    int Row = dataFind(nHandle,dDate);
    return Row;
      
}  

//1585758600 == 2020-04-01 6:30
var dDateD=wdatef("%Y-%m-%d %H:%M", "2020-04-01 06:30");
int nM15=findRow(dDateD,1);       // find the actual row value M15


data OK
-7.267618 -4.382970 -8.246713 -9.795797 -8.136627 -7.064792 -6.453411 -0.181064 4.329069 4.081573 5.729965 5.850610 6.440209 3.814275 2.808572 4.838944 3.034771 0.485683 5.303627 0.605268 133 94.449997

find row is = 6 in file:
1585758600,-8.13662674,-7.06479147,-6.45341088,-0.18106396,-2.53993037,-3.07169075,-2.07676956,-6.08936187,-6.19483137,-3.98569345,-6.76299095,-8.66434669,-9.94509506,-7.24448967,-3.73329449,-2.86435819,-6.47179174,-9.75704479,-8.17628479,-9.22965813,315,98.15

Last edited by Grat; 05/26/20 09:25.