Exemple #1
0
        private void BtnGetCandlesClick(object sender, EventArgs e)
        {
            if (selectedTicker == null)
            {
                return;
            }
            if (dpStartHist.Value == dpEndHist.Value)
            {
                return;
            }

            var count   = tbCountCandles.Text.ToIntSafe() ?? 20;
            var symbol  = selectedTicker.Title;
            var candles = QuoteDataBase.ReadTopNumCandles(symbol, count, dpStartHist.Value, dpEndHist.Value);

            gridCandles.DataBind(candles.Select(c => new CandleForTable(c)).ToList());
        }
Exemple #2
0
 private void BtnGetHistoryRangeClick(object sender, System.EventArgs e)
 {
     if (selectedTicker != null)
     {
         if (selectedTicker.CodeFXI.HasValue)
         {
             var times = QuoteDataBase.GetFirstAndLastDateByTicker(selectedTicker.CodeFXI.Value);
             if (times != null)
             {
                 dpStartHist.Value = times.Value.a;
                 dpEndHist.Value   = times.Value.b;
             }
             return;
         }
     }
     dpStartHist.Value = DateTime.Now;
     dpEndHist.Value   = DateTime.Now;
 }