Skip to main content
Glama
GlynnCarson

tradingview-mcp

by GlynnCarson

bracket_walk_forward

Read-only

Perform walk-forward optimization to evaluate trading strategies by training on historical folds and testing on unseen segments, generating a performance verdict.

Instructions

True walk-forward optimization — THE gate a strategy must pass before paper trading.

Splits history into sequential folds. In each fold the best (rr, atr_mult) is picked on the train window, then applied ONLY to the unseen test window; positions are force-closed at segment boundaries so nothing leaks. The aggregated out-of-sample result is the honest estimate of live behaviour. Verdicts: PASSED | MIXED | OVERFIT | NO_EDGE, plus parameter-stability (do folds keep choosing the same parameters?).

Args: symbol: Binance pair, e.g. BTCUSDT strategy: squeeze_breakout | ema_momentum interval: 1m | 3m | 5m | 15m | 30m | 1h | 4h | 1d days: History window, 1-730 (default 365; use ≥180 for 1h) direction: both | long | short n_splits: Number of sequential folds, 2-10 (default 4) train_ratio: Train fraction per fold, 0.5-0.9 (default 0.7) rr_values: Reward:risk grid (default [1.0, 1.5, 2.0, 3.0], max 8) atr_mult_values: Stop-distance grid in ATR multiples (default [1.0, 1.5, 2.0, 3.0]) min_trades: Minimum train trades for a combo to be eligible (default 5) max_hold_bars: Time-stop in bars (default 60) fee_pct: Fee % per side (default 0.05) slippage_pct: Slippage % per side (default 0.02) regime_filter: Gate signals by anchor trend (see bracket_backtest) regime_anchor: Anchor symbol (default BTCUSDT; "self" = traded pair) regime_interval: Anchor timeframe (default 4h)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNo
symbolYes
fee_pctNo
intervalNo1h
n_splitsNo
strategyNosqueeze_breakout
directionNoboth
rr_valuesNo
min_tradesNo
train_ratioNo
slippage_pctNo
max_hold_barsNo
regime_anchorNoBTCUSDT
regime_filterNo
atr_mult_valuesNo
regime_intervalNo4h
Behavior5/5

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

The description adds significant behavioral context beyond annotations: force-closing positions at segment boundaries, aggregated out-of-sample result, verdict categories, and parameter stability. It does not contradict annotations (readOnlyHint: true, destructiveHint: false).

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

Conciseness5/5

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

The description is well-structured: a bold summary, followed by process explanation, then parameter list. Every sentence is informative and front-loaded. It is appropriately sized for the complexity.

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?

Given 16 parameters and no output schema, the description covers the algorithm, verdicts, parameter stability, and all parameter details. It provides sufficient context for correct invocation, though output format could be more explicit.

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

Parameters5/5

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

With 0% schema description coverage, the description provides detailed explanations for all 16 parameters, including ranges, defaults, and types (e.g., 'squeeze_breakout | ema_momentum' for strategy, '1m | 3m | ...' for interval). This fully compensates for the lack of schema descriptions.

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 clearly states 'True walk-forward optimization' and explains it's a gate before paper trading. It details the process and outcomes, distinguishing it from siblings like bracket_backtest and walk_forward_backtest_strategy.

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?

The description indicates when to use this tool ('gate a strategy must pass before paper trading') but does not explicitly state when not to use or directly reference alternative tools. However, the context implies it is for rigorous validation.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/GlynnCarson/tradingview-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server