
public event Action<Position> PositionOpeningSuccesEvent;
This event signals the successful opening of a position and passes this very position as an argument to the handlers. It's important to remember that the event is triggered immediately after the position state changes from Opening to Open, which happens upon receiving the first trade for the position's opening order. As a result, there might be a scenario where the opening order is not fully executed, but the position will be in a PositionStateType.Open state. Such behavior should be taken into account when creating a trading bot.
Using the PositionOpeningSuccessEvent ideally involves setting stop-loss and take-profit for the position. Let's implement this in a code example.

1. Create a parameter for the size of the stop.
2. Create a parameter for the size of the profit.
3. Create a parameter for slippage.
4. Subscribe to the PositionOpeningSuccessEvent.
5. Initialize the parameters.
6. If a long position is opened, the price for the stop will be a set percentage below the entry point, and for profit, it will be above.
7. For a short position, it is the reverse.
8. Setting the stop and profit for the position.
If you have any difficulties or questions, please write to the support chat. Link