Alpaca bug / rule on Day Trading (PDT) Protection

Sounds to me that the system is counting day trades differently when there are multiple long and short positions in a day. For example, buy AAPL 10 shares at $200 and then buy another 10 shares at $195, but only sell 10 shares in the same day. The remaining 10 shares sold in another day. It should only be one day trade in my understanding. It’s because the official defination of day trading is closing an open position in the same day. For this case, only the first 10 shares closed. However, it triggered the PDT Protection when trying to buy and sell AAPL in another day. Which means the first one is counted as two day trades.

Seems different brokers have different rules on day trading. I want to ask how many day trades are counted on Alpaca in following three cases.

  1. Buy AAPL 10 shares at $200, buy another 10 shares at $195, sell 10 shares in the same day.

  2. Buy AAPL 10 shares at $200, buy another 10 shares at $195, sell all 20 shares in one transaction in the same day.

  3. Buy AAPL 20 shares at $200 in one transaction, sell 10 shares first, and then sell another 10 shares at different prices in the same day.

1.1
2.1
3.2

i think this is how it reflects…

btw its a max of 3 trades before the rule kicks in

Officially the rule should only counts costing open positions in the same day. Which means it is 1) 1, 2) 2, 3) 1. I further tested those are correct. The question remaining is that opening multiple positions of a stock but not selling all shares in the same day. The general rule is matching earliest open positions up to the number of shares sold. (e.g. buy 10 at $10, buy 10 at $12, sell 8. The 8 shares should be matched to the first $10 open position and hence 1 day trade.). It seems not working like that?