[Quantproject-developers] QuantDownloader/Downloader/QuotesEditor/CloseToClose CloseToCloseChart.cs,
Brought to you by:
glauco_1
|
From: Glauco S. <gla...@us...> - 2004-05-09 16:30:35
|
Update of /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/CloseToClose In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14599/Downloader/QuotesEditor/CloseToClose Modified Files: CloseToCloseChart.cs Log Message: Now it inherits the VisualValidationChart class Index: CloseToCloseChart.cs =================================================================== RCS file: /cvsroot/quantproject/QuantDownloader/Downloader/QuotesEditor/CloseToClose/CloseToCloseChart.cs,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** CloseToCloseChart.cs 28 Mar 2004 20:19:07 -0000 1.3 --- CloseToCloseChart.cs 9 May 2004 16:30:21 -0000 1.4 *************** *** 35,86 **** /// with suspicious Close To Close ratio /// </summary> ! public class CloseToCloseChart : Chart { - private string ticker; - private DateTime suspiciousDateTime; - private History history; - private DateTime startDateTime; - private DateTime endDateTime; - - public string Ticker - { - get { return this.ticker; } - set { this.ticker = value; } - } - public DateTime SuspiciousDateTime - { - get { return this.suspiciousDateTime; } - set { this.suspiciousDateTime = value; } - } public CloseToCloseChart() { - InitializeComponent(); } ! ! private void InitializeComponent() ! { ! this.Name = "CloseToCloseChart"; ! } ! ! #region "OnPaint" ! protected void onPaint_setTimeInterval() ! { ! this.startDateTime = (DateTime) this.history.GetKey( Math.Max( 0 , ! this.history.IndexOfKeyOrPrevious( this.suspiciousDateTime ) - ! ConstantsProvider.PrecedingDaysForVisualValidation ) ); ! this.endDateTime = (DateTime) this.history.GetKey( Math.Min( this.history.Count - 1 , ! this.history.IndexOfKeyOrPrevious( this.suspiciousDateTime ) ) + ! ConstantsProvider.PrecedingDaysForVisualValidation ); ! } ! protected override void OnPaint(System.Windows.Forms.PaintEventArgs e) ! { ! Console.WriteLine( "CloseToCloseChart.OnPaint()" ); ! this.Clear(); ! this.history = DataProvider.GetCloseHistory( ((QuotesEditor)this.FindForm()).Ticker ); ! this.onPaint_setTimeInterval(); ! this.Add( this.history , Color.Red , this.startDateTime , this.endDateTime ); ! base.OnPaint( e ); ! } ! #endregion } } --- 35,48 ---- /// with suspicious Close To Close ratio /// </summary> ! public class CloseToCloseChart : VisualValidationChart { public CloseToCloseChart() { } ! protected override void addHistories() ! { ! History lowHistory = DataProvider.GetCloseHistory( ((QuotesEditor)this.FindForm()).Ticker ); ! this.add( lowHistory , Color.Green ); ! } } } |