Forex position size
calculate_position_sizePosition size in lots for a trade that risks a set share of the account at a given stop loss distance in pips. Converts the pip value into the account currency with the latest ECB reference rates.
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_balance": "<account_balance>",
"risk_percent": "<risk_percent>",
"stop_loss_pips": "<stop_loss_pips>",
"instrument": "<instrument>"
},
"name": "calculate_position_size"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pip_size | No | Size of one pip in the quote currency. Default: 0.01 for JPY quotes, 0.0001 otherwise. | |
| instrument | Yes | Currency pair as six letters, base then quote. | |
| risk_percent | Yes | Share of the balance to risk, in percent. | |
| contract_size | No | Units per standard lot. | |
| stop_loss_pips | Yes | Stop loss distance in pips. | |
| account_balance | Yes | Account balance in the account currency. | |
| account_currency | No | Currency of the account, ISO 4217 code. | USD |