Compare commits

...
9 changed files with 74 additions and 22 deletions
+11 -3
View File
@@ -62,13 +62,21 @@ namespace MTApiService
} }
//init local pipe host //init local pipe host
var localUrl = CreateConnectionAddress(null, port, true); var localPipeUrl = CreateConnectionAddress(null, port, true);
var localServiceHost = CreateServiceHost(localUrl, true); var localPipeServiceHost = CreateServiceHost(localPipeUrl, true);
if (localPipeServiceHost != null)
{
_hosts.Add(localPipeServiceHost);
}
//init localhost
var localUrl = CreateConnectionAddress("localhost", port, false);
var localServiceHost = CreateServiceHost(localUrl, false);
if (localServiceHost != null) if (localServiceHost != null)
{ {
_hosts.Add(localServiceHost); _hosts.Add(localServiceHost);
} }
//init network hosts //init network hosts
var dnsHostName = Dns.GetHostName(); var dnsHostName = Dns.GetHostName();
var ips = Dns.GetHostEntry(dnsHostName); var ips = Dns.GetHostEntry(dnsHostName);
+2 -2
View File
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.26.0")] [assembly: AssemblyVersion("1.0.27.0")]
[assembly: AssemblyFileVersion("1.0.26.0")] [assembly: AssemblyFileVersion("1.0.27.0")]
+9
View File
@@ -2186,6 +2186,15 @@ namespace MtApi
#endregion #endregion
#region Backtesting functions
public void UnlockTicks()
{
SendCommand<object>(MtCommandType.UnlockTicks, null);
}
#endregion
#region Private Methods #region Private Methods
private MtClient Client private MtClient Client
{ {
+3 -1
View File
@@ -227,6 +227,8 @@
ObjectSet = 231, ObjectSet = 231,
ObjectSetFiboDescription = 232, ObjectSetFiboDescription = 232,
ObjectSetText = 233, ObjectSetText = 233,
ObjectType = 234 ObjectType = 234,
UnlockTicks = 235
} }
} }
+2 -2
View File
@@ -32,5 +32,5 @@ using System.Runtime.InteropServices;
// You can specify all the values or you can default the Build and Revision Numbers // You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below: // by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")] // [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.34.0")] [assembly: AssemblyVersion("1.0.35.0")]
[assembly: AssemblyFileVersion("1.0.34.0")] [assembly: AssemblyFileVersion("1.0.35.0")]
+41 -13
View File
@@ -197,9 +197,11 @@
this.button38 = new System.Windows.Forms.Button(); this.button38 = new System.Windows.Forms.Button();
this.button37 = new System.Windows.Forms.Button(); this.button37 = new System.Windows.Forms.Button();
this.tabPage10 = new System.Windows.Forms.TabPage(); this.tabPage10 = new System.Windows.Forms.TabPage();
this.button68 = new System.Windows.Forms.Button();
this.comboBox11 = new System.Windows.Forms.ComboBox(); this.comboBox11 = new System.Windows.Forms.ComboBox();
this.button4 = new System.Windows.Forms.Button(); this.button4 = new System.Windows.Forms.Button();
this.button68 = new System.Windows.Forms.Button(); this.tabPage11 = new System.Windows.Forms.TabPage();
this.button69 = new System.Windows.Forms.Button();
this.groupBox1.SuspendLayout(); this.groupBox1.SuspendLayout();
this.statusStrip1.SuspendLayout(); this.statusStrip1.SuspendLayout();
this.groupBox2.SuspendLayout(); this.groupBox2.SuspendLayout();
@@ -218,6 +220,7 @@
this.tabPage8.SuspendLayout(); this.tabPage8.SuspendLayout();
this.tabPage9.SuspendLayout(); this.tabPage9.SuspendLayout();
this.tabPage10.SuspendLayout(); this.tabPage10.SuspendLayout();
this.tabPage11.SuspendLayout();
this.SuspendLayout(); this.SuspendLayout();
// //
// textBoxServerName // textBoxServerName
@@ -400,6 +403,7 @@
this.tabControl1.Controls.Add(this.tabPage8); this.tabControl1.Controls.Add(this.tabPage8);
this.tabControl1.Controls.Add(this.tabPage9); this.tabControl1.Controls.Add(this.tabPage9);
this.tabControl1.Controls.Add(this.tabPage10); this.tabControl1.Controls.Add(this.tabPage10);
this.tabControl1.Controls.Add(this.tabPage11);
this.tabControl1.Location = new System.Drawing.Point(324, 12); this.tabControl1.Location = new System.Drawing.Point(324, 12);
this.tabControl1.Multiline = true; this.tabControl1.Multiline = true;
this.tabControl1.Name = "tabControl1"; this.tabControl1.Name = "tabControl1";
@@ -1771,10 +1775,10 @@
this.tabPage6.Controls.Add(this.button27); this.tabPage6.Controls.Add(this.button27);
this.tabPage6.Controls.Add(this.button14); this.tabPage6.Controls.Add(this.button14);
this.tabPage6.Controls.Add(this.button13); this.tabPage6.Controls.Add(this.button13);
this.tabPage6.Location = new System.Drawing.Point(4, 40); this.tabPage6.Location = new System.Drawing.Point(4, 22);
this.tabPage6.Name = "tabPage6"; this.tabPage6.Name = "tabPage6";
this.tabPage6.Padding = new System.Windows.Forms.Padding(3); this.tabPage6.Padding = new System.Windows.Forms.Padding(3);
this.tabPage6.Size = new System.Drawing.Size(638, 383); this.tabPage6.Size = new System.Drawing.Size(638, 401);
this.tabPage6.TabIndex = 6; this.tabPage6.TabIndex = 6;
this.tabPage6.Text = "Client Terminal"; this.tabPage6.Text = "Client Terminal";
this.tabPage6.UseVisualStyleBackColor = true; this.tabPage6.UseVisualStyleBackColor = true;
@@ -1820,10 +1824,10 @@
// //
this.tabPage7.Controls.Add(this.button23); this.tabPage7.Controls.Add(this.button23);
this.tabPage7.Controls.Add(this.iCustomBtn); this.tabPage7.Controls.Add(this.iCustomBtn);
this.tabPage7.Location = new System.Drawing.Point(4, 40); this.tabPage7.Location = new System.Drawing.Point(4, 22);
this.tabPage7.Name = "tabPage7"; this.tabPage7.Name = "tabPage7";
this.tabPage7.Padding = new System.Windows.Forms.Padding(3); this.tabPage7.Padding = new System.Windows.Forms.Padding(3);
this.tabPage7.Size = new System.Drawing.Size(638, 383); this.tabPage7.Size = new System.Drawing.Size(638, 401);
this.tabPage7.TabIndex = 7; this.tabPage7.TabIndex = 7;
this.tabPage7.Text = "Technical Indicators"; this.tabPage7.Text = "Technical Indicators";
this.tabPage7.UseVisualStyleBackColor = true; this.tabPage7.UseVisualStyleBackColor = true;
@@ -2008,6 +2012,16 @@
this.tabPage10.Text = "Object Functions"; this.tabPage10.Text = "Object Functions";
this.tabPage10.UseVisualStyleBackColor = true; this.tabPage10.UseVisualStyleBackColor = true;
// //
// button68
//
this.button68.Location = new System.Drawing.Point(6, 39);
this.button68.Name = "button68";
this.button68.Size = new System.Drawing.Size(75, 23);
this.button68.TabIndex = 2;
this.button68.Text = "ObjectName";
this.button68.UseVisualStyleBackColor = true;
this.button68.Click += new System.EventHandler(this.button68_Click);
//
// comboBox11 // comboBox11
// //
this.comboBox11.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList; this.comboBox11.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
@@ -2027,15 +2041,26 @@
this.button4.UseVisualStyleBackColor = true; this.button4.UseVisualStyleBackColor = true;
this.button4.Click += new System.EventHandler(this.button4_Click); this.button4.Click += new System.EventHandler(this.button4_Click);
// //
// button68 // tabPage11
// //
this.button68.Location = new System.Drawing.Point(6, 39); this.tabPage11.Controls.Add(this.button69);
this.button68.Name = "button68"; this.tabPage11.Location = new System.Drawing.Point(4, 40);
this.button68.Size = new System.Drawing.Size(75, 23); this.tabPage11.Name = "tabPage11";
this.button68.TabIndex = 2; this.tabPage11.Padding = new System.Windows.Forms.Padding(3);
this.button68.Text = "ObjectName"; this.tabPage11.Size = new System.Drawing.Size(638, 383);
this.button68.UseVisualStyleBackColor = true; this.tabPage11.TabIndex = 11;
this.button68.Click += new System.EventHandler(this.button68_Click); this.tabPage11.Text = "Backtesting";
this.tabPage11.UseVisualStyleBackColor = true;
//
// button69
//
this.button69.Location = new System.Drawing.Point(6, 6);
this.button69.Name = "button69";
this.button69.Size = new System.Drawing.Size(75, 23);
this.button69.TabIndex = 4;
this.button69.Text = "UnlockTicks";
this.button69.UseVisualStyleBackColor = true;
this.button69.Click += new System.EventHandler(this.button69_Click);
// //
// Form1 // Form1
// //
@@ -2081,6 +2106,7 @@
this.tabPage9.ResumeLayout(false); this.tabPage9.ResumeLayout(false);
this.tabPage9.PerformLayout(); this.tabPage9.PerformLayout();
this.tabPage10.ResumeLayout(false); this.tabPage10.ResumeLayout(false);
this.tabPage11.ResumeLayout(false);
this.ResumeLayout(false); this.ResumeLayout(false);
this.PerformLayout(); this.PerformLayout();
@@ -2259,6 +2285,8 @@
private System.Windows.Forms.ComboBox comboBox11; private System.Windows.Forms.ComboBox comboBox11;
private System.Windows.Forms.TextBox textBoxChartId; private System.Windows.Forms.TextBox textBoxChartId;
private System.Windows.Forms.Button button68; private System.Windows.Forms.Button button68;
private System.Windows.Forms.TabPage tabPage11;
private System.Windows.Forms.Button button69;
} }
} }
+6 -1
View File
@@ -141,7 +141,7 @@ namespace TestApiClientUI
private void apiClient_QuoteUpdated(object sender, string symbol, double bid, double ask) private void apiClient_QuoteUpdated(object sender, string symbol, double bid, double ask)
{ {
Console.WriteLine(@"Quote: Symbol = {0}, Bid = {1}, Ask = {2}", symbol, bid, ask); Console.WriteLine(@"Quote: Symbol = {0}, Bid = {1}, Ask = {2}", symbol, bid, ask);
} }
private void _apiClient_QuoteUpdate(object sender, MtQuoteEventArgs e) private void _apiClient_QuoteUpdate(object sender, MtQuoteEventArgs e)
@@ -1402,5 +1402,10 @@ namespace TestApiClientUI
var result = await Execute(() => _apiClient.ObjectName(chartId, objectIndex)); var result = await Execute(() => _apiClient.ObjectName(chartId, objectIndex));
PrintLog($"ObjectName result: {result}"); PrintLog($"ObjectName result: {result}");
} }
private void button69_Click(object sender, EventArgs e)
{
_apiClient.UnlockTicks();
}
} }
} }
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.