mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-19 13:48:11 +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
|
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);
|
||||||
|
|||||||
Reference in New Issue
Block a user