mirror of
https://github.com/vdemydiuk/mtapi.git
synced 2026-08-13 18:58:09 +00:00
Updated PositionClose function (MT5)
Type of the ticket argument changed to ulong, added optional argument: deviation
This commit is contained in:
+7
-5
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user