mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-07-29 03:27:48 +00:00
Issue #57: Added function PositionSelectByTicket into MQL code
This commit is contained in:
Binary file not shown.
+16
-5
@@ -1719,15 +1719,19 @@ int executeCommand()
|
||||
|
||||
case 68: //Print
|
||||
{
|
||||
string printMsg;
|
||||
StringInit(printMsg, 1000, 0);
|
||||
string printMsg;
|
||||
StringInit(printMsg, 1000, 0);
|
||||
|
||||
getStringValue(ExpertHandle, 0, printMsg);
|
||||
getStringValue(ExpertHandle, 0, printMsg);
|
||||
|
||||
Print(printMsg);
|
||||
sendBooleanResponse(ExpertHandle, true);
|
||||
Print(printMsg);
|
||||
sendBooleanResponse(ExpertHandle, true);
|
||||
}
|
||||
break;
|
||||
|
||||
case 69: //PositionSelectByTicket
|
||||
Execute_PositionSelectByTicket();
|
||||
break;
|
||||
|
||||
default:
|
||||
Print("Unknown command type = ", commandType);
|
||||
@@ -1738,6 +1742,13 @@ int executeCommand()
|
||||
return (commandType);
|
||||
}
|
||||
|
||||
void Execute_PositionSelectByTicket()
|
||||
{
|
||||
ulong ticket;
|
||||
getULongValue(ExpertHandle, 0, ticket);
|
||||
sendBooleanResponse(ExpertHandle, PositionSelectByTicket(ticket));
|
||||
}
|
||||
|
||||
void PrintParamError(string paramName)
|
||||
{
|
||||
Print("[ERROR] parameter: ", paramName);
|
||||
|
||||
Reference in New Issue
Block a user