Ejemplo n.º 1
0
 private void panelChart_Paint(object sender, PaintEventArgs e)
 {
     if (chart == null)
     {
         return;
     }
     chart.ReDrawFull();
 }
Ejemplo n.º 2
0
        public void listBoxTicker_SelectedIndexChanged_UIResultHandler(RequestItemGroup resultResponse)
        {
            if (Helper.IsResultHasErrors(resultResponse))
            {
                return;
            }
            Dictionary <int, PriceCandle> priceHistory = (Dictionary <int, PriceCandle>)resultResponse.items[0].result.resultData;

            chart = new PriceChart(ticker, Graphics.FromHwnd(panelChart.Handle), 0, 0, panelChart.Width, panelChart.Height);
            chart.SetData(priceHistory, ConvertDataType.BAR_5, ConvertDataType.BAR_15);
            chart.ReDrawFull();
            Text = "Chart " + market.MarketName() + "  " + ticker;

            timerLastPrice.Start();
        }
Ejemplo n.º 3
0
        public void buttonLoadChartData_UIResultHandler(RequestItemGroup resultResponse)
        {
            if (Helper.IsResultHasErrors(resultResponse))
            {
                return;
            }
            Dictionary <int, PriceCandle> priceHistory = (Dictionary <int, PriceCandle>)resultResponse.items[0].result.resultData;

            if (chart == null || ticker == null)
            {
                return;
            }

            chart = new PriceChart(ticker, Graphics.FromHwnd(panelChart.Handle), 0, 0, panelChart.Width, panelChart.Height);
            chart.SetData(priceHistory, convertFromPeriod, viewResultPeriod);
            chart.ReDrawFull();
            loadRequeststarted = false;
            timerLastPrice.Start();
        }