Beispiel #1
0
        public async void ShowEquity(int accountId)
        {
            if (_eqIndic == null && FirstSource != null)
            {
                _equity  = new Equity(_insStoreBL, _instrumBL, _accountDA);
                _eqIndic = new EquityIndicator(_equity);
                await _equity.Generate(accountId, FirstSource.Bars.Dates);
            }
            if (_eqIndic == null || _chartData == null)
            {
                return;
            }

            var vis = _eqIndic.GetVisuals();

            foreach (var v in vis)
            {
                if (_chartData.LeftVisuals.Contains(v))
                {
                    continue;
                }
                _chartData.AddVisual(v, true);
            }

            _isShowEquity = true;
        }