PositionClosingSuccesEvent

PositionClosingSuccesEvent
public event Action<Position> PositionClosingSuccesEvent;

The event PositionClosingSuccessEvent notifies the robot of a successful position closure. It passes the object of the position that has been closed as a message.

Typically, the triggering of the event means that everything is going according to plan. Positions are being closed correctly and there are no outstanding issues. Any logic can be implemented in the handler.

Suppose we decided to keep only the last 10 closed positions and delete the rest from the system.

1. Subscribe to the PositionClosingSuccessEvent event.

2. If the total number of closed positions exceeds 10, remove the very first one from the log.

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