Bracket order fails to execute exit orders


I have found this problem twice already in paper trading. It happens rarely, maybe once a month, out of thousands of correctly executed bracket orders. The problem here is not a pattern-day trading restriction, the paper account has > $25K.

The general situation is as follows:

  1. Bracket order to enter a long position executes successfully. It buys 10 shares at $50 each
  2. Exit orders are successfully submitted:
    Take-profit order: sell 10 shares at $55 or more (limit order)
    Stop-loss order: sell 10 shares immediately if the price falls below $45 (market order)

So far, so good. But then,

  1. the price hits $55 and the take-profit order triggers. However, it only fills partially, and sells 6 shares at $55. I am left with 4 shares.
  2. This is the big problem: the price fluctuates throughout the day, even dropping well below $45. However, Neither the Take-profit nor the Stop-loss orders trigger, and the 4 remaining shares are not sold.

I can only speculate as to what the problem is. The documentation on bracket orders (Understand Orders | Alpaca Docs) states that: “Importantly, only one of the two exit orders can be executed.” I wonder if restrictions around this condition are creating a bug: Maybe once the take-profit order (in my case) executes partially, the code prevents the stop-loss from ever triggering? That, of course, would be a mistake. And, regarding the take-profit, maybe it would still sell the other 4 shares if the price kept rising? I don’t know if this happens, but given that the problem only presents sporadically, I wonder if the bulk of the times when there is a partial execution of an exit order this order fully fills shortly afterward, and the rare cases I have seen are when the price soon reverses direction and hence impedes the completion of the partially executed closing order?

Anyway, the last paragraph is only my guess. But the problem exists.

Thank you, and I really hope that this Topic doesn’t meet the fate of most support requests in this forum (i.e. complete disregard, neglect, or overlook)