Exemplo n.º 1
0
        //2015-10-27
        private Boolean isHistDataRequested(IBMessage message)
        {
            IAppMDManager appMDMManager = appStrategyManager.getAppMDManager();

            switch (message.Type)
            {
            case MessageType.HistoricalData:
                HistoricalDataMessage hMessage = (HistoricalDataMessage)message;
                if (appMDMManager.isHistDataAdHocRequested(hMessage.RequestId))
                {
                    return(true);
                }
                break;

            case MessageType.HistoricalDataEnd:
                return(false);

                break;
            }
            return(false);
        }
        public HistoricalDataManager(IBClient ibClient, Chart chart, DataGridView gridView, IBTradeApp appForm)
            : base(ibClient, chart)
        {
            /*
             * Chart historicalChart = (Chart)uiControl;
             * historicalChart.Series[0]["PriceUpColor"] = "Green";
             * historicalChart.Series[0]["PriceDownColor"] = "Red";
             */
            this.gridView = gridView;
            this.appForm  = appForm;
            AppStrategyManager stgManager = appForm.appStrategyManager;

            this.appMDManager    = stgManager.getAppMDManager();
            this.RTBSynchronizer = appMDManager.getAppRTBSynchronizer();
        }
Exemplo n.º 3
0
 public IBTradeApp()
 {
     initProperties();
     appStrategyManager = new AppStrategyManager(this);
     InitializeComponent();
     ibClient = new IBClient(this);
     readOrderFromFiles();
     orderManager = new OrderManager(ibClient, grid_open_order, grid_order_summary, this);
     appStrategyManager.setOrderManager(orderManager);
     appStrategyManager.ibClient = ibClient;
     accountManager        = new AccountDetailManager(ibClient, grid_account_details, grid_pos_summary, this);
     marketDataManager     = new MarketDataManager(ibClient, grid_market_price, appStrategyManager);
     realTimeBarManager    = new RealTimeBarsManager(ibClient, null, grid_rt_bar, appStrategyManager.getAppMDManager(), this);
     historicalDataManager = new HistoricalDataManager(ibClient, null, grid_hist_bar, this);
     tabMain.SelectedTab   = tabOrderStatus;
     initTickerInfo();
 }