[Quantproject-developers] QuantDownloader/Downloader/QuotesEditor/CloseToClose CloseToCloseDataGrid.
Brought to you by:
glauco_1
|
From: <gla...@pr...> - 2004-01-27 13:56:42
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/CloseToClose In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9689/Downloader/QuotesEditor/CloseToClose Added Files: CloseToCloseDataGrid.cs Log Message: Contains the quotes with suspicious close to close ratio --- NEW FILE: CloseToCloseDataGrid.cs --- /* QuantProject - Quantitative Finance Library CloseToCloseDataGrid.cs Copyright (C) 2003 Glauco Siliprandi 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.Data; using System.Windows.Forms; using QuantProject.Applications.Downloader.Validate; namespace QuantProject.Applications.Downloader { /// <summary> /// Contains the quotes with suspicious close to close ratio /// </summary> public class CloseToCloseDataGrid : QuotesDataGrid { public CloseToCloseDataGrid() { } public void DataBind( ValidateDataTable validateDataTable ) { DataView dataView = new DataView( validateDataTable ); dataView.RowFilter = "ValidationWarning=" + Convert.ToInt16( ValidationWarning.SuspiciousCloseToCloseRatio ); for (int i=0; i<TableStyles[ "quotes" ].GridColumnStyles.Count; i++) { DataGridColumnStyle dataGridColumnStyle = this.TableStyles[ "quotes" ].GridColumnStyles[i]; if ( ( dataGridColumnStyle.HeaderText != "Date" ) && ( dataGridColumnStyle.HeaderText != "Close" ) ) this.TableStyles[ "quotes" ].GridColumnStyles.Remove( dataGridColumnStyle ); } this.DataSource = dataView; } } } |