[Quantproject-developers] QuantProject/b3_Data/Selectors SelectorByAverageRawOpenPrice.cs,NONE,1.1
Brought to you by:
glauco_1
|
From: Marco M. <mi...@us...> - 2005-03-23 21:24:33
|
Update of /cvsroot/quantproject/QuantProject/b3_Data/Selectors In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19529/b3_Data/Selectors Added Files: SelectorByAverageRawOpenPrice.cs Log Message: Added new ITickerSelector object for advanced selection of tickers: with SelectorByAverageRawOpenPrice it is now possible to choose tickers by average raw open price level. --- NEW FILE: SelectorByAverageRawOpenPrice.cs --- /* QuantProject - Quantitative Finance Library SelectorByAverageRawOpenPrice.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 for which average raw open price /// and raw open price's standard deviation /// belong to a specified ranges, in a given time interval. /// </summary> public class SelectorByAverageRawOpenPrice : TickerSelector, ITickerSelector { private double minPrice; private double maxPrice; private double minStdDeviation; private double maxStdDeviation; public SelectorByAverageRawOpenPrice(DataTable setOfTickersToBeSelected, bool orderInASCmode, DateTime firstQuoteDate, DateTime lastQuoteDate, long maxNumOfReturnedTickers, double minPrice, double maxPrice, double minStdDeviation, double maxStdDeviation): base(setOfTickersToBeSelected, orderInASCmode, firstQuoteDate, lastQuoteDate, maxNumOfReturnedTickers) { this.minPrice = minPrice; this.maxPrice = maxPrice; this.minStdDeviation = minStdDeviation; this.maxStdDeviation = maxStdDeviation; } public SelectorByAverageRawOpenPrice(string groupID, bool orderInASCmode, DateTime firstQuoteDate, DateTime lastQuoteDate, long maxNumOfReturnedTickers, double minPrice, double maxPrice, double minStdDeviation, double maxStdDeviation): base(groupID, orderInASCmode, firstQuoteDate, lastQuoteDate, maxNumOfReturnedTickers) { this.minPrice = minPrice; this.maxPrice = maxPrice; this.minStdDeviation = minStdDeviation; this.maxStdDeviation = maxStdDeviation; } public DataTable GetTableOfSelectedTickers() { if(this.setOfTickersToBeSelected == null) return QuantProject.DataAccess.Tables.Quotes.GetTickersByRawOpenPrice(this.isOrderedInASCMode, this.groupID, this.firstQuoteDate, this.lastQuoteDate, this.maxNumOfReturnedTickers, this.minPrice, this.maxPrice, this.minStdDeviation, this.maxStdDeviation); else return new DataTable(); } public void SelectAllTickers() { ; } } } |