diff --git a/MtApi/MtOrder.cs b/MtApi/MtOrder.cs index 092c1ae5..a9854b7a 100644 --- a/MtApi/MtOrder.cs +++ b/MtApi/MtOrder.cs @@ -18,6 +18,8 @@ namespace MtApi public int MagicNumber { get; set; } public double Swap { get; set; } public int MtExpiration { get; set; } + public double TakeProfit { get; set; } + public double StopLoss { get; set; } public DateTime OpenTime { diff --git a/MtApi/Properties/AssemblyInfo.cs b/MtApi/Properties/AssemblyInfo.cs index ed85eec3..42f0fdf8 100755 --- a/MtApi/Properties/AssemblyInfo.cs +++ b/MtApi/Properties/AssemblyInfo.cs @@ -32,5 +32,5 @@ using System.Runtime.InteropServices; // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("1.0.27.0")] -[assembly: AssemblyFileVersion("1.0.27.0")] +[assembly: AssemblyVersion("1.0.28.0")] +[assembly: AssemblyFileVersion("1.0.28.0")] diff --git a/MtApiInstaller/Product.wxs b/MtApiInstaller/Product.wxs index 2c9dc2d0..5a8780b6 100755 --- a/MtApiInstaller/Product.wxs +++ b/MtApiInstaller/Product.wxs @@ -1,7 +1,7 @@ - + diff --git a/TestClients/TestApiClientUI/Form1.Designer.cs b/TestClients/TestApiClientUI/Form1.Designer.cs index a2806c10..28f5c1a1 100644 --- a/TestClients/TestApiClientUI/Form1.Designer.cs +++ b/TestClients/TestApiClientUI/Form1.Designer.cs @@ -129,8 +129,8 @@ this.button14 = new System.Windows.Forms.Button(); this.button13 = new System.Windows.Forms.Button(); this.tabPage7 = new System.Windows.Forms.TabPage(); - this.iCustomBtn = new System.Windows.Forms.Button(); this.button23 = new System.Windows.Forms.Button(); + this.iCustomBtn = new System.Windows.Forms.Button(); this.groupBox1.SuspendLayout(); this.statusStrip1.SuspendLayout(); this.groupBox2.SuspendLayout(); @@ -282,6 +282,7 @@ | System.Windows.Forms.AnchorStyles.Right))); this.listBoxEventLog.ContextMenuStrip = this.contextMenuStrip1; this.listBoxEventLog.FormattingEnabled = true; + this.listBoxEventLog.HorizontalScrollbar = true; this.listBoxEventLog.Location = new System.Drawing.Point(12, 556); this.listBoxEventLog.Name = "listBoxEventLog"; this.listBoxEventLog.Size = new System.Drawing.Size(690, 95); @@ -1245,16 +1246,6 @@ this.tabPage7.Text = "Technical Indicators"; this.tabPage7.UseVisualStyleBackColor = true; // - // iCustomBtn - // - this.iCustomBtn.Location = new System.Drawing.Point(6, 6); - this.iCustomBtn.Name = "iCustomBtn"; - this.iCustomBtn.Size = new System.Drawing.Size(107, 23); - this.iCustomBtn.TabIndex = 15; - this.iCustomBtn.Text = "iCustom (ZigZag)"; - this.iCustomBtn.UseVisualStyleBackColor = true; - this.iCustomBtn.Click += new System.EventHandler(this.iCustomBtn_Click); - // // button23 // this.button23.Location = new System.Drawing.Point(6, 35); @@ -1265,6 +1256,16 @@ this.button23.UseVisualStyleBackColor = true; this.button23.Click += new System.EventHandler(this.button23_Click); // + // iCustomBtn + // + this.iCustomBtn.Location = new System.Drawing.Point(6, 6); + this.iCustomBtn.Name = "iCustomBtn"; + this.iCustomBtn.Size = new System.Drawing.Size(107, 23); + this.iCustomBtn.TabIndex = 15; + this.iCustomBtn.Text = "iCustom (ZigZag)"; + this.iCustomBtn.UseVisualStyleBackColor = true; + this.iCustomBtn.Click += new System.EventHandler(this.iCustomBtn_Click); + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); diff --git a/TestClients/TestApiClientUI/Form1.cs b/TestClients/TestApiClientUI/Form1.cs index 80e2d995..dc5817c7 100644 --- a/TestClients/TestApiClientUI/Form1.cs +++ b/TestClients/TestApiClientUI/Form1.cs @@ -871,8 +871,8 @@ namespace TestApiClientUI { var result = string.Format( - "Order: Ticket = {0}, Symbol = {1}, Operation = {2}, OpenPrice = {3}, ClosePrice = {4}, Lots = {5}, Profit = {6}, Comment = {7}, Commission = {8}, MagicNumber = {9}, OpenTime = {10}, CloseTime = {11}, Swap = {12}, Expiration = {13}", - order.Ticket, order.Symbol, order.Operation, order.OpenPrice, order.ClosePrice, order.Lots, order.Profit, order.Comment, order.Commission, order.MagicNumber, order.OpenTime, order.CloseTime, order.Swap, order.Expiration); + "Order: Ticket = {0}, Symbol = {1}, Operation = {2}, OpenPrice = {3}, ClosePrice = {4}, Lots = {5}, Profit = {6}, Comment = {7}, Commission = {8}, MagicNumber = {9}, OpenTime = {10}, CloseTime = {11}, Swap = {12}, Expiration = {13}, TakeProfit = {14}, StopLoss = {15}", + order.Ticket, order.Symbol, order.Operation, order.OpenPrice, order.ClosePrice, order.Lots, order.Profit, order.Comment, order.Commission, order.MagicNumber, order.OpenTime, order.CloseTime, order.Swap, order.Expiration, order.TakeProfit, order.StopLoss); AddToLog(result); } } @@ -891,8 +891,8 @@ namespace TestApiClientUI { var result = string.Format( - "Order: Ticket = {0}, Symbol = {1}, Operation = {2}, OpenPrice = {3}, ClosePrice = {4}, Lots = {5}, Profit = {6}, Comment = {7}, Commission = {8}, MagicNumber = {9}, OpenTime = {10}, CloseTime = {11}, Swap = {12}, Expiration = {13}", - order.Ticket, order.Symbol, order.Operation, order.OpenPrice, order.ClosePrice, order.Lots, order.Profit, order.Comment, order.Commission, order.MagicNumber, order.OpenTime, order.CloseTime, order.Swap, order.Expiration); + "Order: Ticket = {0}, Symbol = {1}, Operation = {2}, OpenPrice = {3}, ClosePrice = {4}, Lots = {5}, Profit = {6}, Comment = {7}, Commission = {8}, MagicNumber = {9}, OpenTime = {10}, CloseTime = {11}, Swap = {12}, Expiration = {13}, TakeProfit = {14}, StopLoss = {15}", + order.Ticket, order.Symbol, order.Operation, order.OpenPrice, order.ClosePrice, order.Lots, order.Profit, order.Comment, order.Commission, order.MagicNumber, order.OpenTime, order.CloseTime, order.Swap, order.Expiration, order.TakeProfit, order.StopLoss); AddToLog(result); } } diff --git a/mq4/MtApi.ex4 b/mq4/MtApi.ex4 index 551153db..d69c748b 100755 Binary files a/mq4/MtApi.ex4 and b/mq4/MtApi.ex4 differ diff --git a/mq4/MtApi.mq4 b/mq4/MtApi.mq4 index 6b956096..d18d43f2 100755 --- a/mq4/MtApi.mq4 +++ b/mq4/MtApi.mq4 @@ -1,6 +1,6 @@ #property copyright "Vyacheslav Demidyuk" #property link "http://mtapi4.net/" -#property version "1.2" +#property version "1.3" #property description "MtApi connection expert" #include @@ -145,6 +145,8 @@ public: datetime getCloseTime() { return _closeTime; } double getSwap() { return _swap; } datetime getExpiration() { return _expiration; } + double getTakeProfit() { return _takeProfit; } + double getStopLoss() { return _stopLoss; } static bool isLong(int operation) { @@ -172,7 +174,8 @@ public: jo.put("MtCloseTime", new JSONNumber(_closeTime)); jo.put("Swap", new JSONNumber(_swap)); jo.put("MtExpiration", new JSONNumber(_expiration)); - + jo.put("TakeProfit", new JSONNumber(_takeProfit)); + jo.put("StopLoss", new JSONNumber(_stopLoss)); return jo; } @@ -196,6 +199,8 @@ public: order._closeTime = OrderCloseTime(); order._swap = OrderSwap(); order._expiration = OrderExpiration(); + order._takeProfit = OrderTakeProfit(); + order._stopLoss = OrderStopLoss(); } return order; } @@ -215,6 +220,8 @@ private: datetime _closeTime; double _swap; datetime _expiration; + double _takeProfit; + double _stopLoss; }; int preinit()