
public event Action<DateTime> ServerTimeChangeEvent;
The ServerTimeChangeEvent event signals a change in the exchange time in the connector, passing an instance of the DateTime structure. Typically, the event is triggered after the server receives an anonymized trade and updates the data in the order book, so this information should be taken into account if your logic needs to trigger periodically with millisecond precision. The event will be useful if the strategy's logic needs to be tied to the exchange's time. For example, the exchange operates in one timezone, and you are in another.
Implement the following logic using this event: the robot buys conditionally every 6 minutes from 12 PM to 1 PM exchange time.

1. Set a handler for the ServerTimeChangeEvent.
2. Create a DateTime variable to store the time of the last purchase.
3. If the current hour on the exchange is 12, and it has been 6 minutes or more since the last purchase, open a long position at the market price and set the time of the last purchase.
4. If the current exchange time is past 9 PM, and the robot has open positions, close all positions at the market price. Don't forget to reset the time of the last purchase.
If you have any difficulties or questions, please write to the support chat. Link