Esempio n. 1
0
 public AnalysisData New(string stockCode)
 {
     AnalysisData newData = new AnalysisData();
     //newData.AccessMode = this.AccessMode;
     newData.AccessMode = commonClass.SysLibs.myAccessMode;
     newData.DataTimeScale = this.DataTimeScale;
     newData.DataTimeRange = this.DataTimeRange;
     newData.DataStockCode = stockCode;
     newData.LoadData();
     return newData;
 }
Esempio n. 2
0
        public AnalysisData New(string stockCode)
        {
            AnalysisData newData = new AnalysisData();

            //newData.AccessMode = this.AccessMode;
            newData.AccessMode    = commonClass.SysLibs.myAccessMode;
            newData.DataTimeScale = this.DataTimeScale;
            newData.DataTimeRange = this.DataTimeRange;
            newData.DataStockCode = stockCode;
            newData.LoadData();
            return(newData);
        }
Esempio n. 3
0
        private void LoadData()
        {
            DataAccess.Libs.ClearAnalysisDataCache(myData);
            myData.LoadData();

            pricePane.myGraphObj.myOnViewportChanged   += new Charts.Controls.myGraphControl.OnViewportChanged(this.Chart_OnViewportChanged);
            volumePanel.myGraphObj.myOnViewportChanged += new Charts.Controls.myGraphControl.OnViewportChanged(this.Chart_OnViewportChanged);

            pricePane.myGraphObj.myOnPointValue   += new Charts.Controls.myGraphControl.OnPointValue(PointValueEventPrice);
            volumePanel.myGraphObj.myOnPointValue += new Charts.Controls.myGraphControl.OnPointValue(PointValueEventPrice);

            pricePane.myGraphObj.myGraphPane.CurveList.Clear();
            pricePane.myGraphObj.SetSeriesX(myData.DateTime.Values, Charts.AxisType.DateAsOrdinal);

            switch (cbChartType.myValue)
            {
            case AppTypes.ChartTypes.CandleStick:
                candleCurve = pricePane.myGraphObj.AddCandleStick(myData.DataStockCode, myData.High.Values, myData.Low.Values, myData.Open.Values, myData.Close.Values, myData.Volume.Values,
                                                                  commonClass.Settings.sysChartBarUpColor, commonClass.Settings.sysChartBarDnColor,
                                                                  commonClass.Settings.sysChartBullCandleColor, commonClass.Settings.sysChartBearCandleColor);
                break;

            case AppTypes.ChartTypes.Line:
                lineCurve = pricePane.myGraphObj.AddCurveLine(myData.DataStockCode, myData.Close.Values, SymbolType.Circle, Color.Blue, 1);
                break;

            case AppTypes.ChartTypes.Bar:
                barCurve = pricePane.myGraphObj.AddCurveBar(myData.DataStockCode, myData.Close.Values, Color.Blue, Color.Blue, 1);
                break;
            }
            pricePane.myGraphObj.SetFont(14);
            pricePane.myGraphObj.DefaultViewport();
            pricePane.myGraphObj.UpdateChart();

            volumePanel.myGraphObj.myGraphPane.CurveList.Clear();
            volumePanel.myGraphObj.SetSeriesX(myData.DateTime.Values, Charts.AxisType.DateAsOrdinal);
            barCurve = volumePanel.myGraphObj.AddCurveBar(myData.DataStockCode, myData.Volume.Values, Color.Navy, Color.Green, 1);
            volumePanel.myGraphObj.SetFont(14);
            volumePanel.myGraphObj.DefaultViewport();
            volumePanel.myGraphObj.UpdateChart();
        }