close_position
Closes an MT5 position by account and ticket, using volume 0 to close all or a partial volume to reduce exposure.
Instructions
Close a position (volume 0 = all of it, or a partial volume).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"account_id": "<account_id>",
"ticket": "<ticket>"
},
"name": "close_position"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ticket | Yes | ||
| volume | No | ||
| account_id | Yes |