TWSConnection() { _client = new EClientSocket(this); _mktDataPrices = new Dictionary<string, TimeSeries>(); _mktDataVolumes = new Dictionary<string, TimeSeries>(); _tickers = new List<string>(); }
public IBConnectionTestForm() { InitializeComponent(); orderDlg = new ContractOrderDlg(); //contractStk = new Contract("SPY", SecurityType.Stock, "SMART"); // new Contract("ES", SecurityType.Future, "GLOBEX","USD", "201306"); //contractCrncy = new Contract("EUR", SecurityType.Cash, "IDEALPRO"); ibClient = new EClientSocket(this); }
public IBClient(string host, int port, int clientId = 0) { Host = host; Port = port; ClientId = clientId; _marketDataRequests = new List<Tick>(); _marketDepthRequests = new List<string>(); _historicalBarRequests = new List<BarRequest>(); _symbolToPosition = new Dictionary<string, Position>(); _iborderIdToOrderInfo = new Dictionary<int, OrderInfo>(); _duplicateIBIdToDeferredTrade = new List<KeyValuePair<int, Trade>>(); _nextValidIBID = 1; _ibSocket = new EClientSocket(this); }
Dictionary<int, PairPos> pairPosDict; // key, stkID, recording all positions in pair. #endregion Fields #region Constructors private EWrapperImpl() { //this.MAX_QUOTE_LIST = maxQuote; this.clientSocket = new EClientSocket(this); this.equityDict = new Dictionary<int, Equities>(); this.PairPosDict = new Dictionary<int, PairPos>(); try { File.Copy("mylogger.txt", "backup_logger.txt", true); } catch (Exception) { Console.WriteLine("Skip backing up and created a new logger file"); } MyLogger.Instance.Open("mylogger.txt", false); // create/open logger file this.readSymbols(SYMBOL_FILE_DIR); }
//String etfDir, String stkDir public EWrapperImpl(string symbolFileDir, string quoteFolderDir, int maxQuote) { //this.MAX_QUOTE_LIST = maxQuote; this.SYMBOL_FILE_DIR = symbolFileDir; this.QUOTE_FOLDER_DIR = quoteFolderDir; this.clientSocket = new EClientSocket(this); this.tickerSymbolDict = new Dictionary<int, string>(); this.etfSymbolLst = new List<string>(); // quote dict has been moved //this.quoteDict = new Dictionary<int, List<QuoteTick>>(); this.PairPosDict = new Dictionary<int, PairPos>(); MyLogger.Instance.Open("mylogger.txt", true); // create/open logger file this.CSVReader(SYMBOL_FILE_DIR); this.CreatePairObjs(); }
public BrokerWrapperIb() { clientSocket = new EClientSocket(this, Signal); }
public EReader(EClientSocket clientSocket, EReaderSignal signal) { eClientSocket = clientSocket; eReaderSignal = signal; processMsgsDecoder = new EDecoder(eClientSocket.ServerVersion, eClientSocket.Wrapper, eClientSocket); }
public EWrapperImpl(MessageHandler messageHandler) { clientSocket = new EClientSocket(this); MessageHandler.messageBox = messageHandler.messageBox; IsConnected = false; }
public EWrapperImpl() { clientSocket = new EClientSocket(this); }
public EReader(EClientSocket parent, BinaryReader reader) { this.parent = parent; this.tcpReader = reader; }
public IBClient(IBSampleApp parent) { parentUI = parent; clientSocket = new EClientSocket(this); }
public EWrapperImplementation() { EClientSocket = new EClientSocket(this); }
/// <summary> /// Initializes a new instance of the <see cref="InteractiveBrokersClient"/> class /// </summary> public InteractiveBrokersClient() { ClientSocket = new EClientSocket(this, new EReaderMonitorSignal()); }
//! [socket_declare] //! [socket_init] public EWrapperImpl() { Signal = new EReaderMonitorSignal(); clientSocket = new EClientSocket(this, Signal); }