Ejemplo n.º 1
0
        private void drawStockGraph()
        {
            List <PriceData> priceTable = stockData_.priceTable(priceType_);

            if (priceTable == null)
            {
                return;
            }
            {
                minPrice_ = 0; maxPrice_ = 0;

                chartStock_.Series.Clear();
                this.setTitle();
                this.drawPrice();
                //  this.drawSimpleAvg();
                this.drawExpAvg();
                this.drawBollinger();

                chartStock_.ChartAreas[0].AxisX.LabelStyle.Interval = 30;
                chartStock_.ChartAreas[0].AxisY.Minimum             = minPrice_;
                chartStock_.ChartAreas[0].AxisY.Maximum             = maxPrice_;
                chartStock_.ChartAreas[0].AxisY.LabelStyle.Format   = "#.#";
            }
            {
                minMacd_ = 0; maxMacd_ = 0;
                chartMacd_.Series.Clear();
                this.drawMacd();

                chartMacd_.ChartAreas[0].AxisY.Minimum           = minMacd_;
                chartMacd_.ChartAreas[0].AxisY.Maximum           = maxMacd_;
                chartMacd_.ChartAreas[0].AxisY.LabelStyle.Format = "#.#";
            }
        }
Ejemplo n.º 2
0
        public void drawStock(StockData stockData)
        {
            if (stockData == null)
            {
                return;
            }
            if (stockData.priceTable(priceType_) == null)
            {
                return;
            }

            if (stockData_ != null)
            {
                stockData_ = null;
            }
            stockData_ = (StockData)stockData.Clone();

            if (stockData_.priceTable(priceType_).Count <= 120)
            {
                return;
            }

            this.drawStockGraph();
        }