Reverse a position (close + open opposite side)
Closes the current position and opens a new position in the opposite direction with the same quantity.
Executed as two steps: (1) close the existing position, (2) open a new market order on the other side.
Protective brackets: pass take_profit_ticks / stop_loss_ticks (optional) to re-arm TP/SL on the NEW position. The engine computes the prices from the open leg’s actual fill price, same as the order ticket’s tick offsets — the reversed position is protected from the moment it opens. Omitting them opens the reversed position without brackets.
If closing the position causes the profit target to be met (account goes flat and target reached), the open leg is skipped and the account is marked as passed.
Returns a command acceptance. Requires x-idempotency-key header.