Skip to content

Commit 56e554a

Browse files
authored
Add files via upload
Fixed a bug with the CUSTOM_INDICATOR command
1 parent 8ee922b commit 56e554a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

MT5socketAPI/Terminal.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -246,7 +246,7 @@ private void ListenMTDataStream()
246246
/// <param name="cmd_port">MTsocketAPI command port</param>
247247
/// <param name="data_port">MTsocketAPI data port</param>
248248
/// <returns>True = connect successful, False = connect fail</returns>
249-
public bool Connect(string host = "127.0.0.1", int cmd_port = 77, int data_port = 78)
249+
public bool Connect(string host = "127.0.0.1", int cmd_port = 71, int data_port = 72)
250250
{
251251
try
252252
{
@@ -485,7 +485,7 @@ public List<double> ATR_Indicator(string Symbol, TimeFrame tf, int Period, int S
485485
/// <param name="Shift">Shift</param>
486486
/// <param name="Num">Number of elements</param>
487487
/// <param name="Params">Parameters</param>
488-
public List<double> Custom_Indicator(string Symbol, TimeFrame tf, string Indicator_Name, int Mode, int Shift, int Num = 1, List<string> Params = null)
488+
public List<double> Custom_Indicator(string Symbol, TimeFrame tf, string Indicator_Name, int Index, int Num = 1, List<string> Params = null)
489489
{
490490
try
491491
{
@@ -494,8 +494,8 @@ public List<double> Custom_Indicator(string Symbol, TimeFrame tf, string Indicat
494494
json_cmd["SYMBOL"] = Symbol;
495495
json_cmd["TIMEFRAME"] = tf.ToString();
496496
json_cmd["INDICATOR_NAME"] = Indicator_Name;
497-
json_cmd["MODE"] = Mode;
498-
json_cmd["SHIFT"] = Shift;
497+
json_cmd["INDEX"] = Index;
498+
//json_cmd["SHIFT"] = Shift;
499499
json_cmd["NUM"] = Num;
500500

501501
int i = 1;

0 commit comments

Comments
 (0)