
public event Action<Security> SecuritySubscribeEvent;
This event indicates the completion of the data connection procedure for a specific security. It passes a reference to an object of the Security class as an argument. This security is the one that the current tab instance is working with. In OsEngine, for each trading instrument used in tabs, there is a process of subscribing to data streams. Once this procedure is completed, the SecuritySubscribeEvent event is triggered. Consequently, the occurrence of this event can be expected in the following cases:
1. The user changed the instrument of the tab in the program interface;
2. A scheduled connection to the exchange server was made;
3. Reconnection as a result of a connection loss;
The event will be useful in situations where the algorithm gradually accumulates data. After reconnecting to the exchange, this data becomes outdated.

1. We subscribe to the SecuritySubscribeEvent.
2. In the handler for the event of receiving a new anonymous deal, we update the currentVolume variable.
3. Having received a message about the connection of the instrument, we understand that the data of the variable currentVolume has lost its relevance, so we reset the counter.
If you have any difficulties or questions, please write to the support chat. Link