Over the past couple of months or so I have been inactive at trading and spending a lot of time working on stock related projects, to deepen my understanding and to improve my trading efficiency.
As a computer engineer, I don’t like repeatable actions that are not automated: this often results in slow and wasteful manual actions that could otherwise be almost instantaneous. My only broker is currently Interactive Brokers and their platform is great, but leaves a lot of room for improvement; this is especially true when it comes to penny stocking and adapting things to your needs.
One thing I’ve always admired about IB is the fact that they offer an API for their platform, which allows developers, such as myself, to develop custom, specialized features to complement whatever is being offered.
One of the projects I’ve been working on is a companion application for IB’s TWS that allows me to become a faster trader and reduce the amount of manual actions required for me to prepare and submit order. My original goal, was simply to build my watchlist and get all the settings calculated for me based on my Risk Management Strategy.
Here is a screenshot of my current progress:
The software that I’ve developed currently has the following implemented features:
- Create & remember watchlists & tickers
- Obtain account information
- Automatically calculate position values based on Risk Management Strategy and account values
- Automatically set the entry/exit prices price with an offset on every tick
- Connect to TWS groups and display the data based on the stock selection
- Quickly open, close a position, add to a position or lock profits by closing half the position (automatic or customized values) with the single click of a button – prices are updated tick-by-tick, so entry price is set according to settings and executions are relatively fast. (order updates can be performed in TWS for price and position)
- Get Real-Time Data from TWS
- A lot of other less important details
In simpler terms, I’ve created this software to remove all the manual labor required for preparing and submitting my orders: once I have established my watchlist, each ticker in the list has pre-defined (or customized) settings that represent my potential order. All that I have to do to enter or exit a position is simply click my buttons and wait for the execution on TWS, Open a position, Add, Lock profits or Close the position.
Here is a small video I’ve made of an earlier version of it in action:
The software still has lots of bugs and misses some basic features (basic and default settings cannot currently be edited), but it is coming up nicely and the actions that I needed seem to be working.
Here are some of the features I am currently implementing:
- Auto close loss (based on my Risk Management Strategy calculated Absolute Stop price)
- Auto close profit (based on $ goal per share)
Here are some features that I have planned in the near future:
- Trend lines and using them as absolute stop indicators, and potentially as auto-entry indicators if I decide to implement that features
- Contract strategies (in order to track strategy performance)
- Post entries/exits to twitter, and potentially profit.ly (there currently isn’t an API for profit.ly that I know of)
Future development may include:
- strategy auto trading
- criteria based auto trading
This software is still a work in progress, but I am certain that it will greatly improve my trading efficiency. As it is I should be able to use it for may day to day trading, but I am still in the process of validating that entries and exits are executed properly in a simulated (paper trading) environment.
I will probably dedicate some posts for developer traders explaining how to take advantage of the Java IB API, intended for those interested in implementing their own auto-trading strategies.
That’s my progress so far; I’m expecting to finish all the basic functionalities within the next couple of weeks (including testing and validation) and then getting back to day trading with real money using this software as an extra tool.