Skip to main content
Glama
tedorigawa001

TradingView-MCP

compute_market_regimes

Identify trend, range, or transition regimes and volatility state from closed OHLC bars using efficiency ratio and ATR-normalized movement, without future data.

Instructions

Classify deterministic directional and volatility regimes from closed OHLC bars already loaded on the active chart. Every label uses only that bar and earlier evidence: efficiency ratio and ATR-normalized directional movement classify trend/range/transition, while current ATR relative to a trailing ATR median classifies low/normal/high volatility. Thresholds are explicit and no future-fitted quantiles, ranking, chart changes, or trade recommendations are used.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoMost recent loaded bars to inspect. Default: 1000
atr_lookbackNoBars used for point-in-time ATR. Default: 14
trend_lookbackNoBars used for direction and efficiency ratio. Default: 20
expected_symbolYes
observation_limitNoMaximum recent classified rows returned; aggregates use all rows. Default: 100
expected_timeframeYes
low_volatility_ratioNoCurrent ATR-percent / trailing median ratio for low volatility. Default: 0.75
high_volatility_ratioNoCurrent ATR-percent / trailing median ratio for high volatility. Default: 1.5
minimum_classified_barsNoClassified observations required for complete status. Default: 100
range_efficiency_thresholdNoMaximum efficiency ratio for a range candidate. Default: 0.25
trend_efficiency_thresholdNoMinimum efficiency ratio for a trend candidate. Default: 0.6
volatility_baseline_lookbackNoTrailing ATR-percent observations used for the baseline median. Default: 50
directional_move_atr_thresholdNoMinimum absolute lookback move in current ATR units for trend. Default: 2

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.10

TDQS

A4.2/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden and delivers richly: it discloses no-lookahead behavior ('uses only that bar and earlier evidence'), determinism ('deterministic', 'Thresholds are explicit', 'no future-fitted quantiles'), and side-effect absence ('no ... chart changes, or trade recommendations'). It also reveals the underlying methodology (efficiency ratio, ATR-normalized directional movement, ATR vs trailing median), which is non-obvious and highly useful.

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?

Three front-loaded sentences: purpose first, then methodology, then boundary disclosures. Each sentence earns its place, though the final sentence's negation list ('no future-fitted quantiles, ranking, chart changes, or trade recommendations') is slightly dense and could be tightened without losing information.

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

Completeness3/5

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

For a 13-parameter tool with no annotations and no output schema, the description covers purpose, methodology, and behavioral guarantees well, but it omits the return contract entirely: observation_limit implies a rows-plus-aggregates result and minimum_classified_bars implies a status concept, yet neither is explained. It also doesn't clarify why expected_symbol/expected_timeframe are 'expected' (presumably validation against the loaded chart), which is a meaningful behavioral gap.

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 85%, so the baseline is 3, but the description adds genuine conceptual glue: it explains how parameter groups map to the classification logic (efficiency ratio → trend/range thresholds, ATR-normalized movement → directional_move_atr_threshold, ATR vs trailing median → volatility ratios and baseline lookback). This helps an agent reason about parameter interactions beyond the per-field defaults and constraints in the schema.

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+resource ('Classify deterministic directional and volatility regimes from closed OHLC bars') and enumerates the exact labels produced (trend/range/transition, low/normal/high volatility). It distinguishes itself from siblings like compute_correlation_regimes and compute_market_features by specifying its scope: point-in-time deterministic classification from chart bars only, with no future-fitted quantiles or trade recommendations.

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

Usage Guidelines3/5

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

The description states clear prerequisites ('bars already loaded on the active chart', 'closed' bars) and implies when the tool is appropriate, but it never explicitly names alternatives or states when-not-to-use in favor of another sibling. The determinism and 'no trade recommendations' disclosures hint at boundaries, but an agent must infer the routing decision rather than having it spelled out.

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