/// <summary> /// Called when bar received from <see cref="MarketDataListener"/> /// </summary> /// <param name="bar"></param> private void OnBarArrived(Bar bar) { if (_asyncClassLogger.IsDebugEnabled) { _asyncClassLogger.Debug(bar.ToString(), _type.FullName, "OnBarArrived"); } _orderExecutor.BarArrived(bar); _tradeHubStrategy.OnBarArrived(bar); }
/// <summary> /// Called when bar received from <see cref="MarketDataListener"/> /// </summary> /// <param name="bar"></param> private void OnBarArrived(Common.Core.DomainModels.Bar bar) { if (_asyncClassLogger.IsDebugEnabled) { _asyncClassLogger.Debug(bar.ToString(), _type.FullName, "OnBarArrived"); } //_statistics.Flag = false; _statistics.UpdateBar(bar); //_prevBar = _currentBar; //_currentBar = bar; _orderExecutor.BarArrived(bar); _tradeHubStrategy.OnBarArrived(bar); //Check(); _statistics.CalculatePnlAfterBar(); }