[Quantproject-developers] QuantProject/b3_Data/Selectors SelectorByWinningOpenToClose.cs,NONE,1.1 Se
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2005-04-14 18:33:33
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/Selectors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19250/b3_Data/Selectors Modified Files: SelectionType.cs Added Files: SelectorByWinningOpenToClose.cs Log Message: Added new ITickerSelector object for advanced selection of tickers: with SelectorByWinningOpenToClose object it is now possible to choose tickers with a raw close greater than raw open at a given time interval within the specified group of tickers --- NEW FILE: SelectorByWinningOpenToClose.cs --- /* QuantProject - Quantitative Finance Library SelectorByWinningOpenToClose.cs Copyright (C) 2003 Marco Milletti This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ using System; using System.Collections; using System.Data; using System.Windows.Forms; using QuantProject.DataAccess.Tables; using QuantProject.Data.DataTables; namespace QuantProject.Data.Selectors { /// <summary> /// Class for selection of tickers which had raw close greater /// than raw open for the given interval of days /// </summary> public class SelectorByWinningOpenToClose : TickerSelector, ITickerSelector { public SelectorByWinningOpenToClose(DataTable setOfTickersToBeSelected, bool orderInASCmode, DateTime firstQuoteDate, DateTime lastQuoteDate, long maxNumOfReturnedTickers): base(setOfTickersToBeSelected, orderInASCmode, firstQuoteDate, lastQuoteDate, maxNumOfReturnedTickers) { } public SelectorByWinningOpenToClose(string groupID, bool orderInASCmode, DateTime firstQuoteDate, DateTime lastQuoteDate, long maxNumOfReturnedTickers): base(groupID, orderInASCmode, firstQuoteDate, lastQuoteDate, maxNumOfReturnedTickers) { } public DataTable GetTableOfSelectedTickers() { if(this.setOfTickersToBeSelected == null) return QuantProject.DataAccess.Tables.Quotes.GetTickersByWinningOpenToClose(this.isOrderedInASCMode, this.groupID, this.firstQuoteDate, this.lastQuoteDate, this.maxNumOfReturnedTickers); else return new DataTable(); } public void SelectAllTickers() { ; } } } Index: SelectionType.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b3_Data/Selectors/SelectionType.cs,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** SelectionType.cs 28 Mar 2005 18:11:42 -0000 1.9 --- SelectionType.cs 14 Apr 2005 18:33:06 -0000 1.10 *************** *** 40,44 **** CloseToCloseLinearCorrelation, QuotedAtEachMarketDay, ! AverageRawOpenPrice } } --- 40,45 ---- CloseToCloseLinearCorrelation, QuotedAtEachMarketDay, ! AverageRawOpenPrice, ! WinningOpenToClose } } |