예제 #1
0
        private void LoadInstrumens(string filename)
        {
            var xs = new XmlSerializer(typeof(RecordedInstruments));

            Cursor = Cursors.WaitCursor;

            using (var reader = new XmlTextReader(filename))
            {
                _instruments = (RecordedInstruments)xs.Deserialize(reader);
                reader.Close();
            }

            UpdateGridsFromContractLists();
            Cursor = Cursors.Default;

            _filename = filename;
        }
예제 #2
0
        public IBGridForm(string[] args)
        {
            _twsHost = "localhost";
            _twsPort = 7497;


            InitializeComponent();

            _grids = new List <Grid>();
            _grids.Add(stocksGrid);
            _grids.Add(futuresGrid);
            _grids.Add(indicesGrid);
            _grids.Add(stockOptionsGrid);
            _grids.Add(futureOptionsGrid);
            _grids.Add(indexOptionsGrid);

            stocksGrid.Tag        = IBSecurityType.Stock;
            futuresGrid.Tag       = IBSecurityType.Future;
            indicesGrid.Tag       = IBSecurityType.Index;
            stockOptionsGrid.Tag  = IBSecurityType.Option;
            futureOptionsGrid.Tag = IBSecurityType.FutureOption;
            indexOptionsGrid.Tag  = IBSecurityType.Option;

            SetupCommonGridResources();
            SetupMarketDataGrids();
            SetupLogGrid();

            _settings = new TWSClientSettings();

            _instruments = new RecordedInstruments();

            _logFiles = new Dictionary <string, TextWriter>();

            _logGridRow = 1;

            _updateGridRowDelegate = UpdateGridRow;

            ParseCommandLine(args);
        }
예제 #3
0
    public IBGridForm(string[] args)
    {
      _twsHost = "localhost";
      _twsPort = 7496;

     
      InitializeComponent();

      _grids = new List<Grid>();
      _grids.Add(stocksGrid);
      _grids.Add(futuresGrid);
      _grids.Add(indicesGrid);
      _grids.Add(stockOptionsGrid);
      _grids.Add(futureOptionsGrid);
      _grids.Add(indexOptionsGrid);

      stocksGrid.Tag = IBSecurityType.Stock;
      futuresGrid.Tag = IBSecurityType.Future;
      indicesGrid.Tag = IBSecurityType.Index;
      stockOptionsGrid.Tag = IBSecurityType.Option;
      futureOptionsGrid.Tag = IBSecurityType.FutureOption;
      indexOptionsGrid.Tag = IBSecurityType.Option;

      SetupCommonGridResources();
      SetupMarketDataGrids();
      SetupLogGrid();

      _settings = new TWSClientSettings();

      _instruments = new RecordedInstruments();

      _logFiles = new Dictionary<string, TextWriter>();

      _logGridRow = 1;

      _updateGridRowDelegate = UpdateGridRow;

      ParseCommandLine(args);
    }
예제 #4
0
    private void LoadInstrumens(string filename)
    {
      var xs = new XmlSerializer(typeof (RecordedInstruments));

      Cursor = Cursors.WaitCursor;

      using (var reader = new XmlTextReader(filename))
      {
        _instruments = (RecordedInstruments) xs.Deserialize(reader);
        reader.Close();
      }

      UpdateGridsFromContractLists();
      Cursor = Cursors.Default;

      _filename = filename;

    }