Issue #57: Added function PositionSelectByTicket into MQL code

This commit is contained in:
DW
2017-09-04 13:08:30 +03:00
parent 9800177b08
commit 4b48423c3f
2 changed files with 16 additions and 5 deletions
BIN
View File
Binary file not shown.
+16 -5
View File
@@ -1719,15 +1719,19 @@ int executeCommand()
case 68: //Print case 68: //Print
{ {
string printMsg; string printMsg;
StringInit(printMsg, 1000, 0); StringInit(printMsg, 1000, 0);
getStringValue(ExpertHandle, 0, printMsg); getStringValue(ExpertHandle, 0, printMsg);
Print(printMsg); Print(printMsg);
sendBooleanResponse(ExpertHandle, true); sendBooleanResponse(ExpertHandle, true);
} }
break; break;
case 69: //PositionSelectByTicket
Execute_PositionSelectByTicket();
break;
default: default:
Print("Unknown command type = ", commandType); Print("Unknown command type = ", commandType);
@@ -1738,6 +1742,13 @@ int executeCommand()
return (commandType); return (commandType);
} }
void Execute_PositionSelectByTicket()
{
ulong ticket;
getULongValue(ExpertHandle, 0, ticket);
sendBooleanResponse(ExpertHandle, PositionSelectByTicket(ticket));
}
void PrintParamError(string paramName) void PrintParamError(string paramName)
{ {
Print("[ERROR] parameter: ", paramName); Print("[ERROR] parameter: ", paramName);