/// <summary>
        /// Historic Bar Data Request Message
        /// </summary>
        public bool HistoricBarDataRequest(HistoricDataRequest historicDataRequest)
        {
            try
            {
                // Get Blackwood BarType
                Pacmid.Messages.DBARTYPE bwBarType = BlackwoodBarTypeConvertor.GetBarType(historicDataRequest.BarType);

                // Send Historic Data Request
                _session.RequestHistoricData(historicDataRequest.Security.Symbol, bwBarType,
                                             new DateTime(historicDataRequest.StartTime.Ticks, DateTimeKind.Local),
                                             new DateTime(historicDataRequest.EndTime.Ticks, DateTimeKind.Local),
                                             historicDataRequest.Interval,
                                             Convert.ToUInt32(historicDataRequest.Id));

                if (Logger.IsInfoEnabled)
                {
                    Logger.Info("Historic Data Request Sent: " + historicDataRequest, _type.FullName, "RequestHistoricBarData");
                }
                return(true);
            }
            catch (Exception exception)
            {
                Logger.Error(exception, _type.FullName, "RequestHistoricBarData");
                return(false);
            }
        }
        public void GetTradeBarTypeTestCase()
        {
            string bartypeIntraDay = BlackwoodBarTypeConvertor.GetBarType(DBARTYPE.INTRADAY);
            string bartypeDaily    = BlackwoodBarTypeConvertor.GetBarType(DBARTYPE.DAILY);
            string bartypeWeekly   = BlackwoodBarTypeConvertor.GetBarType(DBARTYPE.WEEKLY);
            string bartypeMonthly  = BlackwoodBarTypeConvertor.GetBarType(DBARTYPE.MONTHLY);
            string bartypeTick     = BlackwoodBarTypeConvertor.GetBarType(DBARTYPE.TICK);

            Assert.AreEqual(BarType.INTRADAY, bartypeIntraDay, "Intra Bar");
            Assert.AreEqual(BarType.DAILY, bartypeDaily, "Daily Bar");
            Assert.AreEqual(BarType.WEEKLY, bartypeWeekly, "Weekly Bar");
            Assert.AreEqual(BarType.MONTHLY, bartypeMonthly, "Monthly Bar");
            Assert.AreEqual(BarType.TICK, bartypeTick, "Tick Bar");
        }
        public void GetBlackwoodBarTypeTestCase()
        {
            Pacmid.Messages.DBARTYPE dbartypeIntraDay = BlackwoodBarTypeConvertor.GetBarType(BarType.INTRADAY);
            Pacmid.Messages.DBARTYPE dbartypeDaily    = BlackwoodBarTypeConvertor.GetBarType(BarType.DAILY);
            Pacmid.Messages.DBARTYPE dbartypeWeekly   = BlackwoodBarTypeConvertor.GetBarType(BarType.WEEKLY);
            Pacmid.Messages.DBARTYPE dbartypeMonthly  = BlackwoodBarTypeConvertor.GetBarType(BarType.MONTHLY);
            Pacmid.Messages.DBARTYPE dbartypeTick     = BlackwoodBarTypeConvertor.GetBarType(BarType.TICK);

            Assert.AreEqual(DBARTYPE.INTRADAY, dbartypeIntraDay, "Intra Bar");
            Assert.AreEqual(DBARTYPE.DAILY, dbartypeDaily, "Daily Bar");
            Assert.AreEqual(DBARTYPE.WEEKLY, dbartypeWeekly, "Weekly Bar");
            Assert.AreEqual(DBARTYPE.MONTHLY, dbartypeMonthly, "Monthly Bar");
            Assert.AreEqual(DBARTYPE.TICK, dbartypeTick, "Tick Bar");
        }