diff --git a/MTConnector/MTConnector.cpp b/MTConnector/MTConnector.cpp index 0e0805b7..b96df31e 100755 --- a/MTConnector/MTConnector.cpp +++ b/MTConnector/MTConnector.cpp @@ -255,4 +255,19 @@ int _stdcall getStringValue(int expertHandle, int paramIndex, wchar_t* res) return 0; } return 1; +} + +int _stdcall getBooleanValue(int expertHandle, int paramIndex, int* res) +{ + try + { + bool val = (bool)MtServerInstance::GetInstance()->GetCommandParameter(expertHandle, paramIndex); + *res = val == true ? 1 : 0; + } + catch (Exception^ e) + { + Debug::WriteLine("[ERROR] MT5Connector:getBooleanValue(): " + e->Message); + return 0; + } + return 1; } \ No newline at end of file diff --git a/MTConnector/MTConnector.def b/MTConnector/MTConnector.def index 4957da7b..53b80ced 100755 --- a/MTConnector/MTConnector.def +++ b/MTConnector/MTConnector.def @@ -14,4 +14,5 @@ EXPORTS initExpert getCommandType getIntValue getDoubleValue - getStringValue \ No newline at end of file + getStringValue + getBooleanValue \ No newline at end of file diff --git a/MtApi/MtApiClient.cs b/MtApi/MtApiClient.cs index bb1b947a..6e4c2153 100755 --- a/MtApi/MtApiClient.cs +++ b/MtApi/MtApiClient.cs @@ -652,6 +652,14 @@ namespace MtApi #endregion + #region Symbols + public int SymbolsTotal(bool selected) + { + var commandParameters = new ArrayList { selected }; + return SendCommand(MtCommandType.SymbolsTotal, commandParameters); + } + #endregion + #region Common Function public void Alert(string msg) diff --git a/MtApi/MtCommandType.cs b/MtApi/MtCommandType.cs index 757f5af0..a3b792cd 100755 --- a/MtApi/MtCommandType.cs +++ b/MtApi/MtCommandType.cs @@ -195,6 +195,11 @@ namespace MtApi MtRequest = 155, //Backtesting - BacktestingReady = 156 + BacktestingReady = 156, + + //Symbols + SymbolsTotal = 200, + SymbolName = 201, + SymbolSelect = 202 } } diff --git a/mq4/MtApi.ex4 b/mq4/MtApi.ex4 index a3f9319c..79453fb4 100755 Binary files a/mq4/MtApi.ex4 and b/mq4/MtApi.ex4 differ diff --git a/mq4/MtApi.mq4 b/mq4/MtApi.mq4 index 2be6c261..dc745fa1 100755 Binary files a/mq4/MtApi.mq4 and b/mq4/MtApi.mq4 differ