Welcome, Guest
You have to register before you can post on our site.



Search Forums

(Advanced Search)

Forum Statistics
» Members: 644
» Latest member: LinneaMayer
» Forum threads: 34
» Forum posts: 75

Full Statistics

Online Users
There are currently 18 online users.
» 0 Member(s) | 17 Guest(s)

Latest Threads
Using Google Drive for Si...
Forum: Documentation
Last Post: Nicita Dikut
Yesterday, 05:36 PM
» Replies: 1
» Views: 495
Check Out our YouTube Cha...
Forum: News
Last Post: RonBlade
Yesterday, 08:12 AM
» Replies: 2
» Views: 56
Forum: Documentation
Last Post: RonBlade
Yesterday, 08:10 AM
» Replies: 1
» Views: 1,279
Trading CFDs (Contracts f...
Forum: Documentation
Last Post: admin
01-05-2021, 11:59 AM
» Replies: 0
» Views: 121
Known Issues
Forum: Bugs and Problems
Last Post: admin
11-02-2020, 12:03 AM
» Replies: 2
» Views: 1,637
PowerShell CLI for the Al...
Forum: Tools and Plugins
Last Post: SimranAlston
10-30-2020, 04:44 AM
» Replies: 1
» Views: 426
Stock Signals
Forum: Documentation
Last Post: admin
10-05-2020, 06:34 PM
» Replies: 8
» Views: 2,290
Using Cron for Scheduling
Forum: Documentation
Last Post: C0101
09-30-2020, 02:19 PM
» Replies: 6
» Views: 1,588
Stock Screeners
Forum: Documentation
Last Post: C0101
09-27-2020, 05:23 PM
» Replies: 4
» Views: 1,530
FX and Crypto Trading
Forum: Documentation
Last Post: admin
08-28-2020, 01:36 PM
» Replies: 0
» Views: 287

  Check Out our YouTube Channel!
Posted by: admin - 02-05-2021, 03:18 PM - Forum: News - Replies (2)


Print this item

  Trading CFDs (Contracts for Difference)
Posted by: admin - 01-05-2021, 11:59 AM - Forum: Documentation - No Replies

CFDs for Stocks
These instruments allow you to get the returns of an underlying stock, but are traded directly through your broker and not an exchange. They can be useful if you are European and looking to trade US ETFs and Stocks that may not be available in your country. Please read the IB documentation doc 1 and doc 2. Trade at your own risk.

CFDs are not available to those residing in the US or Canada for legal reasons. If you attempt to trade CFDs on your IB accounts, the orders will be rejected from IB (and you can see the error message in your account log).

Before reading ahead, make sure you have read the Stock Signals tutorial.

How Trade CFDs in APM
In your strategy settings there is a Security Type setting that allows you to select different options for trading.
CFDs are prefixed with the @ symbol, e.g. the CFD for SPY will be displayed as @SPY

Stocks Only
Standard APM stock trading.

CFDs Only
Trade only CFDs. All signals should be formatted the same. The only difference is that instead of buying the stock, APM will buy the CFD.

Stocks and CFDs
This setting allows you trade both Stocks and CFDs. Click the ... beside this option to open a settings window that allows you to specify which tickers you would like to trade as Stocks and CFDs.
IMPORTANT: Even though we distinguish between Stocks and CFDs, signals must still only contain the ticker name, e.g. SPY and not @SPY
IMPORTANT: You can only trade either the Stock or the CFD for a ticker in the strategy. For example, if the stock is currently in the strategy, then any signals in the strategy will be for the stock regardless of your settings. Once the stock position closes, then you can trade the CFD in the strategy.

Print this item

  FX and Crypto Trading
Posted by: admin - 08-28-2020, 01:36 PM - Forum: Documentation - No Replies

FX and Crypto Trading
This guide explains how to trade FX and Crypto with APM. We will refer to both FX and Crypto trading as Currency Trading from here on out.
Available with APM version 3.0.0+

You should be familiar with APM before reading this guide.

How Currency Pairs are Represented
Our goal was to make Currency trading as similar to stock trading as possible, so that you can enjoy all the same features as with stocks. The main idea here is that for an Currency trading strategy, you choose a base currency to trade in, where any currency you trade will be paired with the base currency. For example, you might choose USD as the base currency for your strategy and trade CAD, GBP, and EUR on that strategy. This means you would be trading CAD-USD, GBP-USD, and EUR-USD pairs. Note that some exchanges/brokers use a different convention and call this the "quote" currency, while calling the left currency in the pair the "base" currency.

You should also note that even though your broker might only support the CAD-USD pair (in that order), APM allows you trade both CAD-USD and USD-CAD by automatically converting to the pair supported by your broker. This means that when you view your portfolio for a strategy, you will see all the pairs in the same direction (i.e. XXX-USD when USD is the base currency).

Also note that when you select a base currency for a strategy, that currency can no longer be traded by any other strategy.

Currency Signals
Behavior is very similar to stock signals. Your signals must only contain the non-base pair. i.e., if your base currency is USD, and you want to trade CAD-USD, then the ticker in your signal must be CAD (not CAD-USD).

Also, the unit types are slightly different. Instead of DOLLARS/$ and SHARES, you should use PRIMARY and the currency name itself, respectively. The other unit types remain the same.

# instead of BTO USD 10000 SHARES DAY                       

# instead of BTO USD 500 $   
# other examples
BTO BTC 5 BTC LMT 9000 GTC    # bitcion

Quantity and Price Precision
Since it's possible to purchase fractional quantities with currencies, each currency trading pair has its own unique min tick size designated by the broker. Since the pairs we are trading are fixed, e.g. we can BTC-USD (and not USD-BTC), there is a precision specified on the quantity of BTC (8 decimal places) and a precision specified on price in USD (2 decimal places). You can view both the quantity and price precision for each trading pair in the currency info tab in your account settings (when you are connected to your broker).

Min Currency Quantities for Positions
In Currency trading, it is often not possible to completely close your position in a currency (i.e. it's hard to make your position exactly 0). However, when you close your position, APM will consider your position neutral if the final balance is small enough. For Crypto trading, this threshold is when your position is less than $1 USD. For FX trading in IB, this threshold is when your position is less than $50 USD.

Note that sometimes in IB, a close order may not be able to shrink a position past this $50 threshold. This is rare, but when it does happen, you will have to enter another CLOSE or close the position manually in order to free up the ticker from the strategy.

Interactive Brokers
  • You can use the same IB gateway as for stock trading, just make sure the client IDs are different in APM if you want to trade both stocks and FX at the same time. By default stock trading has client ID 0 and FX has client ID 1.
  • Base currencies: USD, AUD, EUR, GBP, CAD

Binance and Binance US
  • Only non-margin trading as of now
  • STPLMT and LIT orders are converted to LMT orders if the target price is already met. Otherwise, Binance rejects these orders if we leave them as STPLMT/LIT
  • Alera STP and TGT orders cannot both be in the market at the same time because of margin restrictions. To resolve this, APM will swap between STP and TGT orders depending on which is closer to being executed.
  • No fee for cancelling orders, so we can get around any potential problems caused by the above points by internally managing orders
  • Base currencies: USD (only Binance US), EUR (only Binance), USDT, BTC

Print this item

  PowerShell CLI for the Alera API
Posted by: admin - 08-26-2020, 10:14 PM - Forum: Tools and Plugins - Replies (1)

PowerShell CLI
You can download a PowerShell script from here to connect to the Alera API. You will need to run

Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Scope CurrentUser
in PowerShell to give permissions to ps1 files to run.

You will want to make sure you set the port and strategy id to match the strategy you want to connect to through the API. You also want to make sure to enable the API in APM (in the account settings). If it doesn't work, restart APM and ensure the API is enabled.

This script was built in conjunction with Systematic Investors Group. You can see a demo of the script at https://www.youtube.com/watch?v=ZH3D7duJABo (starting at 33:00).

Print this item

  Alera Demo with Systematic Investors Group
Posted by: admin - 08-06-2020, 06:52 PM - Forum: News - No Replies

Thank you to Dave from Systematic Investors Group for hosting us last Thursday (July 30) on his webinar!
Here we explained how you can use the Alera Portfolio Manager (APM) to do anything and demoed several use cases.

Print this item

  Conditional Signals (REL/RES/RSN/OTS/OTL)
Posted by: admin - 07-14-2020, 08:45 PM - Forum: Documentation - No Replies

Conditional Orders
These orders allow users to automatically place orders that will enter and exit positions given certain conditions.

Before reading ahead, make sure you have read the Stock Signals tutorial.

On-Trigger Signals
Allows you to preemptively place an order to modify a position once it opens. These are useful for when you want to place two orders in the market, but you only want the second order to be placed after the first is executed. You can also use them to automatically place orders to close positions.

On-Trigger Long (OTL)

  • Signal to go long a specified amount as soon as a position opens
  • If there is currently a position, this signal will be ignored
  • Requires a signal ID to be processed
  • An existing OTL order can be cancelled by sending an OTL order with quantity 0 (MUST specify 0 SHARES; something like OTL SPY ID 200 won't cancel the order)
On-Trigger Short (OTS)
  • Signal to go short a specified amount as soon as a position opens
  • If there is currently a position, this signal will be ignored
  • Requires a signal ID to be processed
  • An existing OTS order can be cancelled by sending an OTS order with quantity 0 (MUST specify 0 SHARES; something like OTL SPY ID 200 won't cancel the order)
The following will double our position if the initial BTO order is executed. Note that the OTL order is placed FIRST in case the BTO order executes immediately.

ReSet to Neutral (RSN)
  • Signal to close a position as soon it opens
  • If there is currently a position, this signal will become a CLOSE order immediately
  • Requires a signal ID to be processed
  • An existing RSN order can be cancelled by sending a RSN order with quantity 0 (MUST specify 0 SHARES; something like RSN SPY ID 200 won't cancel the order)
The following will place a CLOSE AAPL MOC DAY order if the initial AAPL position opens

ReEnter Signals
Allows you to preemptively place an order to re-enter the market once the original position in a stock is closed. This may be useful if you want to maintain a long-term position in a stock, but you think it will go down. Hence, you can put a CLOSE LMT order to close the position and a REL LMT order to re-enter the position at lower price.

ReEnter Long (REL)
  • Signal to re-enter a long position as soon as it is closed
  • If the current position is not long, this signal will be ignored
  • Requires a signal ID to be processed
  • An existing REL order can be cancelled by sending a REL order with quantity 0 (MUST specify 0 SHARES; something like REL SPY ID 200 won't cancel the order)
ReEnter Short (RES)
  • Signal to re-enter a short position as soon as it is closed
  • If the current position is not short, this signal will be ignored
  • Requires a signal ID to be processed
  • An existing RES order can be cancelled by sending a RES order with quantity 0 (MUST specify 0 SHARES; something like RES SPY ID 200 won't cancel the order)
Suppose we are currently long AAPL. Then placing the order
will place an order BTO AAPL LMT 100 when our position in AAPL is closed.
Note that a closing order(CLOSE/STC/BTC) should be placed AFTER the REL order to ensure that the REL order is not ignored if the closing order is executed immediately.

Conditional Order Expiration Time
Since it may be desirable to have REL/RES/RSN/OTL/OTS orders automatically cancelled after sometime, we have added a Conditional Orders section that allows you to do this in the Strategy Settings.

Note that when you specify a Time In Force (TIF) in a Conditional Signal, that TIF is for the order that will be placed, not the Conditional Signal itself. That means if you place
then IF this limit order is placed, its TIF will be DAY. The Conditional Signal itself is not cancelled unless you specify a cancellation time in your strategy settings.

The expiration time format is simply hh:mm:ss zzz where zzz is the timezone, e.g. 15:30:00 EST

  • The signals you place with RSN/REL/RES/OTL/OTS actions work exactly the same as regular signals. That means that all parameters (like price, order type, TIF) will be stored and passed onto the signal that may eventually be placed as an order.

Print this item

  tracking individual strat trades
Posted by: ivanf - 07-09-2020, 07:59 PM - Forum: Feature Requests - Replies (1)

Hi ,

is it possible with IB with submit some sort of tag or order ref which could contain the strat name ?
I'm looking for ways to easily identify individual trades from statements  so I can monitor ongoing performance of strats 


Print this item

  too easy to blow away a portfolio position
Posted by: ivanf - 06-30-2020, 10:03 PM - Forum: Feature Requests - Replies (1)


by accident I just hit the "X" which removed a symbol from my portfolio.

There should be a secondary challenge such as " do you really want to do this ?"

There should also be a way of reverting or restoring a symbol / position .

With multiple stategies it is very difficult to currently reconcile symbols against the account & strategy  so if you accidently remove a symbol it may not get picked up for quite a while.

Needs to be more protection in place

thanks !

Print this item

  Support allocation method in order for IB Master Account
Posted by: sgarytong - 06-30-2020, 04:42 AM - Forum: General Discussion - Replies (1)

For IB Master Account, it support place order in allocation method/Account Profiles. Do existing Alera portfolio manager support this type of order?

Print this item

  support for CFD
Posted by: ivanf - 06-29-2020, 06:30 AM - Forum: Feature Requests - Replies (1)

Here in Australia we have access to CFD's via the IB platform .

I would like to see this instrument supported in APM.   Orders are placed using the underlying symbol however they are of type CFD rather than STK.

One possible issue could  be that the symbol IB use in its reporting ( and maybe API) has the suffix "n" to signify its a CFD 

eg   IBM  underlying   IBMn is CFD 

so when placing an order we use IBM CFD  but the API might return IBMn as the executed symbol.  Not sure on this as I don't have much knowledge of the API but I do see the suffix used in their flex reports 

CFD's are used to overcome margin restrictions and provide leverage greater than REG-T so many people use them

Print this item