Update of /cvsroot/quantproject/QuantProject/b7_Scripts/SimpleTesting/OneRank
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9704/b7_Scripts/SimpleTesting/OneRank
Modified Files:
OneRank.cs
Log Message:
Bug fixed: now the strategy checks if the instrument is
actually traded, before acting.
Index: OneRank.cs
===================================================================
RCS file: /cvsroot/quantproject/QuantProject/b7_Scripts/SimpleTesting/OneRank/OneRank.cs,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** OneRank.cs 5 Dec 2004 02:46:14 -0000 1.2
--- OneRank.cs 13 Dec 2004 01:50:43 -0000 1.3
***************
*** 48,53 ****
this.account.AddCash( 10000 );
}
! private void fiveMinutesBeforeMarketCloseEventHandler(
! Object sender , EndOfDayTimingEventArgs endOfDayTimingEventArgs )
{
long sharesToBeBought;
--- 48,52 ----
this.account.AddCash( 10000 );
}
! private void fiveMinutesBeforeMarketCloseEventHandler_withTickerExchangedNow()
{
long sharesToBeBought;
***************
*** 78,81 ****
--- 77,88 ----
this.account.EndOfDayTimer.Stop();
}
+ private void fiveMinutesBeforeMarketCloseEventHandler(
+ Object sender , EndOfDayTimingEventArgs endOfDayTimingEventArgs )
+ {
+
+ if ( this.account.DataStreamer.IsExchanged( this.account.Key ) )
+ // the given ticker is currently exchanged
+ fiveMinutesBeforeMarketCloseEventHandler_withTickerExchangedNow();
+ }
/// <summary>
/// Runs the OneRank strategy
|