CloseAllOrderToPosition

CloseAllOrderToPosition

The method CloseAllOrderToPosition also has two overloads. The methods are designed to withdraw all active orders from the exchange that belong to a single position.

public void CloseAllOrderToPosition(Position position, string signalType)

1. position – the position whose orders need to be withdrawn;

2. signalType – the type of signal for closing;

Imagine a situation where we need to withdraw orders for those positions that have not had a single trade.

We pass only positions with the state PositionStateType.Opening to the CloseAllOrderToPosition method.

public void CloseAllOrderToPosition(Position position)

This version accepts only the position from which all orders need to be withdrawn.

If you have any difficulties or questions, please write to the support chat. Link