group_trades
Groups the closed logical trades of the filters by one or two properties and gives each group's trades, wins, losses, win rate, net, average, average win and loss, profit factor, best and worst. For questions such as the win rate after a losing trade, which setup works on Mondays, the best hour, overtrading (trade_of_day).
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": {
"by": "<by>"
},
"name": "group_trades"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | Yes | One or two properties to group by; two give every combination (e.g. ["weekday", "strategy"]). previous_result: after a win, a loss or a flat trade (the trade opened just before); trade_of_day: 1st, 2nd, 3rd, 4th or later trade of its trading day | |
| to | No | Last trading day, YYYY-MM-DD, inclusive | |
| from | No | First trading day, YYYY-MM-DD (a futures day runs from 18:00 New York time the evening before) | |
| tags | No | Trades carrying at least one of these tags | |
| market | No | STRATEGIES = multi-leg option trades, CRYPTO = crypto spot and perpetuals, FOREX = currency pairs, metals and CFDs | |
| account | No | One account by its alias from list_accounts, e.g. ACC-12, or several comma-separated (ACC-12,ACC-15) | |
| symbols | No | Futures roots or tickers, e.g. ["MES", "AAPL"] | |
| strategy | No | A strategy (setup) by its name | |
| checklist | No | By the strategy's checklist: all (every rule followed), broken:N (at most N broken), followed:X (at least X % followed), none (not answered) | |
| account_kind | No | Accounts of one or more types, comma-separated: EVAL evaluation, PA funded, LIVE the firm's capital, PERSONAL the trader's own broker or exchange account, PRACTICE a demo, paper or simulated account (e.g. EVAL,PA); REAL every type but practice, EVAL_PA both | |
| account_role | No | Accounts of one or more roles in the copier, comma-separated: MASTER, COPY (a follower), SINGLE; MASTER,COPY = the copy group | |
| exclude_tags | No | Leave out trades carrying any of these tags |