Managing number of positions

How does a developer manage the number of stock buy signals to send? For example, suppose the portfolio currently owns 9 stocks and there is buying power for 1 more. 10 more signals are provided to buy at limit. 5 of those hit their limit at the open. Which one of the 5 will C2 buy? Is the developer required to send those limit orders as an OCA group so that the other orders are cancelled once the first one hits?

If your Model Account at C2 only has a limited amount of available Buy Power, and you issue a slew of limit orders - not all of which can be filled under available Buy Power - then C2 will essentially recognize fills in random order and then cancel the rest of the trades when no more Buy Power exists. Of course, this random selection of fills is unlikely to match the same random selection of fills that will occur in subscriber accounts, which will lead to all sorts of unpleasant effects for anyone following your system: positions taken, then closed; postions opened late via synchronization; etc.

So the best advice is: Don’t do it. Only issue as many orders as your Model Account has Buy Power for.