From e7cf0dddd076eec55aa96bc923451de14eb94d68 Mon Sep 17 00:00:00 2001 From: Viacheslav Demydiuk Date: Sun, 16 Jun 2024 13:27:00 +0300 Subject: [PATCH] Updated MtApi5 --- MtApi5/MtApi5Client.cs | 8 +-- MtApi5Installer/MtApi5Installer.wixproj | 43 ++++++------- MtApi5Installer/Product.wxs | 84 ++++++++++--------------- 3 files changed, 53 insertions(+), 82 deletions(-) diff --git a/MtApi5/MtApi5Client.cs b/MtApi5/MtApi5Client.cs index 725ce9ec..e0bbfb3a 100755 --- a/MtApi5/MtApi5Client.cs +++ b/MtApi5/MtApi5Client.cs @@ -19,9 +19,6 @@ namespace MtApi5 #endregion - private const char ParamSeparator = ';'; - private const string LogProfileName = "MtApi5Client"; - public delegate void QuoteHandler(object sender, string symbol, double bid, double ask); @@ -1776,7 +1773,6 @@ namespace MtApi5 Dictionary cmdParams = new() { { "ChartId", chartId }, { "SubWindow", subWindow }, { "Time", Mt5TimeConverter.ConvertToMtTime(time) }, { "Price", price } }; - Dictionary XY = []; var response = SendCommand>>(ExecutorHandle, Mt5CommandType.ChartTimePriceToXY, cmdParams); if (response != null && response.Result != null && response.Result.TryGetValue("X", out x) @@ -2247,9 +2243,9 @@ namespace MtApi5 public bool ObjectCreate(long chartId, string name, ENUM_OBJECT type, int nwin, DateTime time, double price, List>? listOfCoordinates = null) { //Count the additional coordinates - int iAdditionalCoordinates = (listOfCoordinates != null) ? listOfCoordinates.Count() : 0; + int iAdditionalCoordinates = (listOfCoordinates != null) ? listOfCoordinates.Count : 0; if(iAdditionalCoordinates > 29) - throw new ArgumentOutOfRangeException("listOfCoordinates", "The maximum amount of coordinates in 30."); + throw new ArgumentOutOfRangeException(nameof(listOfCoordinates), "The maximum amount of coordinates in 30."); Dictionary cmdParams = new() { { "ChartId", chartId }, { "Name", name ?? string.Empty }, { "Type", (int)type }, { "Nwin", nwin } }; diff --git a/MtApi5Installer/MtApi5Installer.wixproj b/MtApi5Installer/MtApi5Installer.wixproj index dcab22f0..0ac0063c 100755 --- a/MtApi5Installer/MtApi5Installer.wixproj +++ b/MtApi5Installer/MtApi5Installer.wixproj @@ -1,25 +1,15 @@ - - + - Debug - x86 3.6 - {a9ed070f-ab4d-4380-9dde-5d931ac71333} - 2.0 MtApi5Installer_$(Platform) - Package - $(MSBuildExtensionsPath32)\Microsoft\WiX\v3.x\Wix.targets - $(MSBuildExtensionsPath)\Microsoft\WiX\v3.x\Wix.targets true ..\build\installers\$(Configuration)\ - obj\$(Configuration)\ Debug ..\build\installers\$(Configuration)\ - obj\$(Configuration)\ Debug @@ -31,21 +21,24 @@ obj\$(Platform)\$(Configuration)\ - + - - $(WixExtDir)\WixUIExtension.dll - WixUIExtension - + + MT5Connector + {cb6d4a3e-2f2e-4c67-929d-3c2a8fd1c556} + True + True + Binaries;Content;Satellites + INSTALLFOLDER + + + MtApi5 + {ac8b5010-da75-477e-9ca5-547c649e12d8} + True + True + Binaries;Content;Satellites + INSTALLFOLDER + - - \ No newline at end of file diff --git a/MtApi5Installer/Product.wxs b/MtApi5Installer/Product.wxs index 10a1a326..d04d45b1 100755 --- a/MtApi5Installer/Product.wxs +++ b/MtApi5Installer/Product.wxs @@ -1,28 +1,21 @@ - - + - - + + - - + - + - - + + @@ -30,90 +23,79 @@ - + - + - INSTALLFOLDER - - + + + - - + - + - - + + - + - + - - + - + - - + + - + - + - + - - - + + + - - - - + + + + - +