diff --git a/QuantConnect.AlpacaBrokerage/AlpacaBrokerage.cs b/QuantConnect.AlpacaBrokerage/AlpacaBrokerage.cs index 9adfd0f..0a61106 100644 --- a/QuantConnect.AlpacaBrokerage/AlpacaBrokerage.cs +++ b/QuantConnect.AlpacaBrokerage/AlpacaBrokerage.cs @@ -342,7 +342,6 @@ public override bool PlaceOrder(Order order) return false; } - var result = false; try { _messageHandler.WithLockedStream(() => @@ -361,11 +360,6 @@ public override bool PlaceOrder(Order order) order.BrokerId.Add(response.OrderId.ToString()); OnOrderEvent(new OrderEvent(order, DateTime.UtcNow, OrderFee.Zero, $"{nameof(AlpacaBrokerage)} Order Event") { Status = Orders.OrderStatus.Submitted }); - result = response != null && response.OrderStatus != AlpacaMarket.OrderStatus.Rejected; - } - else - { - result = isPlaceCrossOrder.Value; } }); } @@ -373,8 +367,7 @@ public override bool PlaceOrder(Order order) { OnOrderEvent(new OrderEvent(order, DateTime.UtcNow, OrderFee.Zero, ex.Message) { Status = Orders.OrderStatus.Invalid }); } - - return result; + return true; } private void HandleTradeUpdate(ITradeUpdate obj)