Пример #1
0
        public DailyChart(StockBDContext con, string ticker, ChartDuration duration) :  this(con)
        {
            m_Tickers  = new TickerList(con, ticker);
            TickerList = new SelectList(m_Tickers.Tickers, "Value", "Text");

            selectTicker   = ticker;
            selectDuration = duration;

            EndDate = DateTime.Today;

            switch (duration)
            {
            case ChartDuration.OneMonth:
                StartDate = DateTime.Today.AddDays(-25);
                break;

            case ChartDuration.SixMonths:
                StartDate = DateTime.Today.AddDays(-150);
                break;

            case ChartDuration.OneYear:
                StartDate = DateTime.Today.AddDays(-300);
                break;

            case ChartDuration.ThreeYears:
                StartDate = DateTime.Today.AddDays(-900);
                break;

            case ChartDuration.AllYears:
                StartDate = EndDate;     // use same start and end date for entire data
                break;
            }
        }
Пример #2
0
 public MinuteChart(StockBDContext con, string ticker)
     : this(con)
 {
     selectTicker = ticker;
     m_Tickers    = new TickerList(con, ticker);
     TickerList   = new SelectList(m_Tickers.Tickers, "Value", "Text");
 }
Пример #3
0
        public DailyChart(StockBDContext con)
        {
            m_dBContext = con;

            m_Tickers      = new TickerList(con);
            TickerList     = new SelectList(m_Tickers.Tickers, "Value", "Text");
            DurationList   = new SelectList(Enum.GetValues(typeof(ChartDuration)));
            selectDuration = ChartDuration.OneMonth;
        }
Пример #4
0
        public DailyChart(StockBDContext con, string ticker) : this(con)
        {
            selectTicker   = ticker;
            selectDuration = ChartDuration.OneMonth;

            EndDate    = DateTime.Today;
            StartDate  = DateTime.Today.AddDays(-30);
            m_Tickers  = new TickerList(con, ticker);
            TickerList = new SelectList(m_Tickers.Tickers, "Value", "Text");
        }
Пример #5
0
        public MinuteChart(StockBDContext con)
        {
            m_dBContext = con;
            m_Tickers   = new TickerList(con);
            TickerList  = new SelectList(m_Tickers.Tickers, "Value", "Text");
            selectDate  = DateTime.Today;

            /*
             * DateTime dt = DateTime.Now;
             * XData = "1,2,3,4,5,6,7,8,9,10";
             * YDataPrice = "10,11,2,32,3,22,12,12,21,12";
             * YDataVolume = "10,20,30,20,40,20,10,20,30,40";
             * //noDataFound = true;
             */
            m_settings   = new ApplicationSettings();
            m_dataFolder = m_settings.settings["dataFolder"];
        }