Force Moonshot to trade in quantities of 100

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!

A technique to accomplish fixed position sizes is described in the usage guide. See the entire section on Position size constraints. This would work:

def limit_position_sizes(self, prices: pd.DataFrame):
    closes = prices.loc["Close"]
    max_quantities_for_longs = pd.DataFrame(100, index=closes.index, columns=closes.columns)
    max_quantities_for_shorts = -max_quantities_for_longs
    return max_quantities_for_longs, max_quantities_for_shorts