For the purpose of research, I am attempting to force moonshot to trade in quantities of 100 and only ever hold 100 shares per stock.
Currently, I have been overwriting the orders["TotalQuantity"] column in order_stubs_to_orders but I've noticed that moonshot will make a trade 100 each tick it is given a buy or sell signal instead of holding its current position.
I am assuming signals_to_target_weights is validating my net liquid account value and saying "Hey, give me another X amount of that stock" and back in order_stubs_to_orders I changing X to 100. Thus creating a possibility for there to be multiple trades over multiple minutes until it hits the amount it thinks I should have.
Is there anyway to achieve the desired result of only ever having a max of 100 (long or short) shares per stock and always making 1 trade to open or close the position?
Thanks in advance!