
public event Action<Position> PositionNetVolumeChangeEvent;
This event is triggered each time the open volume of a position changes and passes the modified position as an argument to the handler.
Imagine a situation where the bot is trading a two-legged arbitrage, we already have the logic to open a position on one leg when a divergence is present, and now we need to use the PositionNetVolumeChangeEvent to implement the logic for balancing the position on the second leg.

1. Create a tab for the first instrument.
2. Subscribe to the event for changes in the open volume of the first leg.
3. Subscribe to the event of position opening in the first tab.
4. Create a tab for the second instrument.
5. In the event handler for the position opening of the first leg, determine the position's direction, and in the second tab, open a position in the opposite direction with the same volume.
6. In the PositionNetVolumeChangeEvent handler for the first tab, calculate the difference in the open volume between the positions of the tabs.
7. If the difference is zero, exit the method.
8. If the position in the first tab is long, then the second is short, so we add to the position.
9. Otherwise, we buy additional volume for the second tab.
If you have any difficulties or questions, please write to the support chat. Link