Long time users of Amibroker will know that it’s an excellent software for backtesting, scanning and many other tasks. However, automation of trading strategies is not one of it’s strengths.
Fortunately there’s a new and simple solution which I discovered in a new class called Trading And Investing Automation For Amibroker.
This solution involves linking up Amibroker with the Interactive Brokers API via a third -party software called Alera Portfolio Manager.
Configuring The Technology Stack
The course starts with some introductory material such as system requirements and the differences between full and semi-automation.
It soon gets into the meat of the course where we learn about the technology stack required for trade automation.
In a nutshell, the technology stack involves four components; Amibroker, Norgate Data Updater, IB Gateway and Alera Portfolio Manager.
Norgate Data is used to update Amibroker with the latest EOD quotes.
Amibroker is used to export buy and sell signals and Alera Portfolio Manager provides the link between Amibroker and the Interactive Brokers Gateway API.
This solution allows complete order execution, portfolio management and automation for end of day trading.
The whole process is set to run on autopilot with the help of batch processes within Amibroker and automatic updates (instigated by Alera).
Updates can be set to various times depending on your timezone and trading requirements.
The only manual intervention needed is a restart once a week which is necessary for the IB Gateway. This is normally done every Monday morning before the open.
Total Cost Of Automation
A total automation setup is not free but can be setup at reasonable cost.
Once you have taken the course and understand your requirements there are different pricing levels available depending on the number of strategies you want to automate and how much data you need.
IB Gateway is a free, lightweight API that is downloaded from the Interactive Brokers website.
Norgate Data is available as a free trial with a minimum subscription price of $22.50 per month for their Silver package. Other data sources can also be used depending on suitability.
Alera Portfolio Manager is provided free for the first three months before switching to CAD$12.99 for paper trading and CAD$49.99 for Silver.
You may also want to spend another $20 – $60 per month for cloud services if you are wanting to host on a virtual server.
All together I estimate that a total solution for automated trading can be set up for just $60 – $80 a month.
This doesn’t include Amibroker which is a $279 license for the standard edition but overall this is a very reasonable expense.
Alera Portfolio Manager
Alera Portfolio Manager (APM) is really the glue that brings this automation solution together and I’m not aware of any similar product on the market.
It’s a lightweight piece of software that picks up and processes buy/sell orders from Amibroker but can also take signals from other sources such as website stock screeners (eg. Finviz) and website signal providers.
The ability to take signals from online sources such as web screeners is another potential opportunity for traders looking to invest in automation.
APM also provides detailed trade logging (that can be sent via email) and provides an easy to use interface for adjusting various trade criteria:
No Interference Issues
APM manages the connection between the broker at all times while allowing portfolio management of positions.
This means APM manages positions on a per-strategy basis and does not allow duplicate signals or additional strategies to interfere with the correct order of trades or position sizing:
The plugin also provides the scheduling and automation of data updates meaning there is very little human input needed.
All told, APM reduces the toll on your computer’s resources to a bare minimum and it doesn’t suffer from the synchronisation issues that plague so many other automation platforms.
As well as providing a solution for trade automation, this course also provides a number of example scripts so you can easily get started.
These scripts include:
- AFL code for generating and exporting signals from Amibroker
- AFL code for an RSI-2 trading strategy (automation ready)
- AFL code for a MACD trading strategy (automation ready)
- Batch automation files
These scripts just need to be modified for your own strategy rules and trading requirements and you will be good to go.
You can also run the example scripts as they are and see how they get on in a paper trading account.
As you would expect it’s important to vigilantly test all your strategies with the IB paper trading account first before committing to real money.
It’s also important to treat automation with caution and remember that automation doesn’t necessarily mean a totally hands-off approach.
It’s best to watch alerts, trade logs and keep an eye on proceedings so that you can easily fix any issues as soon as they occur.
This course does an excellent job of explaining a process for trade automation with Amibroker.
Everything is covered step by step and the additional AFL scripts mean it is easy to get started automating strategies straight away.
The cost of total automation is also low when compared to other providers and can be first evaluated on a free trial basis.
I’ve really enjoyed this course and I’ve started putting some scripts together which I hope to automate on a cloud server with AWS. It will be great to get some systems running and then report back on their results.
Automation in Amibroker can be a complex process so it’s good to finally have a straightforward solution.
If you’re interested, take the course using the link below. (I talked with the instructor and you can use the coupon code ‘jbmarwood’ at checkout to get $50 off):
I look forward to hearing about your success with trading automation in Amibroker!
Joe Marwood specializes in stock trading and systematic investing strategies. If you are interested in more quantitative trading strategies, trading tips and investing courses make sure to check out the full program at Marwood Research.