Hi everyone!

I'm trying to create a custom fill model for market orders where the quantity filled is equal to the current bar's volume, if the order isn't filled, it should throw out the partially filled status.

However, for some reason, the order is getting filled 2 times (with the current bar's volume) before moving onto the next bar. The same issue occurred with the code that @Jared Broad posted in the link attached to this thread.