Change Logfile in train mode

Posted By: Neb

Change Logfile in train mode - 02/02/21 12:03

Hi all,

Is it possible to change logfile name from this format:

Log\[Scriptname]_train.log into something like this:

Log\[Scriptname][Asset][BarPeriod]_train.log ???

I am asking because generating this batches and need to keep diff results for diff runs.

c:\users\zorro\zorro.exe -h -train KDPrcntRanker.c -i 20120101 -i 20150101 -i 1440 -a USOil
c:\users\zorro\zorro.exe -h -train KDPrcntRanker.c -i 20120101 -i 20150101 -i 1440 -a GBP/USD
c:\users\zorro\zorro.exe -h -train KDPrcntRanker.c -i 20120101 -i 20150101 -i 1440 -a EUR/USD
c:\users\zorro\zorro.exe -h -train KDPrcntRanker.c -i 20120101 -i 20150101 -i 1440 -a USD/CAD

I can do
copy C:\Users\Zorro\Log\KDPrcntRanker_train.log C:\Users\Zorro\Log\KDPrcntRanker_USOIL_1440_train.log

but will be nicer if possibility to change logfile exists from Zorro itself ?

Thanks,

Neb
Posted By: Grat

Re: Change Logfile in train mode - 02/02/21 12:28

log file is not possible change - i want this also frown
Posted By: Neb

Re: Change Logfile in train mode - 02/02/21 12:48

Should we ask for a new feature in a forum ? laugh
Posted By: Grat

Re: Change Logfile in train mode - 02/02/21 13:45

may be try this ( modify for LOG file ):

Code
int mergeAdv(){
    char name1[40],name2[40],name3[40],name4[40];
    char cOut[40];
    
    sprintf(name1,"Data\\1_%s_%s.c",cSystem,strx(Asset,"/",""));
    sprintf(name2,"Data\\2_%s_%s.c",cSystem,strx(Asset,"/",""));
    sprintf(name3,"Data\\3_%s_%s.c",cSystem,strx(Asset,"/",""));
    sprintf(name4,"Data\\4_%s_%s.c",cSystem,strx(Asset,"/",""));
    sprintf(cOut,"Data\\%s_%s.c",cSystem,strx(Asset,"/",""));

    printf("\nSave from %s to %s",name1,cOut);

    if(!file_date(name1)) 
        return 0; // file does not exist

    if(!file_copy(cOut,name4))
        return 0;
    if(!file_append(cOut,file_content(name3))) 
        return 0;
    if(!file_append(cOut,file_content(name2))) 
        return 0;
    if(!file_append(cOut,file_content(name1))) 
        return 0;
  return 1;
}

    if (Train)
    if (is(EXITRUN) )
        mergeAdv();
Posted By: Neb

Re: Change Logfile in train mode - 02/03/21 20:08


Thanks @Grat!

Neb
© 2024 lite-C Forums