Update the position count and initiator
This commit is contained in:
@@ -713,7 +713,8 @@ public class TradingBotBase : ITradingBot
|
||||
Config.BotTradingBalance,
|
||||
Config.IsForBacktest,
|
||||
lastPrice,
|
||||
signalIdentifier: signal.Identifier);
|
||||
signalIdentifier: signal.Identifier,
|
||||
initiatorIdentifier: Identifier);
|
||||
|
||||
var position = await ServiceScopeHelpers
|
||||
.WithScopedServices<IExchangeService, IAccountService, ITradingService, Position>(
|
||||
@@ -978,7 +979,7 @@ public class TradingBotBase : ITradingBot
|
||||
_scopeFactory, async (exchangeService, accountService, tradingService) =>
|
||||
{
|
||||
closedPosition =
|
||||
await new ClosePositionCommandHandler(exchangeService, accountService, tradingService)
|
||||
await new ClosePositionCommandHandler(exchangeService, accountService, tradingService, _scopeFactory)
|
||||
.Handle(command);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user