Forex Risk Reward
workflow.run_forex_risk_rewardRisk and reward distance in pips from entry/stop/target, and the resulting ratio (reward/risk): a raw number, not a verdict. ratio is null when the stop sits exactly at entry (no risk distance), and also when validSetup is false (stop/target on the wrong side of entry for the given side, e.g. a long with its stop above entry) - check validSetup before trusting the ratio. Precious-metal pairs (XAU, XAG, XPT, XPD) are refused with an error, because their pip and lot size differ by broker. Edge cases: entryPrice, stopPrice and targetPrice above zero; 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. A stop equal to entry or a stop or target on the wrong side of entry for the chosen side gives ratio null (check validSetup). Not covered: spread, commission, swap, slippage, and the probability that the target is hit. Use when user asks "what's my risk/reward on this setup?". Returns: riskPips, rewardPips, validSetup, ratio.
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>",
"stopPrice": "<stopPrice>",
"targetPrice": "<targetPrice>"
},
"name": "workflow.run_forex_risk_reward"
}
}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" | |
| stopPrice | Yes | Stop-loss price, same quote convention as the entry price | |
| entryPrice | Yes | Entry price in the pair's own quote terms, e.g. 1.0850 for EUR/USD | |
| targetPrice | Yes | Take-profit price, same quote convention as the entry price |