Skip to main content
Glama

TraderWAI Charts

Backtest Strategy

backtest_strategy
Read-only

Backtests a rule-based strategy on TraderWAI historical 1-minute data and returns every trade plus a summary (win rate, total R, drawdown). It is a calculation on the server, with no AI involved. Levels can be daily references so the rule works every day: {"ref":"session_high","session":"asia"} (asia 00:00-07:00, london 07:00-16:00, new_york 13:00-21:00 UTC), {"ref":"range_high","start":"00:00","end":"06:00"}, {"ref":"prev_day_low"}; the rule is armed each day once its levels are known. Indicator levels: {"ref":"indicator","indicator":"sma|ema|rsi|atr|highest|lowest","timeframe":"D1","period":50}, {"ref":"price"}, {"ref":"day_open"} or {"ref":"day_high","daysAgo":2}, combined with compare (e.g. price above the D1 EMA 50) and candle_direction; indicators use closed candles only. Example ("buy EUR/USD when it breaks the Asian high"): symbol EUR_USD, conditions [{"type":"close_above","timeframe":"M15","level":{"ref":"session_high","session":"asia"}},{"type":"time_window","start":"07:00","end":"12:00"}], trade {"side":"buy","stop":{"type":"level","ref":{"ref":"session_low","session":"asia"}},"target":{"type":"rr","value":2},"closeAt":"20:00"}. Example ("buy gold on the first retest of a bullish M15 fair value gap in London"): conditions [{"type":"fvg_retest","timeframe":"M15","direction":"bullish","maxCandles":20},{"type":"time_window","start":"07:00","end":"12:00"}], trade {"side":"buy","stop":{"type":"wick","bufferPips":10},"target":{"type":"rr","value":2}}. Limit entries ({"type":"limit","at":{"type":"fvg","point":"midpoint"},"expiryMinutes":60}) and time exits (maxMinutes, closeAt) are supported. Not supported: other chart patterns (head and shoulders, triangles…), order blocks, news, trailing stops. History: forex, gold and crypto since late May 2026; indices and oil about 1 year. The period and the number of backtests per day depend on the TraderWAI account. Works with the market closed (weekends).

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": {
      "symbol": "<symbol>",
      "conditions": "<conditions>",
      "trade": "<trade>"
    },
    "name": "backtest_strategy"
  }
}

Input Schema

NameRequiredDescriptionDefault
toNoEnd (ISO 8601, default now)
daysNoPeriod: the last N days (default 7)
fromNoOr an explicit start (ISO 8601)
tradeYesSide, stop, target and optional daily close time
symbolYesSymbol (e.g. EUR_USD, XAU_USD, NAS100_USD).
conditionsYesEntry rule (all conditions must be met, max 5)
spreadPipsNoSpread in pips added to buy entries (default 0)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond the readOnly/openWorld annotations, it discloses return contents (every trade plus win rate, total R, drawdown), clarifies no AI is involved ('calculation on the server'), states data history windows by asset class, and notes account-dependent limits and weekend operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Purpose and return contents are front-loaded, followed by reference detail; nearly every sentence carries usable information. The dense block of level-reference syntax is somewhat redundant with the schema's own descriptions, slightly inflating length.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With no output schema, the description steps up to explain the return shape (trades plus summary metrics), data availability by asset class, and account-dependent limits. Combined with the examples and exclusions, an agent has enough to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3, but the description adds real value with end-to-end examples pairing conditions and trade objects, session hour definitions, and level-reference syntax that show how parameters combine. Some level syntax repeats what the schema already documents, keeping it from a 5.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb and resource: it backtests a rule-based strategy on TraderWAI historical 1-minute data and returns every trade plus a summary. This immediately distinguishes it from the chart/data siblings (get_ohlc, draw_chart, get_quote) that only supply market data.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides two concrete worked examples and an explicit 'Not supported' list (chart patterns, order blocks, news, trailing stops) which functions as when-not guidance. It also notes the tool works with the market closed and that period/backtest count depend on the account, though it does not explicitly route to a sibling alternative.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources