IB ActiveX API Order status processing with VBA Dictionary object

If you ever submitted an order to Trader Workstation using IB API - you are probably aware of a well-known issue involving Interactive Brokers platform sending back duplicate order status updates. This can be problematic if your order management system or trading algorithm relies on accurate order status information. For example, a duplicate "FILLED" order status message for the same order ID can be misleading and confuse your trading logic.

This post demonstrates a method for improving IB ActiveX API's order status handling code using VBA Dictionary object. The algorithm for filtering out duplicate order status updates demonstrated in this post can also be used in Java, C++, and C# applications.
Posted in Interactive Brokers API, Programming examples Tagged with: , , , ,

Trading Strategy Backtesting Guide

Backtesting refers to testing a predictive model or a trading system using historical data. Traders use backtesting to test strategy ideas, compare strategy performance in different markets, time frames as well as determine optimal input parameter values for their systems.

Backtesting is proven to be useful for a couple of reasons. First, it is a method that provides concrete performance data for side-by-side strategy comparison. It eliminates guesswork and enables traders to apply scientific method to trading. Second, automated backtesting is a great time-saving tool. A good backtesting tool provides a way to iterate over thousands of parameter combinations and find the optimal ones. This process can be executed repeatedly on daily basis to ensure that a strategy stays fine-tuned using most up-to-date data.

Posted in Data Analysis Tagged with: , ,

Calculating Correlations of Forex Currency Pairs in Python

Traders often calculate correlation between different instruments, such as stocks and ETFs, or Forex currency pairs. It is important to know if you portfolio is properly diversified. Highly correlated instruments in your portfolio will tend to go up and down together compromising your diversification strategy. Keeping an eye for high correlations (positive or negative) is even more important to Forex traders, since currency pairs often exhibit high positive or negative correlations due to market conditions or having similar market drivers.… Read more...

Posted in Data Analysis, Programming examples

Technical Analysis with R

In this post we’ll take a look at how a trader could use R to calculate some basic Technical Analysis indicators. R is a free open-source statistical analysis environment and programming language. It is available for Windows, Mac OS, and Linux operating systems. Installation is easy and quick. For download and installation instructions go to: http://cran.r-project.org.… Read more...

Posted in Data Analysis, Trading Tools

Technical Analysis in Excel: Part II – MACD and RSI

In the second part of the Technical Analysis in Excel series we will describe how to calculate RSI and MACD indicators using Excel formulas (see Part I where we implemented SMA, Bollinger Bands, and EMA indicators).
Posted in Data Analysis

Interactive Brokers TWS Performance Optimization

This article describes a performance optimization tweak for Trader Workstation that helps to get TWS running faster and smoother, and even to prevent an occasional crash (Out of Memory error).

Interactive Brokers Trader Workstation is a powerful trading platform. However, out of the box configuration contains basic settings which are not optimal for serious users.… Read more...

Posted in Trading Tools

Technical Analysis in Excel: Part I – SMA, EMA, Bollinger Bands

In this three-part series or articles “Technical Analysis in Excel” we will explore how traders can use Excel to apply technical analysis (TA) to historical market data. This will include computation of some of the most popular technical analysis indicators and implementation of a trading strategy backtesting spreadsheet (in Part III).… Read more...

Posted in Data Analysis

IB Data Downloader


ib_downloader_3_downconf ib_downloader_3_options

IB Excel Trader

  • IB Excel Trader version 1.6 is now available!
  • Trade Stocks, ETFs, Futures, and Forex directly from Excel.
  • Implement custom trading rules using spreadsheet formulas or VBA.
  • Program entry rules for single or bracket exit orders. Market, Stop, Limit, Stop-Limit, as well as complex algo orders are supported.
  • Order Log sheet (new!). Contains a detailed list of each order status change in a filterable Excel table.
  • Use our Customization Service to extend IB Excel Trader and contract our programmers to develop your custom trading strategies.
IB-Excel-Trader-1-5_wTWS-2

Interactive Brokers (IB) is a low cost provider of trade execution and clearing services for individuals, advisors, prop trading groups, brokers and hedge funds. IB's premier technology provides direct access to stocks, options, futures, forex, bonds and funds on over 100 markets worldwide from a single IB Universal account.

Member NYSE, FINRA, SIPC. Visit www.interactivebrokers.com for more information.

Contact Us!

Please enter your contact details and a short message below and we will respond to your message shortly.