mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-07-27 18:47:55 +00:00
Fixed issue #8 (Missing StopLoss and TakeProfit properties in MtOrder)
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
||||
@@ -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")]
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
|
||||
<?define ProductName="MtApi" ?>
|
||||
<?define ProductVersion="1.0.27" ?>
|
||||
<?define ProductVersion="1.0.28" ?>
|
||||
<?define Manufacturer="DW"?>
|
||||
<?define ProductPath="..\build\products\$(var.Configuration)\"?>
|
||||
|
||||
|
||||
+12
-11
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Binary file not shown.
+9
-2
@@ -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 <WinUser32.mqh>
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user