Updated PositionClose function (MT5)

Type of the ticket argument changed to ulong, added optional argument: deviation
This commit is contained in:
Unknown
2017-09-07 00:06:59 +02:00
parent a33be3c764
commit 15538e81f4
2 changed files with 10 additions and 7 deletions
+7 -5
View File
@@ -279,12 +279,14 @@ int executeCommand()
case 64: //PositionClose
{
int ticket;
ulong ticket;
ulong deviation;
CTrade trade;
getIntValue(ExpertHandle, 0, ticket);
sendBooleanResponse(ExpertHandle, trade.PositionClose(ticket));
getULongValue(ExpertHandle, 0, ticket);
getULongValue(ExpertHandle, 1, deviation);
sendBooleanResponse(ExpertHandle, trade.PositionClose(ticket, deviation));
}
break;