diff --git a/Algorithm.CSharp/AddRemoveOptionUniverseRegressionAlgorithm.cs b/Algorithm.CSharp/AddRemoveOptionUniverseRegressionAlgorithm.cs index 95bfe67e8..fdf250fad 100644 --- a/Algorithm.CSharp/AddRemoveOptionUniverseRegressionAlgorithm.cs +++ b/Algorithm.CSharp/AddRemoveOptionUniverseRegressionAlgorithm.cs @@ -79,19 +79,19 @@ namespace QuantConnect.Algorithm.CSharp // things like manually added, auto added, internal, and any other boolean state we need to track against a single security) throw new Exception("The underlying equity data should NEVER be removed in this algorithm because it was manually added"); } - if (_expectedSecurities.AreDifferent(LinqExtensions.ToHashSet(Securities.Keys))) + if (_expectedSecurities.AreDifferent(Securities.Keys.ToHashSet())) { var expected = string.Join(Environment.NewLine, _expectedSecurities.OrderBy(s => s.ToString())); var actual = string.Join(Environment.NewLine, Securities.Keys.OrderBy(s => s.ToString())); throw new Exception($"{Time}:: Detected differences in expected and actual securities{Environment.NewLine}Expected:{Environment.NewLine}{expected}{Environment.NewLine}Actual:{Environment.NewLine}{actual}"); } - if (_expectedUniverses.AreDifferent(LinqExtensions.ToHashSet(UniverseManager.Keys))) + if (_expectedUniverses.AreDifferent(Securities.Keys.ToHashSet())) { var expected = string.Join(Environment.NewLine, _expectedUniverses.OrderBy(s => s.ToString())); var actual = string.Join(Environment.NewLine, UniverseManager.Keys.OrderBy(s => s.ToString())); throw new Exception($"{Time}:: Detected differences in expected and actual universes{Environment.NewLine}Expected:{Environment.NewLine}{expected}{Environment.NewLine}Actual:{Environment.NewLine}{actual}"); } - if (_expectedData.AreDifferent(LinqExtensions.ToHashSet(data.Keys))) + if (_expectedData.AreDifferent(Securities.Keys.ToHashSet())) { var expected = string.Join(Environment.NewLine, _expectedData.OrderBy(s => s.ToString())); var actual = string.Join(Environment.NewLine, data.Keys.OrderBy(s => s.ToString())); @@ -183,7 +183,7 @@ namespace QuantConnect.Algorithm.CSharp if (changes.RemovedSecurities .Where(x => x.Symbol.SecurityType == SecurityType.Option) .ToHashSet(s => s.Symbol) - .AreDifferent(LinqExtensions.ToHashSet(_expectedContracts))) + .AreDifferent(_expectedContracts.ToHashSet())) { throw new Exception("Expected removed securities to equal expected contracts added"); } diff --git a/Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj b/Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj index b1be8b082..3133aad38 100644 --- a/Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj +++ b/Algorithm.CSharp/QuantConnect.Algorithm.CSharp.csproj @@ -63,10 +63,6 @@ - - - - diff --git a/Algorithm.Framework/QuantConnect.Algorithm.Framework.csproj b/Algorithm.Framework/QuantConnect.Algorithm.Framework.csproj index 96ef65f89..956b156b6 100644 --- a/Algorithm.Framework/QuantConnect.Algorithm.Framework.csproj +++ b/Algorithm.Framework/QuantConnect.Algorithm.Framework.csproj @@ -54,10 +54,6 @@ - - - - diff --git a/AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj b/AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj index 80fe92891..e07d98d9e 100644 --- a/AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj +++ b/AlgorithmFactory/QuantConnect.AlgorithmFactory.csproj @@ -48,10 +48,6 @@ - - - - diff --git a/Api/QuantConnect.Api.csproj b/Api/QuantConnect.Api.csproj index 8dcec3437..de2ee7321 100644 --- a/Api/QuantConnect.Api.csproj +++ b/Api/QuantConnect.Api.csproj @@ -58,12 +58,6 @@ - - - - - - diff --git a/Brokerages/InteractiveBrokers/QuantConnect.IBAutomater.dll b/Brokerages/InteractiveBrokers/QuantConnect.IBAutomater.dll new file mode 100644 index 000000000..5032bbd5a Binary files /dev/null and b/Brokerages/InteractiveBrokers/QuantConnect.IBAutomater.dll differ diff --git a/Brokerages/QuantConnect.Brokerages.csproj b/Brokerages/QuantConnect.Brokerages.csproj index b8260c5e5..a15401fba 100644 --- a/Brokerages/QuantConnect.Brokerages.csproj +++ b/Brokerages/QuantConnect.Brokerages.csproj @@ -52,15 +52,13 @@ InteractiveBrokers\CSharpAPI.dll + + InteractiveBrokers\QuantConnect.IBAutomater.dll + Fxcm\QuantConnect.Fxcm.dll False - - - - - diff --git a/Common/Brokerages/DowngradeErrorCodeToWarningBrokerageMessageHandler.cs b/Common/Brokerages/DowngradeErrorCodeToWarningBrokerageMessageHandler.cs index e999d4bb1..5632dd0cf 100644 --- a/Common/Brokerages/DowngradeErrorCodeToWarningBrokerageMessageHandler.cs +++ b/Common/Brokerages/DowngradeErrorCodeToWarningBrokerageMessageHandler.cs @@ -13,8 +13,8 @@ * limitations under the License. */ +using System.Linq; using System.Collections.Generic; -using QuantConnect.Util; namespace QuantConnect.Brokerages { diff --git a/Common/Data/Market/FuturesChain.cs b/Common/Data/Market/FuturesChain.cs index f03d7d9bc..14f10940b 100644 --- a/Common/Data/Market/FuturesChain.cs +++ b/Common/Data/Market/FuturesChain.cs @@ -18,7 +18,6 @@ using System.Collections; using System.Collections.Generic; using System.Linq; using QuantConnect.Securities.Future; -using QuantConnect.Util; namespace QuantConnect.Data.Market { diff --git a/Common/QuantConnect.csproj b/Common/QuantConnect.csproj index 6c527d470..790b43cac 100644 --- a/Common/QuantConnect.csproj +++ b/Common/QuantConnect.csproj @@ -100,24 +100,6 @@ - - - - - - - - - - - - - - - - - - diff --git a/Common/Securities/Option/StrategyMatcher/OptionPositionCollection.cs b/Common/Securities/Option/StrategyMatcher/OptionPositionCollection.cs index 0dd0efbdc..d33fcd45c 100644 --- a/Common/Securities/Option/StrategyMatcher/OptionPositionCollection.cs +++ b/Common/Securities/Option/StrategyMatcher/OptionPositionCollection.cs @@ -204,7 +204,7 @@ namespace QuantConnect.Securities.Option.StrategyMatcher /// /// public OptionPosition GetUnderlyingPosition() - => LinqExtensions.GetValueOrDefault(_positions, Underlying, new OptionPosition(Underlying, 0)); + => _positions.GetValueOrDefault(Underlying, new OptionPosition(Underlying, 0)); /// /// Creates a new from the specified enumerable of diff --git a/Common/Util/LinqExtensions.cs b/Common/Util/LinqExtensions.cs index faf3efc7c..933a5d4b4 100644 --- a/Common/Util/LinqExtensions.cs +++ b/Common/Util/LinqExtensions.cs @@ -62,17 +62,6 @@ namespace QuantConnect.Util return new ReadOnlyDictionary(enumerable.ToDictionary()); } - /// - /// Creates a new from the elements in the specified enumerable - /// - /// The item type in the hash set - /// The items to be placed into the enumerable - /// A new containing the items in the enumerable - public static HashSet ToHashSet(this IEnumerable enumerable) - { - return new HashSet(enumerable); - } - /// /// Creates a new from the elements in the specified enumerable /// @@ -374,21 +363,6 @@ namespace QuantConnect.Util } } - /// - /// Gets the value associated with the specified key or provided default value if key is not found. - /// - /// The key type - /// The value type - /// The dictionary instance - /// Lookup key - /// Default value - /// Value associated with the specified key or default value - public static V GetValueOrDefault(this IDictionary dictionary, K key, V defaultValue = default(V)) - { - V obj; - return dictionary.TryGetValue(key, out obj) ? obj : defaultValue; - } - /// /// Performs an action for each element in collection source /// diff --git a/Compression/QuantConnect.Compression.csproj b/Compression/QuantConnect.Compression.csproj index fe14e2872..64769b9a0 100644 --- a/Compression/QuantConnect.Compression.csproj +++ b/Compression/QuantConnect.Compression.csproj @@ -37,11 +37,6 @@ - - - - - diff --git a/Configuration/QuantConnect.Configuration.csproj b/Configuration/QuantConnect.Configuration.csproj index b681fe53c..acb8d60a7 100644 --- a/Configuration/QuantConnect.Configuration.csproj +++ b/Configuration/QuantConnect.Configuration.csproj @@ -38,10 +38,6 @@ - - - - diff --git a/Engine/QuantConnect.Lean.Engine.csproj b/Engine/QuantConnect.Lean.Engine.csproj index bde8ce2b6..d9d1526c2 100644 --- a/Engine/QuantConnect.Lean.Engine.csproj +++ b/Engine/QuantConnect.Lean.Engine.csproj @@ -108,13 +108,6 @@ - - - - - - - diff --git a/Indicators/QuantConnect.Indicators.csproj b/Indicators/QuantConnect.Indicators.csproj index 9812b7809..20265b2ca 100644 --- a/Indicators/QuantConnect.Indicators.csproj +++ b/Indicators/QuantConnect.Indicators.csproj @@ -49,10 +49,6 @@ runtime; build; native; contentfiles; analyzers; buildtransitive - - - - diff --git a/Launcher/QuantConnect.Lean.Launcher.csproj b/Launcher/QuantConnect.Lean.Launcher.csproj index becf2fb57..853d21bcd 100644 --- a/Launcher/QuantConnect.Lean.Launcher.csproj +++ b/Launcher/QuantConnect.Lean.Launcher.csproj @@ -45,11 +45,6 @@ - - - - - diff --git a/Logging/QuantConnect.Logging.csproj b/Logging/QuantConnect.Logging.csproj index a98cb07c7..425cc4100 100644 --- a/Logging/QuantConnect.Logging.csproj +++ b/Logging/QuantConnect.Logging.csproj @@ -57,10 +57,6 @@ - - - - diff --git a/Messaging/QuantConnect.Messaging.csproj b/Messaging/QuantConnect.Messaging.csproj index b26bc69e1..ab3dd464f 100644 --- a/Messaging/QuantConnect.Messaging.csproj +++ b/Messaging/QuantConnect.Messaging.csproj @@ -40,12 +40,6 @@ - - - - - - diff --git a/Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj b/Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj index e2ad807e6..ad13ddee6 100644 --- a/Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj +++ b/Optimizer.Launcher/QuantConnect.Optimizer.Launcher.csproj @@ -38,11 +38,6 @@ - - - - - diff --git a/Optimizer/QuantConnect.Optimizer.csproj b/Optimizer/QuantConnect.Optimizer.csproj index 6cba57ab1..edae6dc1f 100644 --- a/Optimizer/QuantConnect.Optimizer.csproj +++ b/Optimizer/QuantConnect.Optimizer.csproj @@ -40,11 +40,6 @@ - - - - - diff --git a/Queues/QuantConnect.Queues.csproj b/Queues/QuantConnect.Queues.csproj index 138bc9774..1c0e5cd54 100644 --- a/Queues/QuantConnect.Queues.csproj +++ b/Queues/QuantConnect.Queues.csproj @@ -36,10 +36,6 @@ - - - - diff --git a/Tests/Common/Util/ConcurrentSetTests.cs b/Tests/Common/Util/ConcurrentSetTests.cs index 764c415e5..650ddefa7 100644 --- a/Tests/Common/Util/ConcurrentSetTests.cs +++ b/Tests/Common/Util/ConcurrentSetTests.cs @@ -15,6 +15,7 @@ using System; using System.Collections.Generic; +using System.Linq; using NUnit.Framework; using QuantConnect.Data.Consolidators; using QuantConnect.Data.Market; diff --git a/Tests/QuantConnect.Tests.csproj b/Tests/QuantConnect.Tests.csproj index 15434384c..11aa04e03 100644 --- a/Tests/QuantConnect.Tests.csproj +++ b/Tests/QuantConnect.Tests.csproj @@ -108,13 +108,6 @@ ..\Brokerages\Fxcm\QuantConnect.Fxcm.dll False - - - - - - - diff --git a/ToolBox/IDataProcessor.cs b/ToolBox/IDataProcessor.cs index 1f9ebefb7..4b3838db7 100644 --- a/ToolBox/IDataProcessor.cs +++ b/ToolBox/IDataProcessor.cs @@ -15,10 +15,10 @@ using System; using System.Collections.Generic; +using System.Linq; using QuantConnect.Data; using QuantConnect.Data.Consolidators; using QuantConnect.Data.Market; -using QuantConnect.Util; namespace QuantConnect.ToolBox { diff --git a/ToolBox/IQFeed/IQ/IQConnect.cs b/ToolBox/IQFeed/IQ/IQConnect.cs index 6235b1fe7..f9d915e57 100644 --- a/ToolBox/IQFeed/IQ/IQConnect.cs +++ b/ToolBox/IQFeed/IQ/IQConnect.cs @@ -15,7 +15,6 @@ */ using System.Diagnostics; -using Microsoft.Win32; using System.Threading; using QuantConnect.Configuration; @@ -41,29 +40,6 @@ namespace QuantConnect.ToolBox.IQFeed ); } - public string getPath() - { - var key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\DTN\\IQFeed"); - if (key == null) - { - // if it isn't in that location, it is possible the user is running and x64 OS. Check the windows virtualized registry location - key = Registry.LocalMachine.OpenSubKey("SOFTWARE\\Wow6432Node\\DTN\\IQFeed"); - } - string sLocation = null; - if (key != null) - { - sLocation = key.GetValue("EXEDIR", "").ToString(); - // close the key since we don't need it anymore - key.Close(); - // verify there is a \ on the end before we append the exe name - if (!(sLocation.EndsWith("\\") || sLocation.EndsWith("/"))) - { - sLocation += "\\"; - } - sLocation += "IQConnect.exe"; - } - return sLocation; - } public string getArguments(IQCredentials iqc) { var arguments = ""; diff --git a/ToolBox/PipeDataProcessor.cs b/ToolBox/PipeDataProcessor.cs index 59c1d192f..db2fa2272 100644 --- a/ToolBox/PipeDataProcessor.cs +++ b/ToolBox/PipeDataProcessor.cs @@ -14,8 +14,8 @@ */ using System.Collections.Generic; +using System.Linq; using QuantConnect.Data; -using QuantConnect.Util; namespace QuantConnect.ToolBox { diff --git a/ToolBox/QuantConnect.ToolBox.csproj b/ToolBox/QuantConnect.ToolBox.csproj index 80076187f..b7e4b45d4 100644 --- a/ToolBox/QuantConnect.ToolBox.csproj +++ b/ToolBox/QuantConnect.ToolBox.csproj @@ -103,11 +103,6 @@ ..\Brokerages\Fxcm\QuantConnect.Fxcm.dll - - - - -