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



Search Forums

(Advanced Search)

Forum Statistics
» Members: 1,081
» Latest member: Rockmaxdiy
» Forum threads: 48
» Forum posts: 129

Full Statistics

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

Latest Threads
Closing a system
Forum: General Discussion
Last Post: admin
10-07-2021, 06:37 PM
» Replies: 4
» Views: 261
Stock Signals
Forum: Documentation
Last Post: admin
10-07-2021, 06:35 PM
» Replies: 9
» Views: 5,115
Remove ".au" endings
Forum: Feature Requests
Last Post: Marcel
09-27-2021, 08:36 AM
» Replies: 0
» Views: 35
Remove ".au" endings
Forum: Feature Requests
Last Post: Marcel
09-26-2021, 07:40 PM
» Replies: 0
» Views: 31
FX and Crypto Trading
Forum: Documentation
Last Post: Adrian Reid
09-19-2021, 09:43 PM
» Replies: 1
» Views: 821
Using Cron for Scheduling
Forum: Documentation
Last Post: Marcel
09-16-2021, 02:22 PM
» Replies: 7
» Views: 3,441
Rounding Shares
Forum: Feature Requests
Last Post: admin
09-03-2021, 08:11 AM
» Replies: 1
» Views: 126
Troubleshooting and Known...
Forum: Bugs and Problems
Last Post: admin
08-11-2021, 06:59 AM
» Replies: 6
» Views: 2,877
Support allocation method...
Forum: General Discussion
Last Post: Marcel
07-15-2021, 06:46 AM
» Replies: 2
» Views: 1,303
Delayed Signals
Forum: Documentation
Last Post: admin
06-17-2021, 03:01 PM
» Replies: 0
» Views: 588

  Remove ".au" endings
Posted by: Marcel - 09-27-2021, 08:36 AM - Forum: Feature Requests - No Replies

In a recent post, I requested a feature on Alera, where the .au endings are removed. Since then, I learned to just add a line from Powershell to remove the endings as in the following example:

(gc C:\temporary\test.csv) | % {$_ -replace '.au',''} | out-file C:\temporary\test.csv -Fo -En ascii

The Powershell line works quite well, so unless other users need a feature like that, I wouldn't bother.

Print this item

  Remove ".au" endings
Posted by: Marcel - 09-26-2021, 07:40 PM - Forum: Feature Requests - No Replies

Norgate data adds ".au" to the end of any Australian stock symbols. In order to trade with Alera on the Australian market, as far as I understand, I have to use a separate program to remove the ".au" endings. Would it be possible, when the Alera "Strategy Type" is set for "Australia Stk (AUD) ", that it could remove the ".au" endings?

Print this item

  Rounding Shares
Posted by: Marcel - 08-30-2021, 01:45 PM - Forum: Feature Requests - Replies (1)

As far as I understand, for the American market, if you send an order for odd lots, it gets sent to different and possibly less favorable market for odd lots. It's nice on Alera, that you can uncheck "Allow Odd Lots" and that works well in most cases.

However, when you're working with some high priced shares, and it wants to round the value down, you end up with an order for 0 shares. For example, if you wanted to buy 4 shares of GOOG, currently around $2900 a share, it would round it up to 0. Would it be possible to include a switch to turn on the "Allow Odd Lots", only when the number of shares calculated to buy is less than a certain number, say 200 shares? Then if you have over 200 shares calculated, it would round the number of shares down.

Print this item

  Closing a system
Posted by: Marcel - 07-15-2021, 06:43 AM - Forum: General Discussion - Replies (4)

Is there a simple way, when you want to stop trading a particular system, to set it to turn off any new trades but still accept the closing trades?

Print this item

  Delayed Signals
Posted by: admin - 06-17-2021, 03:01 PM - Forum: Documentation - No Replies

Delayed Signals
Delayed Signals allow you to specify when you want a signal to be processed by APM.

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

A delayed signal is specified by writing AFTER <date> in the signal. The date is formatted as YYYYMMdd hh:mm:ss zzz where zzz is the timezone e.g. 20200108 15:30:00 EST. This is the exact same as the format for GTD (Good Til' Date) orders.

Here are some sample signals

LONG SPY AFTER 20210601 10:00:00 EST
CLOSE AAPL LMT 400 AFTER 20210601 13:00:00 EST
RSN IBM ID 100 AFTER 20210601 13:00:00 PST

Important Notes
  • Any signal can be delayed.
  • You can only have one delayed signal stored at time per ticker. If you place a second delayed signal for the same ticker, it will override the existing one.
  • To cancel a delayed signal, simply write AFTER 0 instead of a date. The Action in the signal doesn't matter. For example,
    will cancel an existing delayed signal.
  • Delayed signals can be placed in a strategy for a ticker even if the ticker is not owned by the strategy. At the time that the delayed signal triggers, the signal will be processed as usual.
  • Delayed signals that are not owned by a strategy will show up with the exposure ORPHAN or STR_{ID} in your portfolio tab. This is to indicate whether the ticker is currently orphaned or belongs to a strategy with the id {ID}. The current quantity is also displayed.
  • Delayed signals are highlighted in orange in your portfolio tab.
  • For CSV files the column name you need to use is AFTERDATE. Note that in this column you only need the date and not the keyword AFTER before the date.

Print this item

  Get last used Trade ID from API
Posted by: patelgopesh - 05-27-2021, 02:24 AM - Forum: Feature Requests - Replies (2)


I am using Google Sheets to generate orders in csv file and I would like to keep track of the last used trade ID. Is it possible to get that through API in JSON or TEXT ? I can then import the last ID back to my Google Sheet and thus not have to bother with remembering the used IDs. The APM by the way shows that but would be nice to read it through API at the end of day.

Many thanks.

Print this item

  Tips and Tricks (Miscellaneous)
Posted by: admin - 05-25-2021, 11:03 AM - Forum: Documentation - No Replies

Tips and Tricks
This thread has several tips and tricks that may be useful to you. Some of these are listed elsewhere in the documentation as well.
Please feel free to suggest additions to this list by replying to this thread.

Interactive Brokers

Preload Contract Details
You can specify a list of tickers to preload contract details for at APM startup (connection to IB) so that your orders can be placed more efficiently (since sometimes IB provides contract details very slowly). You can place a file called cd_ticker_list.txt in the account level directory with a list of tickers (comma, new-line, or space separated tickers). Note that you need to specify the country of the ticker in the name using the following rules:

  • The format is <ticker>:<country>, for example BHP:AX where AX is the country code for Australia
  • Valid country codes are AX (Australia), US (USA), UK (UK), NS (India)
  • US tickers do not need a country code. You can use SPY and not SPY:US
  • To indicate a CFD, prefix the ticker with @ (e.g. @SPY)
  • This does not work for UK tickers that are not in GBP (or GBX) currency. We will add support for other currencies in the future if there is interest
  • Note that the formatting rules above correspond exactly to the formatting rules you see used in APM for tickers

Order Ref Field
Each order that is placed by APM in IB has an Order Ref field which is set as the ID of the strategy placing the order. This allows you to keep track of all your trades in each strategy through IB Flex reports. You need to specify "Include Audit Trail Fields" in your Flex Query configuration in order for the Order Ref field to be included in your reports. This solution was originally posted by a user in the following thread: https://aleratrading.com/forum/showthrea...601#pid601
[Image: ib_orderref.png]

Print this item

  Custom Stop and Target Orders
Posted by: admin - 05-12-2021, 03:00 PM - Forum: Documentation - No Replies

Custom Stop and Target Orders
As of version 3.3.0, we have added the ability to have APM manage custom Stop and Target orders. These are different from regular signals since APM will manage two orders at once for a given position alongside any regular orders.

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

Order Types
To distinguish between the custom stop/target orders and regular STP/TGT orders, we use the names Exit Stop (E_STP) and Exit Target (E_TGT). These names (somewhat) intuitively imply that these stop and target prices will be used for exiting positions, essentially functioning as highly customizable bracket orders. It's important to note that E_STP and E_TGT orders are handled by the same system that is described in the Position Management system described in the Strategies documentation. The major difference is that you as a user can specify the STP and TGT prices instead of letting APM choose.

Signals Formats
There are two ways to specify to use custom stop/target orders: directly in signals for regular orders OR as separate signals.

Regular Signals

  • When you want to open (or modigy) a position with an order, you can specify a E_STP or E_TGT price in the signal.
    For example, all of the following are valid signals

    LONG SPY 500 SHARES LOC 300 E_TGT 600
    LONG SPY 500 SHARES LMT 300 E_STP 200 E_TGT 600

  • Once one of the above signals open a position, then E_STP and E_TGT prices will be used to create orders.
  • Note that the signal must be valid in order for the E_STP or E_TGT price to be processed

E_STP and E_TGT Signals
  • When we only want to update the E_STP and E_TGT price, we can use custom signals in the following format:
    [OrderType] [Ticker] [Price]

    For example,
    E_TGT SPY 600
    E_STP SPY 400

  • Note that these signals can only be processed if a position or order already exists for the ticker.

Cancelling Custom Stop/Target Orders
You can cancel a custom Stop and Target order by using a -1 in the price spot of an E_STP or E_TGT signal. For example,
Note that you cannot set the E_STP/E_TGT price to -1 in a regular signal to cancel stop/target orders.

General  Notes
  • Note that the prices specified in the most recent regular signal for E_STP and E_TGT will be used. This means that if you specify a signal without an E_STP (or E_TGT) price, the existing E_STP (or TGT) price will be removed.
  • You can cancel these E_STP and E_TGT orders. If regular STP and TGT orders are enabled, then those will be placed once you cancel the E_STP or E_TGT order.
  • If you close a position, all E_STP and E_TGT orders are cancelled. Furthermore, if you cancel the order associated with an E_STP (or E_TGT) order (and there is no position), then the E_STP (or E_TGT) order will be cancelled
  • Conditional Orders (RSN,REL,RES, etc.) don't place E_STP or E_TGT immediately. The E_STP and E_TGT orders are only registered after the conditional order triggers. This also means that using a different E_STP or E_TGT value than the current one for something like a ReEnter Long (REL) signal will not affect your current E_STP or E_TGT price, until that REL signal is converted to a regular order later.

CSV Signal File Format
Please see the File Formats documentation for details.

Print this item

  trade metrics
Posted by: ivanf - 03-25-2021, 06:49 AM - Forum: Feature Requests - Replies (1)

Would it be possible to have a tab for each strat which shows key metrics such as win/loss % , drawdown, payoff ratio, expectancy etc ( kinda like what is provided in Amibroker as a system report)

Then the same metrics at account level ?


Print this item

  broker support
Posted by: ivanf - 03-25-2021, 06:43 AM - Forum: Feature Requests - Replies (1)

Hi Alex,

apart from IB I also use SAXO, would be nice if you could suuport them, they have an API but I have heard its pretty shitty ( exactly what shitty means I don't know) 

I think they use something called OpenAPI 


Print this item