Add bot worker
This commit is contained in:
@@ -16,6 +16,7 @@ namespace Managing.Application.Bots.Base
|
||||
private readonly IAccountService _accountService;
|
||||
private readonly ILogger<TradingBot> _tradingBotLogger;
|
||||
private readonly ITradingService _tradingService;
|
||||
private readonly IBotService _botService;
|
||||
|
||||
public BotFactory(
|
||||
IExchangeService exchangeService,
|
||||
@@ -23,7 +24,8 @@ namespace Managing.Application.Bots.Base
|
||||
IMoneyManagementService moneyManagementService,
|
||||
IMessengerService messengerService,
|
||||
IAccountService accountService,
|
||||
ITradingService tradingService)
|
||||
ITradingService tradingService,
|
||||
IBotService botService)
|
||||
{
|
||||
_tradingBotLogger = tradingBotLogger;
|
||||
_exchangeService = exchangeService;
|
||||
@@ -31,11 +33,12 @@ namespace Managing.Application.Bots.Base
|
||||
_messengerService = messengerService;
|
||||
_accountService = accountService;
|
||||
_tradingService = tradingService;
|
||||
_botService = botService;
|
||||
}
|
||||
|
||||
IBot IBotFactory.CreateSimpleBot(string botName, Workflow workflow)
|
||||
{
|
||||
return new SimpleBot(botName, _tradingBotLogger, workflow);
|
||||
return new SimpleBot(botName, _tradingBotLogger, workflow, _botService);
|
||||
}
|
||||
|
||||
ITradingBot IBotFactory.CreateScalpingBot(string accountName, MoneyManagement moneyManagement, string name, Ticker ticker, string scenario, Timeframe interval, bool isForWatchingOnly)
|
||||
@@ -52,6 +55,7 @@ namespace Managing.Application.Bots.Base
|
||||
interval,
|
||||
_accountService,
|
||||
_messengerService,
|
||||
_botService,
|
||||
isForWatchingOnly: isForWatchingOnly);
|
||||
}
|
||||
|
||||
@@ -69,6 +73,7 @@ namespace Managing.Application.Bots.Base
|
||||
interval,
|
||||
_accountService,
|
||||
_messengerService,
|
||||
_botService,
|
||||
true,
|
||||
isForWatchingOnly);
|
||||
}
|
||||
@@ -87,6 +92,7 @@ namespace Managing.Application.Bots.Base
|
||||
interval,
|
||||
_accountService,
|
||||
_messengerService,
|
||||
_botService,
|
||||
isForWatchingOnly: isForWatchingOnly);
|
||||
}
|
||||
|
||||
@@ -104,6 +110,7 @@ namespace Managing.Application.Bots.Base
|
||||
interval,
|
||||
_accountService,
|
||||
_messengerService,
|
||||
_botService,
|
||||
true,
|
||||
isForWatchingOnly);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user