
Overview
Alera portfolio manager is one of the most critical components in an automated trading system. Without it, there would be no way to get your algorithm’s signals to your broker for trade execution. Alera’s function is to communication with IB Gateway via Interactive Brokers’ REST API to be able to monitor your brokerage account and place trades. This guide will walk you through how to get started with Alera Trading portfolio manager.
This article will review the following:
Register an Account with Alera Trading
To get access to the application, you’ll need to sign up for a membership by visiting the Alera website and registering an account. This will give you acces to the download of the current software version as well as previous version history via the Alera Trading forum. The installation process is pretty self-explanatory once you follow the registration link.
For the fully automated version, you will get the following benefits:
- Multiple Signal Providers
- Flexible Position Sizing
- Various Order Types
- Inter-Strategy Ticker Management
- Email Trading Summary
- Market Order Protection
- Multiple Strategies per Account
- Order Preview
- Manual Order Selection
- Order Execution Scheduling
- Place Orders via the Alera API
- Conditional Orders
- Strategy P&L Tracking for Stocks
- Advanced Position Management
- Portfolio Hedging
The total cost for the starter plan is $ 29.99 USD /mo, which lets you manage up to a $50k portfolio. Subscriptions are tiered beyond that based on portfolio size. The next step up lets you manage $50k-100k. The Pro plan is $89.99/month for an unlimited portfolio size. Hopefully, if you have a working algorithm and you set up your system properly, will be in need of the Pro plan in short order!
Paper Trade First
You don’t need to start with a paid plan if you are curious and want to test things out.
Alera offers a FREE paper trading plan that lets you test your system without needing to put your money on the line. When I built my system, I paper-traded with Alera’s free service for a few months before I took it live. This is a great feature and I recommend using it. It will allow you to work out any bugs in your process, make sure IBKR is receiving and processing signals, and that you have a thorough understanding of the application’s intricacies risk-free.
For the beginner, I recommend visiting the Alera Trading forum to familiarize yourself with the product. You can do this before you sign up if you want to explore how other users are experiencing it. In addition, you can ask troubleshooting questions, find guides on setting up, and download version updates. Not only are other users helpful, but I have found that the moderators are extremely responsive whenever I have a functionality question.

Download the Application
In the forum, you’ll find your download in the following location:
- Alera Forum › Alera Portfolio Manager › Documentation › Getting Started › Installation.
Set Up Alera Dashboard
Select the plus symbol next to the account name box and it will open Alera Portfolio Manager.
You can name your account anything you want, but make it unique since you will be using it in your scripts for automation later on.

Alera Account Settings
The important pieces in account settings are your license token and the IB account ID. The IB account ID can be found in the top left corner of your IB account once you log in and go to config > settings. The Alera Token will auto-populate with a paper trading license number. Once you are ready to trade with a live account, you can find your Alera token in the Alera subscriptions page. Plug those two numbers in and save your account settings. Once complete, move into the next step.

Alera Portfolio Strategy Settings
The critical fields in strategy settings are your signal provider, your file path, and your google drive folder ID.
In my system, I use a Google Drive file saved in CSV format as my signal provider.
Alera offers alternative signal provider options that include the following: local files, web signal providers, Finviz, file screeners, and Google Drive Screener. Of the alternatives, Finviz is the most convenient and simplified since it offers direct integration from the signal originator. However, as mentioned in my original post, Finviz is severely limited in its algorithm customization and is not suited for complex strategies. Therefore, I recommend Using MarketInOut and sending those signals to a Google Drive file to interface with Alera.

How to find Google Drive Folder ID
The Google Drive Folder ID is easily found simply by opening the folder you are saving the .CSV file in and observing the alphanumeric designation after the final backslash (ie. https://drive.google.com/drive/u/0/folders/FOLDER ID HERE
Enable Scheduler
Alera uses Crontab syntax for scheduling. Plug in your desired trade execution times using the syntax. The Alera Forum provides examples of how to use cron here.
An aside on strategy
The core of my strategy is buying at the end of the day to take advantage of overnight moves due to the statistical advantage of holding a position overnight. This strategy also has the added benefit of avoiding day trades by default. Alera gives the option of placing trades “market on close”, however, this is not always a safe way to protect your entry price. Instead, I submit trades at 3:57 PM with a tight limit order. Those final three minutes always provide enough time to fill an order unless the target stock price rises rapidly above my limit or if volume is excessively low. I consider both conditions a good sign that the position is likely one to stay out of, so missing a trade on those conditions should be considered a blessing, either due to the price being too high or the volume being so low that it might have been a hard position to get out of. Regardless, setting up your system will be the same no matter the timing you decide on.
Start Your Alera Strategy
Go back to the Alera Account Settings page and hit the “start” button. This will initiate the connection with IB Gateway, which you should have already set up. There will be another guide on that.
Automate the Boot Sequence to Start Alera Portfolio Manager
Alera will run forever if it is not interrupted and it will automatically attempt to reconnect to the broker if disconnected, but I like to plan for any unplanned interruptions. Interruptions could occur for many reasons. Whether due to broker downtime or otherwise unknown events, there’s always a possibility that relying on a single application’s built-in safeguards will not protect your system integrity. It is therefore wise to integrate your own safety net in case of failure.
A simple solution to this is to restart Alera daily and confirm that it is properly interfacing with IB Gateway. The challenge, however, is not just starting Alera, but navigating through the menus unattended.
When I began my automation, I went through many test cases in attempts to launch Alera and move past the user screen to the account settings to the strategy. I was successful to an extent, but my solution depended on the application’s GUI being active, which meant that unless someone was logged into the virtual computer, it would not work. Ultimately, I ended up reaching out to the Alera developers for assistance and they were kind enough to provide a PowerShell command that would do just what I needed.
Start Alera Portfolio- PowerShell Command
You will need to use this PowerShell command (converted to an executable file) to start Alera and navigate through the standard menus.
The PowerShell command should read:
& ‘C:\Program Files (x86)\Alera\Alera Portfolio Manager\Alera Portfolio Manager.exe’ AccountName –start
This simply calls upon the file location, then selects your account in the login page and hits the strategy start button. Just like that, your strategy is up and running.
But what about the existing Alera session that may be running? You will need to force close it to avoid launching a duplicate window. You may also want to verify that once the strategy has been started, that the connection to the broker is successful.
To accommodate these needs, you can set up a script to close any windows running Alera, launch the PowerShell command, and then also wait to confirm if any errors are thrown. If an error is thrown, you can use conditional logic to start the process over. You can also supplement by automatically emailing or texting you that an error has occurred. I will cover that in another post.
Schedule the PowerShell .exe with Windows Scheduler to launch Alera daily.
There are a few interconnected pieces here.
- PowerShell
- Windows Task Scheduler
- AutoHotKeys
AutoHotKeys Script To Close Alera Portfolio Manager:
Schedule this to run any time you start Alera. Make sure you input your account name where it’s called out below. The Alera window’s title will start with your account name, so that’s what you need the command to look for.
It will close the existing Alera window using the AHK winKill command.
#NoEnv
SetWorkingDir %A_ScriptDir%
CoordMode, Mouse, Window
SendMode Input
#SingleInstance Force
SetTitleMatchMode 1
#WinActivateForce
SetControlDelay 1
SetWinDelay 0
SetKeyDelay -1
SetMouseDelay -1
SetBatchLines -1
winKill, YOURaccountNAME
exit
Error Message Check – Monitoring Your System:
This is the script I have scheduled in Windows Task Scheduler every 5 minutes to monitor the system.
If using this script, relace “user” with your Windows username anywhere you see it below and make sure your file locations are correct.
(System generated emails used in the script will be covered in another post)
AutoHotKeys Script to Monitor Your System:
#NoEnv
SetWorkingDir %A_ScriptDir%
#singleinstance force
sendmode, event
SetTitleMatchMode 1
SetControlDelay -1
SetWinDelay -1
SetKeyDelay 200, 200
SetBatchLines, 20ms
DetectHiddenWindows, On
WaitForIt := 5 * 1000
count := 1
sleep, 5000
if (WinExist("Error",,"ErrorMessageLoop"))
{
run C:\Users\user\Documents\IBC\SCHEDULED TASKS\killAleraOnly.exe
sleep,5000
winkill, user
sleep,5000
run C:\Users\user\Documents\IBC\SCHEDULED TASKS\startAlera.exe
run C:\Users\user\Documents\IBC\SCHEDULED TASKS\AleraRestartInitiatedEmail.exe
sleep WaitForIt
}
if (WinExist("Error",,"ErrorMessageLoop"))
{
run C:\Users\user\Documents\IBC\SCHEDULED TASKS\killAleraOnly.exe
sleep,5000
winkill, user
sleep,5000
run C:\Users\user\Documents\IBC\SCHEDULED TASKS\startAlera.exe
run C:\Users\user\Documents\IBC\SCHEDULED TASKS\AleraRestartInitiatedEmail.exe
sleep WaitForIt
}
if not WinExist("IB Gateway",,"ErrorMessageLoop")
{
winkill, IBC
sleep, 1000
run C:\IBC\StartGateway.bat
run C:\Users\user\Documents\IBC\SCHEDULED TASKS\IbcRestartInitiatedEmail.exe
sleep WaitForIt
}
if WinExist("Gateway",,"ErrorMessageLoop")
{
winkill, IBC
sleep, 1000
run C:\IBC\StartGateway.bat
run C:\Users\user\Documents\IBC\SCHEDULED TASKS\IbcRestartInitiatedEmail.exe
sleep WaitForIt
}
if not WinExist("user",,"ErrorMessageLoop")
{
run C:\Users\user\Documents\IBC\SCHEDULED TASKS\killAleraOnly.exe
sleep,5000
winkill, user
sleep,5000
run C:\Users\user\Documents\IBC\SCHEDULED TASKS\startAlera.exe
run C:\Users\user\Documents\IBC\SCHEDULED TASKS\AleraRestartInitiatedEmail.exe
}
exit
Windows Task Scheduler
Once complete, your task scheduler should look something like this. AleraBoot (you can name this anything you want) is scheduled to stop any instances of Alera using “killAlera” AHK file, then launch Alera by using the PowerShell executable file, then start the monitoring executable file created using AHK.
There is also a task scheduled to execute the monitoring file every 5 minutes daily in case anything goes wrong. The rest of the tasks you see scheduled here will be covered in separate posts.

Conclusion
And there you have it. Alera Portfolio Manager is securely set up and this component in your automation is complete.
Good luck and happy automating!

Leave a comment