[Quantproject-developers] QuantProject/b7_Scripts/SimpleTesting/OneRank RunOneRank.cs,1.1,1.2
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2004-08-01 00:33:37
|
Update of /cvsroot/quantproject/QuantProject/b7_Scripts/SimpleTesting/OneRank In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22079/b7_Scripts/SimpleTesting/OneRank Modified Files: RunOneRank.cs Log Message: Changed to become the base class for RunOneRankWithExcelReport and RunOneRankWithWindowsReport Index: RunOneRank.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/SimpleTesting/OneRank/RunOneRank.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RunOneRank.cs 24 Nov 2003 19:36:24 -0000 1.1 --- RunOneRank.cs 1 Aug 2004 00:33:26 -0000 1.2 *************** *** 32,35 **** --- 32,36 ---- using QuantProject.Business.Scripting; using QuantProject.Presentation.MicrosoftExcel; + using QuantProject.Presentation.Reporting.WindowsForm; namespace QuantProject.Scripts *************** *** 40,43 **** --- 41,49 ---- public class RunOneRank : Script { + protected Account account; + protected string ticker; + protected DateTime startDateTime; + protected DateTime endDateTime; + public RunOneRank() { *************** *** 46,57 **** { //this.testTicker( "FSELX" , new DateTime( 2003 , 5 , 20 ) , new DateTime( 2003 , 9 , 26 ) ); ! this.testTicker( "REPIX" , new DateTime( 2003 , 7 , 1 ) , new DateTime( 2003 , 11 , 20 ) ); } ! private void testTicker( string ticker , DateTime startDateTime , DateTime endDateTime ) { QuoteCache.Add( new Instrument( ticker ) , BarComponent.Open ); QuoteCache.Add( new Instrument( ticker ) , BarComponent.Close ); //QuoteCache.Add( new Instrument( "MSFT" ) , BarComponent.Close ); ! QuoteCache.SetCache( startDateTime , endDateTime ); TradingSystems tradingSystems = new TradingSystems(); --- 52,66 ---- { //this.testTicker( "FSELX" , new DateTime( 2003 , 5 , 20 ) , new DateTime( 2003 , 9 , 26 ) ); ! this.ticker = "REPIX"; ! this.startDateTime = new DateTime( 2003 , 7 , 1 ); ! this.endDateTime = new DateTime( 2003 , 11 , 20 ); ! this.testTicker(); } ! private void testTicker() { QuoteCache.Add( new Instrument( ticker ) , BarComponent.Open ); QuoteCache.Add( new Instrument( ticker ) , BarComponent.Close ); //QuoteCache.Add( new Instrument( "MSFT" ) , BarComponent.Close ); ! QuoteCache.SetCache( this.startDateTime , this.endDateTime ); TradingSystems tradingSystems = new TradingSystems(); *************** *** 77,87 **** new ExtendedDateTime( endDateTime , BarComponent.Close ) ) ).ReportToConsole(); ! // tester.Account.AccountReport.ReportToExcel( "MSFT" , ! // new ExtendedDateTime( endDateTime , BarComponent.Close ) ); ! ! AccountReport accountReport = tester.Account.CreateReport( ticker , 7 , ! new ExtendedDateTime( endDateTime , BarComponent.Close ) , ticker ); ! ExcelManager.Add( accountReport ); ! ExcelManager.ShowReport(); } } --- 86,92 ---- new ExtendedDateTime( endDateTime , BarComponent.Close ) ) ).ReportToConsole(); ! // uncomment the four lines below to use the Excel reporting feature ! this.account = tester.Account; ! } } |