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

Username/Email:
  

Password
  





Search Forums

(Advanced Search)

Forum Statistics
» Members: 249
» Latest member: Chris_Shannon
» Forum threads: 29
» Forum posts: 41

Full Statistics

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

Latest Threads
tracking individual strat...
Forum: Feature Requests
Last Post: admin
Yesterday, 08:08 PM
» Replies: 1
» Views: 7
too easy to blow away a p...
Forum: Feature Requests
Last Post: admin
07-08-2020, 06:08 PM
» Replies: 1
» Views: 40
Support allocation method...
Forum: General Discussion
Last Post: admin
06-30-2020, 05:34 PM
» Replies: 1
» Views: 34
support for CFD
Forum: Feature Requests
Last Post: admin
06-29-2020, 07:52 PM
» Replies: 1
» Views: 32
LIT orders
Forum: Feature Requests
Last Post: admin
06-29-2020, 07:51 PM
» Replies: 1
» Views: 25
support for CFD
Forum: General Discussion
Last Post: ivanf
06-26-2020, 08:10 AM
» Replies: 0
» Views: 23
Trail Stop
Forum: Feature Requests
Last Post: robx
05-10-2020, 11:34 AM
» Replies: 2
» Views: 172
Futures on Alera
Forum: Feature Requests
Last Post: robx
05-10-2020, 11:30 AM
» Replies: 2
» Views: 168
Using Google Drive for Si...
Forum: Documentation
Last Post: admin
04-19-2020, 05:51 PM
» Replies: 0
» Views: 145
Alera API
Forum: Documentation
Last Post: admin
04-14-2020, 10:58 AM
» Replies: 0
» Views: 185

 
  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 

thanks
Ivan

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)

Hi,

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

  LIT orders
Posted by: ivanf - 06-29-2020, 06:22 AM - Forum: Feature Requests - Replies (1)

I would like to see support for Limit if Touched orders ( LIT) 

This  especially important for IB non margin accounts so users can queue  more orders than available slots in the account. ( which is a real problem with using LIMIT orders)

Here is Australia most retail investors do not have access to IB margin due to govt restrictions placed on IB

Print this item

  support for CFD
Posted by: ivanf - 06-26-2020, 08:10 AM - Forum: General Discussion - No Replies

HI, I trade CFD's with IB, does Alera support CFD's as an instrument ?

Print this item

  Futures on Alera
Posted by: robx - 05-08-2020, 02:28 PM - Forum: Feature Requests - Replies (2)

Hi, Are there US Futures scheduled for using with Alera in next versions? It would be nice to trade them with AmiBroker strategies.

Print this item

  Trail Stop
Posted by: robx - 05-08-2020, 07:57 AM - Forum: Feature Requests - Replies (2)

Hi, it would be nice to define Trail Stop in Points or Ticks, not just Percentage. This can be useful when dealing with Chandelier Stops or when the amount is defined adaptatively on the AMI Strategy wich often occurs on Swing or Intraday Strategies.

Print this item

  Using Google Drive for Signals
Posted by: admin - 04-19-2020, 05:51 PM - Forum: Documentation - No Replies

Using Google Drive for Signals
You can connect APM to your Google Drive to pull signals from a specified folder.

  • Find or create the folder in Google Drive that will store the signals
  • Open the folder in your browser and copy the Folder Id from the URL (it is the last part of the URL, should look like in the image below)
  • Paste this Folder Id into the settings page and click Save
  • The first time you do this, you will be redirected to your browser in order to login into your Google account
  • Allow Alera to have readonly access to your Google Drive. You may want to create a new Google account just to use with APM. Note that Google may tell you that APM is not verified. We are in the process of verification, but for now you will have to click on Advanced and Go to Alera Portfolio Manager(unsafe)
  • If you gave a correct Folder Id, then the settings will save, otherwise you will see an error in APM
  • To test that everything is working, place a signal file in the Google Drive folder and run the strategy (or hit Order Preview)

[Image: google_drive_example.png]

Print this item

  Alera API
Posted by: admin - 04-14-2020, 10:58 AM - Forum: Documentation - No Replies

Alera API
This guide explains how the Alera API works and how you can use it.
Available with APM version 2.1.0+

The Alera API allows you to:

  • Send signals directly to the APM signal queue for immediate processing
  • Retrieve account and strategy settings programmatically
  • Retrieve current portfolio, order and trade information on a strategy by strategy basis
All of this is achieved through an HTTP endpoint.



HTTP Endpoints
All end-points are prefixed with http://localhost:<port>/api where <port> is the API Port set up in the account setting page. Don't forget to actually enable the API (it is not available with gold licenses). We've also gone ahead and prevented any traffic to the API from a non-local IP. This means you should only be accessing the API from the same computer that the APM runs on.

Port 7425 is the default port and will be used throughout this document. Please make sure that you select a different port for each account when enabling the API for multiple accounts and that you are connected to the proper account.

Type URL Description
POST api/strategies/<id> Add multiple signals to the queue
GET api/account Get the account settings
GET api/strategies Get the settings for all strategies
GET api/strategies/<id> Get the settings a specific strategy
GET api/strategies/<id>/portfolio/<format> Get the portfolio for a strategy as text or json
GET api/strategies/<id>/orders/<format> Get the orders for a strategy as text or json
GET api/strategies/<id>/trades/<format> Get the trades for a strategy as text or json
GET api/strategies/<id>/reenter/<format> Get the ReEnter orders for a strategy as text or json
GET api/strategies/<id>/stats Get some statistics for a strategy
GET api/strategies/<id>/symbols Get a list of symbols assigned to the strategy by the APM



HTTP POST Requests

Strategies
This call allows the http client to send signals directly to APM for immediate processing. It requires the account to be running.

Endpointhttp://localhost:7425/api/strategies/<id>
Parameters:
  • Header:
    • Content-Type: application/json
  • Body:
    • Key: “signals”
    • Value: A string containing multiple lines with the same format as the flat signal files (i.e. each line contains one signal. Comments are allowed). Invalid signals will be ignored. No csv formatting supported at this time.
The response will be a list that contains only the signals with a valid format that were sent to the signal queue. The execution can be monitored via the  log tab.

POST Examples
URL: http://localhost:7425/api/strategies/1002
Header: Content-Type: application/json
Body:{"signals":"
    # This is just a comment
    BTO SPY
    LONG IVV 20 %position
    SHORT DELL 100 shares LMT 45
"}

Response:
BTO SPY
LONG IVV 20 %POSITION
SHORT DELL 100 SHARES LMT 45



HTTP GET Requests

Account
This call returns the account settings that were setup in the APM user interface.

Endpointhttp://localhost:7425/api/account
Parameters: NONE

Strategies
This call returns information regarding the strategies setup in the APM user interface.
Any call to a specific strategy requires the account to be running.

Endpointhttp://localhost:7425/api/strategies
Parameters:
  • Id:
    • This is the strategyId of the strategy you wish to query. Usually a 4 digit number (e.g. 1002)
    • If no strategy with this id exists, the call returns Bad Request and an error message
  • Info:
    • This parameter is used to specify the type of information that is requested for a specific strategy
    • The following values are valid:
      • Portfolio - returns the current portfolio
      • Orders  - returns all active orders. This includes the Stop and Target orders. The ReEnter orders are not listed here as they are not active in the market.
      • ReEnter - returns all ReEnter orders
      • Trades  - returns the trades executed in the last 24 hours
      • Stats    - returns the strategy statistics
      • Symbols - return a list of symbols assigned to the strategy (you do not necessarily hold positions for assigned symbols)
  • Format:
    • The response for Portfolio, Orders, ReEnter, Trades can be requested in two different formats (optional: default Text)
      • JSON - returns a list of JSON formatted objects
      • Text - returns a nicely formatted string (use this for displaying info)
    • The response for Symbols, Stats come in JSON format (see examples below)

If no parameters are specified, the GET request returns settings information for all strategies.


GET Examples

Settings
http://localhost:7425/api/account
http://localhost:7425/api/strategies
The outputs for these are not specified here since there are a lot of settings.
If you want to use this information, we suggest you look at the output yourself and determine what information you might want to use.


Orders
URL:  http://localhost:7425/api/strategies/1002/orders
Response:
[
  {
    "Symbol": "QQQ",
    "Currency": "USD",
    "Country": "US",
    "Action": "SELL",
    "Type": "TGT",
    "Quantity": 100.0,
    "TimeInForce": "GTC",
    "LimitPrice": null,
    "StopPrice": null,
    "TargetPrice": 215.5,
    "TrailingPercent": null
  },
  {
    "Symbol": "QQQ",
    "Currency": "USD",
    "Country": "US",
    "Action": "SELL",
    "Type": "STP",
    "Quantity": 100.0,
    "TimeInForce": "GTC",
    "LimitPrice": null,
    "StopPrice": 195.36,
    "TargetPrice": null,
    "TrailingPercent": null
  },
]

Code:
URL: http://localhost:7425/api/strategies/1002/orders/text

Response:
 ORDERS    Action   Quantity   Type    Limit       %    TIF       ID
-------------------------------------------------------------------
  1.   QQQ   SELL        100    TGT   215.50            GTC
  2.   QQQ   SELL        100    STP   195.36            GTC
  3.  SVXY   SELL        917    MKT                     DAY
  4.   TLT   SELL      1,000    STP   160.47            GTC
  5.   TLT   SELL      1,000    TGT   177.01            GTC
  6.   TLT   SELL      1,018    LOC   100.00            DAY
  7.  TSLA    BUY         80    TGT   551.95            GTC
  8.  TSLA    BUY         80    STP   611.31            GTC
  9.  TSLA    BUY         49    MKT                     DAY
 10.   USD    BUY        370    MKT                     DAY
-------------------------------------------------------------------
The following two URLs also produce the above result:
http://localhost:7425/api/strategies/1002/orders
http://localhost:7425/api/strategies?id=1002&info=orders&format=text


ReEnter Orders
The responses to these requests are the same as regular order requests:
http://localhost:7425/api/strategies/1002/reenter
http://localhost:7425/api/strategies/1002/reenter/json
http://localhost:7425/api/strategies/1002/reenter/text


Portfolio
URL: http://localhost:7425/api/strategies/1002/portfolio

Response:
[
  {
    "Symbol": "QQQ",
    "Currency": "USD",
    "Country": "US",
    "Quantity": 100.0,
    "Exposure": "LONG",
    "MarketPrice": 201.3999939,
    "MarketValue": 20140.0,
    "AverageCost": 216.555,
    "UnrealizedPNL": -1515.5,
    "RealizedPNL": null,
    "Hold": null
  },
  {
    "Symbol": "SVXY",
    "Currency": "USD",
    "Country": "US",
    "Quantity": 917.0,
    "Exposure": "LONG",
    "MarketPrice": 32.54999925,
    "MarketValue": 29848.35,
    "AverageCost": 53.88827155,
    "UnrealizedPNL": -19567.2,
    "RealizedPNL": null,
    "Hold": null
  },
]


Trades
URL: http://localhost:7425/api/strategies/1002/symbols

Response:
[
   {
    "Symbol": "GS",
    "Currency": "USD",
    "Country": "US",
    "Side": "BOT",
    "Quantity": 181.0,
    "AveragePrice": 183.21,
    "Value": 33161.01,
    "Time": "20200413  10:30:32"
  },
  {
    "Symbol": "GS",
    "Currency": "USD",
    "Country": "US",
    "Side": "BOT",
    "Quantity": 46.0,
    "AveragePrice": 183.38,
    "Value": 8435.48,
    "Time": "20200413  10:33:14"
  },
]


Symbols
URL: http://localhost:7425/api/strategies/1002/symbols

Response:
["QQQ","SVXY","TLT","TSLA"]


Stats
URL: http://localhost:7425/api/strategies/1002/symbols

Response:

    "LongExposure": 383826.07999999996,
    "ShortExposure": -76561.5,
    "NumberOfLongPositions": 3,
    "NumberOfShortPositions": 1,
    "LongPNL": 20382.74,
    "ShortPNL": 23753.41,
    "NetExposure": 307264.57999999996,
    "TotalExposure": 460387.57999999996,
    "TotalNumberOfPositions": 4,
    "TotalPNL": 44136.15
}

Print this item