Postpone TradeCheckTimer on new trade received

This commit is contained in:
Archi
2023-04-14 11:47:05 +02:00
parent 45b3183ed6
commit fc8eb6d1d9

View File

@@ -3232,6 +3232,10 @@ public sealed class Bot : IAsyncDisposable, IDisposable {
break;
case UserNotificationsCallback.EUserNotification.Trading when newNotification:
if ((TradeCheckTimer != null) && (BotConfig.TradeCheckPeriod > 0)) {
TradeCheckTimer.Change(TimeSpan.FromMinutes(BotConfig.TradeCheckPeriod), TimeSpan.FromMinutes(BotConfig.TradeCheckPeriod));
}
Utilities.InBackground(Trading.OnNewTrade);
break;