compute_position_size
Calculate a risk-budgeted instrument quantity from entry, stop, execution costs, and currency constraints, rounding down and failing safely when data is missing. Does not access accounts or place orders.
Instructions
Compute a risk-budgeted instrument quantity from entry, stop, explicit execution cost, quantity constraints, and fresh quote-to-account currency evidence. The quantity is always rounded down and the tool fails closed when conversion evidence or minimum-size capacity is missing. It does not access an account or place an order.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| symbol | Yes | ||
| stop_price | Yes | ||
| entry_price | Yes | ||
| risk_amount | No | ||
| risk_percent | No | ||
| quantity_step | Yes | ||
| account_equity | Yes | ||
| account_currency | Yes | ||
| maximum_quantity | No | ||
| minimum_quantity | Yes | ||
| conversion_symbol | No | ||
| contract_multiplier | No | ||
| quote_to_account_rate | No | Account-currency units per one quote-currency unit | |
| conversion_observed_at | No | ||
| max_conversion_age_seconds | No | ||
| round_trip_cost_price_per_unit | No |