If you want to fully automate your Excel trading model, you will want to execute buy and sell orders directly through your broker’s system. Several brokers such as Interactive Brokers provide an Application Programming Interface (API) that allows you to send orders directly from your own software to their trading system over the Internet. This API code can be embedded into Excel to enable the necessary user security and order functions for fully automated trading.
The following brokers offer an order execution API than can be used with Excel:
- FXCM
- GAIN Capital
- Interactive Brokers (API to TWS)
- Interactive Brokers (Excel API for Beginners PDF)
- MB Trading
- Oanda
Here is another helpful link to various FX order execution utilities which can be integrated with Excel: GoForex Article
Automating trade execution from Excel is best for day trading, pure “robot” trading models that require no human decision-making, and traders who are both technical in nature and tend to trade a lot of securities over a wide range of markets where it is not possible to visually track everything during the day. You will need to learn your broker’s API language, how it works with VBA or its own formulas, and perhaps even some C++ or Java code to get it to work. Once it’s running you need to monitor the system regularly to ensure it’s functioning properly.
Alternately you can buy a small pre-coded application that you just add-in to Excel. This eliminates the necessity of coding your own API interface to your Excel model. Check back here soon — we will be posting some product links.
Setting up fully automated trade execution in Excel is accomplished by first determining what order types you will send to to your broker. You will need to code your trading model signals to match these orders and the syntax the broker’s system requires. You will then need to target your system’s signals to a location in your Excel spreadsheet where it can be picked up by the API and sent as a “call” to the broker’s system. If you set it all up properly all you need to do is connect to the Internet, login to your broker’s API using your trading account identifiers, open your trading model, make sure the Excel API is functioning, and turn your model on. Any buy/sell order that your model creates will then be automatically sent over the Internet and executed by your broker in the market.
The process of setting up your broker’s Excel trade API, synchronizing your model’s buy/sell order syntax with the API syntax, sending test orders, and monitoring real trade orders can be fairly complex. This is best suited to people with decent technical skills. However, with some hard work and your broker’s technical documentation, it can be made to work by the more ingenious layman.