Do not stop bot if position open
This commit is contained in:
@@ -121,7 +121,7 @@ namespace Managing.Application.Trading.Handlers
|
||||
request.Date,
|
||||
TradeStatus.Requested);
|
||||
|
||||
position.Status = IsOpenTradeHandled(position.Open.Status, account.Exchange)
|
||||
position.Status = IsOpenTradeHandled(position.Open.Status)
|
||||
? position.Status
|
||||
: PositionStatus.Rejected;
|
||||
|
||||
@@ -133,10 +133,10 @@ namespace Managing.Application.Trading.Handlers
|
||||
return position;
|
||||
}
|
||||
|
||||
private static bool IsOpenTradeHandled(TradeStatus tradeStatus, TradingExchanges exchange)
|
||||
private static bool IsOpenTradeHandled(TradeStatus tradeStatus)
|
||||
{
|
||||
return tradeStatus == TradeStatus.Filled
|
||||
|| (exchange == TradingExchanges.Evm && tradeStatus == TradeStatus.Requested);
|
||||
|| tradeStatus == TradeStatus.Requested;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user