"How many lots?" is the wrong first question. The right one is "how much am I willing to lose on this trade?" MTContext lets you ask in those terms — "What lot size keeps me at 1% risk with a 30-pip stop on EURUSD?" — and it does the math against your real account.
How risk-based sizing works
Ask your AI to size a trade by risk, and it calls calculate_lot_size with three inputs: the symbol, your risk percentage, and your stop-loss distance in pips. It then uses your live account equity and the symbol's contract specifications from your connected terminal to return:
- the recommended lot size,
- the risk amount in your account currency, and
- the pip value for that symbol.
Because it reads live equity, the answer is always current — a lot size at 1% risk shrinks automatically as your account draws down and grows as it recovers.
Example
"I want to risk 1% on GBPJPY with a 40-pip stop. What size?" The tool computes the lots that put exactly 1% of your current equity at risk over that 40-pip distance, and tells you the dollar (or euro, etc.) figure that represents.
If the computed size falls below your broker's minimum lot, you'll get a clear LOT_TOO_SMALL result rather than a rounded-up trade that quietly breaks your risk rule.
Seeing your risk across the whole book
Sizing one trade is half the picture. On the Team tier and above, you can also ask "Give me a risk summary" — the get_risk_summary tool returns aggregate currency exposure, margin utilisation, and correlated pairs, so you can catch the case where three "separate" trades are really one big bet on the dollar. (Currency-exposure figures assume FX symbols; indices, crypto, and stocks won't be accurate there.)
What you need
calculate_lot_size is available on the free tier — no trading capability required, since it only computes and returns a number. The portfolio-level get_risk_summary and correlation tools require the Team tier.
Next steps
Once you know your size, see Placing trades safely with dry_run to turn it into an order, and Setting up equity protection guardrails to cap your total downside.
Start free at mtcontext.com — risk-based sizing is included on every tier.