private void ReplaceSLTPOrders(OrderData orderData, AccountSymbolKey positionKey) { CancelUnfilledOrdersForPosition(positionKey); PlaceSLTPOrders(orderData); }
/// <summary> /// removes TakeProfit and StopLoss target orders only /// </summary> private void CancelUnfilledOrdersForPosition(AccountSymbolKey positionKey) { _orders[positionKey]?.RemoveAll(r => r.PositionKey?.Equals(positionKey) ?? false); }