private void HandleOnBarFromBus(OnBarMessage barMessage)
        {
            if (null != barMessage && null != barMessage.Bar && null != barMessage.Instrument)
            {
                if (ValidateInstrument(barMessage.Instrument) && ValidateBar(barMessage.Bar))
                {
                    var convertedAndAddedBar = ConvertAndFlushBar(barMessage.Bar);

                    OnBar(convertedAndAddedBar);

                    if (!IsOrderInCompletedState())
                    {
                        LoggingUtility.WriteInfoFormat(this, "QUOTE CLIENT - Received Bar: {0}", convertedAndAddedBar);
                    }
                }
            }
        }
        private void PublishBar(Bar bar)
        {
            string topic = Instrument.Symbol.ToUpperInvariant();
            OnBarMessage message = new OnBarMessage {Bar = ConvertBar(bar), Instrument = ConvertInstrument()};

            WriteInfoFormat("Publishing bar: {0}", bar);

            Bus.Publish(message, topic);
        }