[Quantproject-developers] QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardLag RunWalkForward
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2006-06-21 17:25:49
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardLag In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv17368/b7_Scripts/WalkForwardTesting/WalkForwardLag Modified Files: RunWalkForwardLag.cs Log Message: The WriteToTextLog public method has been added (and it is privately used, also). Index: RunWalkForwardLag.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/WalkForwardTesting/WalkForwardLag/RunWalkForwardLag.cs,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** RunWalkForwardLag.cs 31 May 2006 14:22:53 -0000 1.4 --- RunWalkForwardLag.cs 21 Jun 2006 17:25:41 -0000 1.5 *************** *** 22,25 **** --- 22,26 ---- using System; + using System.IO; using QuantProject.ADT; *************** *** 133,136 **** --- 134,149 ---- this.populationSizeForGeneticOptimizer ); } + public static void WriteToTextLog( string message ) + { + Console.WriteLine( message ); + + // FileStream fileStream = new FileStream( "WFLagLog.Txt" , + // FileMode.OpenOrCreate ); + StreamWriter streamWriter = new StreamWriter( "WFLagLog.Txt" , + true ); + streamWriter.WriteLine( message ); + streamWriter.Close(); + // fileStream.Close(); + } private void inSampleNewProgressEventHandler( Object sender , NewProgressEventArgs eventArgs ) *************** *** 138,142 **** if ( !(this.InSampleNewProgress == null) ) this.InSampleNewProgress( this , eventArgs ); ! Console.WriteLine( eventArgs.CurrentProgress.ToString() + " / " + eventArgs.Goal.ToString() + --- 151,160 ---- if ( !(this.InSampleNewProgress == null) ) this.InSampleNewProgress( this , eventArgs ); ! // Console.WriteLine( ! // eventArgs.CurrentProgress.ToString() + " / " + ! // eventArgs.Goal.ToString() + ! // " - " + ! // DateTime.Now.ToString() ); ! RunWalkForwardLag.WriteToTextLog( eventArgs.CurrentProgress.ToString() + " / " + eventArgs.Goal.ToString() + *************** *** 163,167 **** "First date:" + this.firstDateTime.ToString() + " - " + "Last date:" + this.lastDateTime.ToString(); ! Console.WriteLine( progress ); } private string getLongStringForDateTime( DateTime dateTime ) --- 181,186 ---- "First date:" + this.firstDateTime.ToString() + " - " + "Last date:" + this.lastDateTime.ToString(); ! // Console.WriteLine( progress ); ! RunWalkForwardLag.WriteToTextLog( progress ); } private string getLongStringForDateTime( DateTime dateTime ) |