TRADE preview for autotrading and order routing to Interactive Brokers

Dear all,

This link [url=https://www.portfolio123.com/doc/trade/]http://www.portfolio123.com/doc/trade/[/url] shows some documentation on the upcoming TRADE feature which will allow you to place orders directly from P123 to Interactive Brokers. They are just a few preliminary pages . I’m showing them now for three reasons

  • It shows the steps to take to get a jump start opening an IB account (which can take a while), or having an existing account approved for TRADE

  • Get some feedback

  • Enable TRADE for a limited number of users who won’t mind using a non 100% polished tool (just email me)

Thank You

Marco

I have more than one IB account. Will I be able to connect to all of them?

In my manual ‘trading’ I use the equity curve to gauge whether or not my ‘system’ is working or not. If not I get out of the market until the equity curve looks healthy again. As a simple example:- is my equity above or below its X period moving average. If crosses below sell. When rises above buy stocks in portfolio. There are, of course, many sophistications on that, e.g. consider the slope of a linear regression line etc.

I would have much more confidence in auto trading if this kind of risk management was built in.

Would it be possible to include some simple technical indicators on the portfolio’s interactive chart?

In the meantime I can continue to keep my equity curve information in other software.

Looking forward to never having to log into TWS again!

Steve

Steve

Same here - I have three separate IB accounts. Am I going to be able to use TRADE for all of these?

Marco,

Once this feature is up and running - having a reliable, safe autotrading will be a GREAT addition. Will be a huge time saver. So…thanks for working on this. A couple questions:

  1. Can you write a little bit more about the ‘extra’ security around protecting passwords and preventing other people from stealing account info? I believe it was azinvestor who posted previously on having his brokerage account ‘hacked’ and his money traded out. How hard will it be for a third party to ‘hack’ P123 and get everyone’s account info…and enter orders to trade this money out?

  2. Any protections you can detail against ‘order error?’…is it possible for the user to put a constraint in…or series of constraints in (say by strat)…where a user can set the maximum size order that can be entered for a given system? I mention this because I am aware of a friend of mine who was running an autotraded strategy for over a year…when one day the contract order went through for 20X the correct amount. He made 20% in 1 hour before he found it and closed the position. But…he had a team of 4 programmers…and that still happened…so that’s fresh on my mind and concerning. A simple hard constraint by strategy should be able to prevent that…so just curious about some of the underlying protections built into the code…or that the user can set.

@Gary and Steve…just curious are you using multiple accounts to more easily track ‘live’ performance of various strat’s or for some other reason? Did you set them up as an advisor with sub’s or in some other way?

Best,
Tom

Multiple accounts are supported

There are multiple layers of protection. I won’t reveal them all.

We’ll require a second verification password everytime you are logging in from a different computer. We obviously suggest using strong passwords.

The IB account is strongly encrypted. We can’t see easily , only programmatically.

We think the worst case scenario is if someone is able to login as you and run up the price of a penny stock. That’s about all that can be done with a FIX connection. No withdraws, transfers, etc.

We’ll probably disallow TRADE from sending orders to IB is price < 1 as an extra protection.

As far as order errors, we could add a user configurable max per trade. I tried placing an order in my small test account that exceeded 2x leverage and was rejected by IB. Sounds like your friend had much higher leverage allowance.

In conclusion, TRADE is not designed for intra-day trading. It’s designed for getting in or out of a position to follow a strategy.

Any other thoughts are welcome.

THanks

Marco,

Thanks.

Some thoughts:

PROTECTIONS

Ability to set a ‘home computer.’ And then…I like the idea of a different, ‘second’ password if someone logs in to the main account from a different computer. And would add:
a) immediate notification of the user by email and/or text as soon as that has occurred (or whenever it occurs). Perhaps the first time we log in to P123 from a different computer,
b) any time we log in for autotrading setting changes, we could be required to use an IB type ‘code key’. At IB I use this. Anytime I log in, they generate 2 random numbers between 1 and 224. I then input the matching ‘codes’ from my unique key that match these numbers. This seems very hard for a third party to break and gives me a lot of confidence.

Other ideas - just thinking out loud:

  1. If I could also set a bottom on minimum liquidity and price allowed on the stocks that are allowed to be traded in my account, and then set the max. position amount that could be traded by model type and/or liquidity, that would potentially be a big step. It would likely be much harder for someone to ‘trade out’ a lot of money from my account if they can only trade stocks that are doing $1MM a day in liquidity or example. Or only trade up to 2% of account value in any microcaps. Maybe these types of constraints could be user specified. Also maybe could…not trade more than X per position for model type?

Re: Peace of Mind

  1. If automatic ‘account DD’ provisions could be set at the account level, would allow for more peace of mind to take a longer vacation. For example, if trading could be automatically suspended if an X dollar stop limit in the account was reached, this is another potential safeguard. This could be helpful if I want to take a long trip as well. And totally forget P123. In this event…I could turn this on and set my ‘settings’…and then if an X% DD is hit at the account level…for example 20%…I could specify either a) sell all positions at VWAP over next X hours / days or whatever…until sold…or b) hedge the account with X instrument to achieve ‘no net market exposure’ or c) hedge with X and then sell down positions and adjust hedge as positions are sold down.

These account level provisions could be very helpful in giving peace of mind.

Re: Books.
I haven’t followed all the threads on autotrading. But, can books be set up to autotrade…whereby included sub-strategies (up to 10 or whatever) are reset to equal weights every X period? Is this in the works? This would be a huge addition to this for whenever you can get to it.

I am very excited that this is close to here. It will (I think) make me a much better trader. Long-term, I hope to focus on system development and let ‘the machine trade.’

Best,
Tom

Tom
I’m jn the UK.
My accounts include a cash account for my pension funds (an IB requirement), a margin account for general investment of non pension fund monies and a fund I run for my son. I have a couple more but nothing more esoteric than that really.
Steve

Hi Tom:

IB has more than one form of two factor authentificiation. The one you describe sounds similar to what my son uses to authentic at IB (ie, the 2 random numbers are locator coordinates for a unique authenticification number on a grid that the IB website generated for him and he printed out.). IB has given me an alternative authentification method using a credit card size dongle that generates a unique 6 digit number that changes every few seconds. My guess is the credit card dongle has an internal clock that gets combined with a unique user private key to generate the authentification code I type into the IB login screen. I assume the IB login computer matches the number I type in with a number generated by its own internal clock and my unique private key. If I take too long to type in my authentification number I have to redo the login. Oh, the credit card dongle has its own password I have to type in before it will reveal the unique 6 digit authentification number. IB’s security makes my bank’s login in look child like.

The credit card would have some expenses to implement (very accurate internal clocks, Fed Ex shipping of the credit card dongle, purchasing the dongles, etc.), but the 2 number grid approach would be less expensive to set up and still would offer a significant degree of security for user logins.

Oh, these user authentification measures are only good against the hacking takes place at the level of individual account logins. The more terrifying would be a hack that gets complete control of the servers which would give access to all accounts no matter what extra authentification steps users might be using.

Brian

Marco
First : congratulations on another huge step forward - well almost but I trust it will get done soon .

One comment from an active trader ( not relevant to people that want to have no involvement in the trading aspect )

You can enter orders at IB in 2 stages . Create or create and transmit .

I would like as a first step to get all my rebalance orders created automatically using Fridays close as a default limit order . That would take a huge part of rebalancing workload away .

This is what I do manually over weekends .

One can then decide on the open / before the open / after the open depending on your style and market conditions which orders to transmit and where to adjust prices etc etc . One can for instance transmit all the orders on one page with a single button click in IB . This also help to eliminate "cross-overs " – one portfolio sells a share and another buys it . --( By the way if you run different accounts cross-overs are not allowed at IB between different accounts )

This first step would be easy to test and have very little "implementation risk "

Hugh

Marco,

After you’re IB account is registered to accept trade signals, are you still able to enter trades directly through TWS as well?

Tom,
Multiple accounts are for different legal entities.

TRADE has no effect on TWS or anything else. Thanks for the feedback

Also any orders sent through TRADE show up in TWS just like any other trade. If an order is canceled in TWS it will also be canceled in TRADE. However any trades entered in TWS will not show up in TRADE

Marco,

Will you have the capability in TRADE to take in multiple transactions at a time via a file load or import?

Thanks.

Tom C

Marco,

I assume that more order types are to be added? The preliminary docs show limited order types.

Tom, yes

Gary, yes. We will focus on order types that do not require a price so that they can be used for any stock in automatic recommendations and have higher chance of getting filled. Currently only Market & VWAP fit that bill. THere others that fit that criteria:

Acc/Dist
At Auction
% of Volume
TWAP

Let us know your favorite order types and how you used them.

Thanks

Hi Marco:

I may have missed the answer in your post, but how do I create a TRADE account here at P123 (step 6)?

mm123, don’t worry about that step yet. First thing is sending the docs to IB. We should be ready by end of the week to activate the accounts that have been approved. We still need to add security measures to “validate” the computer you are using with TRADE and do more testing.

Marco,

When do you feel the TRADE log-in security protocols will be in place (if they aren’t already)?

Question:
Have you guys had a chance to do any analysis on actual live money trading results from the various algo’s? If so, what equivalent slippage and ‘price for transaction’ settings are you seeing?

Have you run tests at various trading amounts / liquidity bands to see how varying amounts traded are playing out at these different liquidity levels…and how these values correspond to the ‘variable’ slippage amounts currently being used?

This will be one of the first areas I test. If the community (or you guys) can aggregate and/or share some ‘basic’ info. on this, would be great. Without people giving away any secrets.

Not that familiar with the ‘paper trading’ at IB…Are there any 'paper trading accounts that still allow for testing with realistic fill prices based on intraday volume and position size? Does anyone know about these at IB?

Best,
Tom

Marco,

I would like MOO ( market on open) and MOC ( market on close) Order types please.

I have sometimes used the accumulate/distribute algo where I am buying a lot of the liquidity, but it is slow to enter all of the fields. If this could be automated, I would use this also.

Thanks

I would like LMT and STP to be supported order types. I use market and sometimes algos, but some of my systems need to send an order with a price.

And for DAY, GTC, GTD, OPG, and IOC to be supported “time in force”

https://www.interactivebrokers.com/en/software/webtraderguide/webtrader/orders/supported_order_types.htm

Thanks.

Tom C