From 362ca3cb6205080d1fea8561e5626b744dd4fc54 Mon Sep 17 00:00:00 2001 From: Romazes Date: Wed, 4 Sep 2024 23:03:20 +0300 Subject: [PATCH] refactor: get GroupCached Order use Lean extension --- .../InteractiveBrokersBrokerage.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/QuantConnect.InteractiveBrokersBrokerage/InteractiveBrokersBrokerage.cs b/QuantConnect.InteractiveBrokersBrokerage/InteractiveBrokersBrokerage.cs index 1102e44..72ae609 100644 --- a/QuantConnect.InteractiveBrokersBrokerage/InteractiveBrokersBrokerage.cs +++ b/QuantConnect.InteractiveBrokersBrokerage/InteractiveBrokersBrokerage.cs @@ -1343,13 +1343,10 @@ private void Initialize( /// The exchange to send the order to, defaults to "Smart" to use IB's smart routing private void IBPlaceOrder(Order order, bool needsNewId, string exchange = null) { - if (!order.TryGetGroupOrders(_groupOrderCacheManager.TryGetOrder, out var orders)) + if (!_groupOrderCacheManager.TryGetGroupCachedOrders(order, out var orders)) { - // some order of the group is missing but cache the new one - _groupOrderCacheManager.CacheOrder(order); return; } - _groupOrderCacheManager.RemoveCachedOrders(orders); // MOO/MOC require directed option orders. // We resolve non-equity markets in the `CreateContract` method.