Position size calculator
calculate_position_sizeLot size so that hitting the stop loss loses riskPct % of the balance. Account currency is assumed to be USD.
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": {
"symbol": "<symbol>",
"balance": "<balance>",
"riskPct": "<riskPct>",
"entry": "<entry>",
"stopLoss": "<stopLoss>"
},
"name": "calculate_position_size"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| entry | Yes | ||
| symbol | Yes | e.g. EURUSD, XAUUSD, USDJPY | |
| balance | Yes | Account balance in USD | |
| riskPct | Yes | Risk per trade in %, e.g. 1 | |
| leverage | No | e.g. 500 for 1:500 — adds required margin | |
| stopLoss | Yes |