[Quantproject-developers] QuantProject/b4_Business/a0_Validation/Validators RangeToRangeValidator.cs
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2004-05-08 17:16:50
|
Update of /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/Validators In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6876/b4_Business/a0_Validation/Validators Modified Files: RangeToRangeValidator.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: RangeToRangeValidator.cs =================================================================== RCS file: /cvsroot/quantproject/QuantProject/b4_Business/a0_Validation/Validators/RangeToRangeValidator.cs,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** RangeToRangeValidator.cs 29 Apr 2004 12:30:05 -0000 1.1 --- RangeToRangeValidator.cs 8 May 2004 17:16:42 -0000 1.2 *************** *** 2,8 **** using System.Collections; using System.Data; using QuantProject.ADT.Histories; - using QuantProject.DataAccess.Tables; using QuantProject.Business.Validation; namespace QuantProject.Business.Validation.Validators --- 2,9 ---- using System.Collections; using System.Data; + using QuantProject.ADT; using QuantProject.ADT.Histories; using QuantProject.Business.Validation; + using QuantProject.Data.DataTables; namespace QuantProject.Business.Validation.Validators *************** *** 14,27 **** { private DataTable dataTableToBeValidated; - private double suspiciousRatio = 3; private ArrayList rangeToRangeVisuallyValidated; - public double SuspiciousRatio - { - get { return this.suspiciousRatio; } - set { this.suspiciousRatio = value; } - } - public RangeToRangeValidator() { --- 15,21 ---- *************** *** 58,62 **** DataRow quoteRow , double currentValue , double averageValue ) { ! if ( ( Math.Abs( currentValue / averageValue ) > this.suspiciousRatio ) && ( this.rangeToRangeVisuallyValidated.IndexOf( quoteRow[ "quDate" ] ) < 0 ) ) // the current close to close value is suspiciously larger --- 52,56 ---- DataRow quoteRow , double currentValue , double averageValue ) { ! if ( ( Math.Abs( currentValue / averageValue ) > ConstantsProvider.SuspiciousRatio ) && ( this.rangeToRangeVisuallyValidated.IndexOf( quoteRow[ "quDate" ] ) < 0 ) ) // the current close to close value is suspiciously larger *************** *** 87,91 **** private int validate_currentTicker( string currentTicker , int currentTickerStartingRowIndex ) { ! this.rangeToRangeVisuallyValidated = VisuallyValidatedQuotes.GetRangeToRangeValidated( currentTicker ); History rangeToRange = new History(); History rangeToRangeMovingAverage; --- 81,86 ---- private int validate_currentTicker( string currentTicker , int currentTickerStartingRowIndex ) { ! this.rangeToRangeVisuallyValidated = ! QuantProject.DataAccess.Tables.VisuallyValidatedQuotes.GetRangeToRangeValidated( currentTicker ); History rangeToRange = new History(); History rangeToRangeMovingAverage; *************** *** 103,107 **** /// </summary> /// <param name="dataTableToBeValidated">Quote rows to be validated</param> ! public void Validate( DataTable dataTableToBeValidated ) { int currentRowIndex = 0; --- 98,102 ---- /// </summary> /// <param name="dataTableToBeValidated">Quote rows to be validated</param> ! public void Validate( Quotes dataTableToBeValidated ) { int currentRowIndex = 0; |