예제 #1
0
        private void SecurityEditor_OnSecuritySelected()
        {
            _security = SecurityEditor.SelectedSecurity;

            Chart.Reset(new[] { _candlesElem });

            _connector.RegisterMarketDepth(_security);
            _connector.RegisterTrades(_security);

            _candleManager.Start(new CandleSeries(typeof(TimeFrameCandle), _security, TimeSpan.FromMinutes(1)));
        }
예제 #2
0
        private void SecurityPicker_OnSecuritySelected(Security security)
        {
            if (security == null)
            {
                return;
            }

            if (_candleSeries != null)
            {
                _candleManager.Stop(_candleSeries);                 // give back series memory
            }
            _security = security;

            Chart.Reset(new[] { _candlesElem });

            _connector.RegisterMarketDepth(security);
            _connector.RegisterTrades(security);

            _candleSeries = new CandleSeries(CandleSettingsEditor.Settings.CandleType, security, CandleSettingsEditor.Settings.Arg);
            _candleManager.Start(_candleSeries);
        }