We noted in this ticket and this ticket that Alpaca's change of AccountID to purely numeric is causing issues, but this feels like a Moonshot talking to Alpaca issue.
I have 2 algos, 1 at IB and 1 at Alpaca. If the IB algo gets a "1" for a signal, but the account already has full positions, target_weights_to_positions()
and order_stubs_to_orders()
take care of not allowing another trade; which is expected.
But as you can see in Alpaca, it's still sending a 1 signal to buy more even though the account is full.
I have cleared this particular Alpaca account twice. If it receives 1's multiple days it will try to buy even beyond the ~2X margin at Alpaca.
If the summary is, this will be fixed in the 2.5 release, that's fine, but wanted to note this just in case it was a bug in Moonshot talking to Alpaca independent of the AccountID.