General Topics
Markets
Technical Topics
Brokerage Firms
Company Specific
Community Lounge
Site Support

# 40 limit order signals but only have 10 positions available

Discussion in 'Interactive Brokers' started by Sam Mcgee, Sep 17, 2020.

1. ### thecoder

Can someone please summarize for me what Sam's problem is, as I somehow don't understand it, sorry

#11     Sep 21, 2020
2. ### mhparker

Desire to buy the first X of N symbols (a different set of N each day) that reach their limit price triggers intraday, at those prices (no slippage), but without placing N limit orders all at once in advance. Requires code that places orders as price approaches the trigger, possibly cancelling and re-placing them several times depending on price action of this vs. other symbols. Like @ValeryN, I've built software that does this, but would not be comfortable with the potential liability of having other people use it, so it's not currently for sale.

#12     Sep 23, 2020
Sam Mcgee likes this.
3. ### thecoder

Hmm. but he writes the following, and I think he does not understand that the problem is his position size of 10k, and not the 10 positions he seems to think... If he takes position size 5k then he can place 20 positions... he even can use all 40 by splitting the avail capital accordingly... simple allocation maths...

Last edited: Sep 23, 2020
#13     Sep 23, 2020
4. ### mhparker

No, I think I understood correctly. Assume it's a strategy that places the limit orders fairly far below yesterday's close, so that on any given day, it would be rare for even as many as 10 to actually reach that price (unless market is crashing). Hence the desire to have more candidates, to increase the chances of getting more than a couple of fills, while also needing to limit total position count to 10 (or whatever fraction is deemed optimal from backtesting) for tail-risk protection.

#14     Sep 23, 2020
Sam Mcgee likes this.
5. ### JamesJ

Why don't you just add a condition to the 40 limit orders.
E.g. Limit 10 for stock ABC with condition ABC Last <=10.02.
Order will be held by IBKR and only sent when ABC below 10.02.

This way you avoid having too many active orders and only the ones likely to fill will be transmitted.

This can be done easily in the order ticket.

PS: you might even improve your fill quality by controlling for large moves in a benchmark index. You probably dont want buy fills when overall market slides...

#15     Sep 23, 2020
6. ### thecoder

@mhparker, read his above sentences again...
Ie. when he says "However, without using margin, Interactive Brokers will stop me from sending out more than 10 orders at \$10,000 each with a \$100,000 account."

And I say: then use 5k with each order (instead of the 10k), and by this you can have 20 orders (instead of the 10)... , b/c 20 * 5k = 100k.
IB watches just for this condition: user can use max. 100k of his cash acct. But he can even use 100 orders with each of size max \$1000 (for simplicities sake excluding commission).

Last edited: Sep 23, 2020
#16     Sep 23, 2020
7. ### mhparker

As it happens, I'm familiar with the strategy in question. So I'll let you do the re-reading. In particular, see the clause "Most days only 1 or 2 of the limit orders will get hit."

#17     Sep 23, 2020
8. ### thecoder

That argument is mathematically irrelevant, b/c the question is about allocating the available capital over 40 orders... Ie. 2.5k per order he could use and get the most fills, and as he says the most profit the more orders get hit. Of course the current condition would need to be changed so that more orders can get filled instead of the mere 1 or 2...

Last edited: Sep 23, 2020
#18     Sep 23, 2020
9. ### mhparker

Only if you assume that all the candidates have the same expectancy. In fact, the ones that fill nearer to the open have considerably higher expectancy than the ones that fill later in the day. So there's actually a mathematical advantage to taking fewer but larger positions, i.e., prioritizing the first 10 that reach their limit prices.

Furthermore, your solution assumes that it's likely for more than 10 to fill on a given day. If we assume (as the original post states) that it is rare to get more than 10 fills even with 40 orders in place, then clearly there's an advantage to using larger than 2.5% size per order.

Last edited: Sep 23, 2020
#19     Sep 23, 2020
10. ### thecoder

But it depends on the condition, ie. one can increase the fill rate by just changing the condition accordingly.
The algo then is simply: continue until all capital has been invested... This is AT 101

#20     Sep 23, 2020
ET IS FREE FOR TRADERS BECAUSE OF THE FINANCIAL SUPPORT FROM THESE SPONSORS: