For a reversal from +1 to -1, does the cost calculation multiply by abs(new_position - old_position), so it charges two units rather than one? I would add three small fixtures: flat to long, long to flat, and long to short, each with a fixed bid/ask and zero slippage. The reversal should cost exactly the same as closing the long and opening the short at that quote. Publishing that check alongside the script would make the position-change cost convention much easier to audit.