Australian (ASX) Stock Market Forum

Managing Multiple Strategies

Try the orderRef field, and you can set it from TWS or the API. It's just a dumb string for user trade Info.


It doesn't have to be unique, so you could put in a system name, or comment or whatever.

The orderRef also COPIES itself across to the execution. So if you partly filled an order, you can then change the orderRef, the first execution will contain the first orderref and the second part the second orderRef. Probably only usefull for comments

I have no idea how to generate reports using this via IB though, or even if you can get it in the reporting field in their standard reports. It would be more a dump to excel kind of thing.
Thanks @DaveDaGr8,

I appreciate the reply, and all the help in the past.

But we've gone from "Can do it easily with IB" to "get an FA account and use Modelling (but it's a brain f***)", to add attributes to the basket trade and thus the order (which I'm doing so am familiar with it). I assume this would then lead to a Flex Query or some other extract (eg. Python API), and managing this process outside IB? If so, it's a pity such an advanced broker hasn't implemented a simple (to me anyway) solution.

Don't get me wrong, I really appreciate the help so far, and perhaps I could have explained my use case better.

I'm wondering if the "answer" (such that it is) is:

  • Amibroker/RealTest/Python/whatever you use for your "system" to generate your signals
  • Create a Basket Order or use IB's Python API to place the orders with IB
  • Flex Query or Python API to extract the *actual* orders (slippage, orders that were actually filled, etc) to CSV (I'd probably do this weekly). Using the Basket Order as the data source for actual system performance won't be accurate.
  • Use Share Trade Tracker or Stator or Sharesight or <whatever> to track system performance outside of the broker
  • Track your system performance and adjust accordingly (rebalance equity allocation, change position size, take offline, etc)

IOW this can't be done at the broker itself?

Does that sound about right? If so, then this is a completely different path than the above, but useful for those who find this post in the future. I'm still glad I have the FA account; there seem to be a lot of features, some of which I may (or may never) use in the future.

I'm reminded of Edison and the light bulb: "I haven't failed, I've discovered 10,000 ways it won't work".
 
With less details, i am in the same boat, i opened a FA account on ib, moved some finds then was hoping to create multiple account one per system.but did not look simple, and ib was asking me to fill a form, but was impossible to load that form.
asked support help: that was 2 month ago..so support not available when i want to move money in? Imagine if i had trouble to withdraw...
But if anyone has a simple steps way to do that....
 
OrderRef is only a text field and can only be used on orders->executions. It can be used as a comment but can't be used otherwise in TWS and i don't think it can be used by flex reports ( never tried ).

Models are usefull for
- Orders
- Positions
- Executions
- segregating systems for viewing within TWS
- Allocating/Islanding Funds to systems
- Checking your individual systems on your phone.

So in your original post you asked if people created one account per system, models are a way of achieving the same outcome without the effort of seperate physical accounts, but getting most of the IB features.

If you want to make virtual accounts and utilize IB's internal features, models are the way to do it.
If you want a simple way to track orders to systems you can use the orderRef field and use an external program to interrogate the data.

I use the safety systems that IB provide, ie the Model allocation to make sure that my systems don't try and over allocate. I also have safety systems within my programs to make sure that nothing goes horribly wrong. Then i have another program called watchdog that watches my IB account 24/7 on the master client and will kill orders that are outside of parameters. Maybe i'm a bit too paranoid, but better safe than sorry.

If you're already delving into the realm of basket orders etc, then you are semi automating and should really be looking at the safety side of trading and IB models are the first layer. Things can and do go horribly wrong with automation. Maybe @tech/a can ask Nick when he rings him just HOW wrong they can go, from memory Nick had a big hit with a technical glitch a few years ago on his US HFT !!!
 
If you want to make virtual accounts and utilize IB's internal features, models are the way to do it.
I create a model called SystemA
This week my Amibroker SystemA generates 5 buy orders
Within IB I move those 5 orders from Independent to SystemA
Next week SystemA generates 5 more buy orders
Can I move those 5 more buy orders into SystemA?
Because I'm not seeing how to do that
 
Top