Forex Scenario
workflow.run_forex_scenarioPnL across a range of hypothetical price moves (in pips, signed by actual price direction, not pre-adjusted for side), for a single forex position size, long or short. Precious-metal pairs (XAU, XAG, XPT, XPD) are refused with an error, because their pip and lot size differ by broker. Edge cases: entryPrice and units above zero; deltasPips is a list of at least one signed number of pips (positive means the price rose, whatever the side); a move that takes the exit price to zero or below is not rejected, read exitPrice; The pair is BASE/QUOTE with two different ISO 4217 currency codes, in any letter case; crypto tickers and precious metals (XAU, XAG, XPT, XPD) are refused. A pip is 0.01 for a pair quoted in JPY and 0.0001 for every other pair, and a standard lot is 100,000 units. Not covered: spread, commission, swap, slippage and account-currency conversion. Use when user asks "what if price moves X pips in either direction?". Returns: scenarios[] (deltaPips, exitPrice, pnlQuote).
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": {
"pair": "<pair>",
"side": "<side>",
"entryPrice": "<entryPrice>",
"units": "<units>",
"deltasPips": "<deltasPips>"
},
"name": "workflow.run_forex_scenario"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| pair | Yes | Currency pair in BASE/QUOTE format, e.g. "EUR/USD" | |
| side | Yes | Trade direction: "long" or "short" | |
| units | Yes | Position size in base-currency units | |
| deltasPips | Yes | Hypothetical price moves in pips, e.g. [-50, 0, 50] | |
| entryPrice | Yes | Entry price in the pair's own quote terms, e.g. 1.0850 for EUR/USD |