Exemple #1
0
        // управление

        /// <summary>
        /// вызвать окно управления
        /// </summary>
        public void ShowDialog()
        {
            BotTabCandleSpreadUi ui = new BotTabCandleSpreadUi(this);

            ui.ShowDialog();

            if (Tabs.Count != 0)
            {
                _chartMaster.SetNewSecurity("Index on: " + _userFormula, Tabs[0].TimeFrame, null, Tabs[0].ServerType);
            }
            else
            {
                _chartMaster.Clear();
            }
        }
Exemple #2
0
        /// <summary>
        /// отрисовать осноной чарт
        /// </summary>
        public void PaintPrimeChart()
        {
            if (string.IsNullOrEmpty(SecurityToInter))
            {
                return;
            }


            if (_chartHost == null ||
                _rectChart == null)
            {
                return;
            }

            _chart.Clear();
            _chart.StartPaint(_chartHost, _rectChart);

            MinerCandleSeries series = CandleSeries.Find(ser => ser.Security.Name == SecurityToInter);

            if (series == null)
            {
                return;
            }

            _chart.SetCandles(series.Candles);

            if (_volume == null)
            {
                _volume = new Volume("Volume", false);
                _volume = (Volume)_chart.CreateIndicator(_volume, "VolumeArea");
            }
            _volume.Process(series.Candles);
        }
Exemple #3
0
 /// <summary>
 /// очистить журнал и графики
 /// </summary>
 public void Clear()
 {
     _chartMaster.Clear();
 }