[Quantproject-developers] QuantProject/b4_Business/a0_Validation/Validators CloseToCloseValidator.cs
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:06:06
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/Validators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5409/b4_Business/a0_Validation/Validators Modified Files: CloseToCloseValidator.cs Log Message: - the new Quotes DataTable class is used for quotes to be validated - now the ConstantsProvider is used to provide the SuspiciousRatio constant Index: CloseToCloseValidator.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/Validators/CloseToCloseValidator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** CloseToCloseValidator.cs 29 Apr 2004 12:28:40 -0000 1.1 --- CloseToCloseValidator.cs 8 May 2004 17:05:55 -0000 1.2 *************** *** 1,6 **** --- 1,8 ---- using System; using System.Data; + using QuantProject.ADT; using QuantProject.ADT.Histories; using QuantProject.Business.Validation; + using QuantProject.Data.DataTables; namespace QuantProject.Business.Validation.Validators *************** *** 12,22 **** { private DataTable dataTableToBeValidated; - private double suspiciousRatio = 2; - - public double SuspiciousRatio - { - get { return this.suspiciousRatio; } - set { this.suspiciousRatio = value; } - } public CloseToCloseValidator() --- 14,17 ---- *************** *** 52,56 **** DataRow quoteRow , double currentValue , double averageValue ) { ! if ( Math.Abs( currentValue / averageValue ) > this.suspiciousRatio ) // the current close to close value is suspiciously larger // than the average close to close ratio --- 47,51 ---- DataRow quoteRow , double currentValue , double averageValue ) { ! if ( Math.Abs( currentValue / averageValue ) > ConstantsProvider.SuspiciousRatio ) // the current close to close value is suspiciously larger // than the average close to close ratio *************** *** 98,102 **** /// </summary> /// <param name="dataTableToBeValidated">Quote rows to be validated</param> ! public void Validate( DataTable dataTableToBeValidated ) { int currentRowIndex = 0; --- 93,97 ---- /// </summary> /// <param name="dataTableToBeValidated">Quote rows to be validated</param> ! public void Validate( Quotes dataTableToBeValidated ) { int currentRowIndex = 0; |