Skip to main content
Glama

Backtesting Arena

Get Log-Linear Regression Channels (90/180/365 bars)

arena_get_trend_channels

Where does price sit inside its trend channel? Mechanically fitted trend channels for a pair: log-linear regression over close plus 1σ/2σ bands, computed over three fixed windows at once (90/180/365 bars, not selectable) — three side by side show whether a channel is robust or an artifact of the window choice, and agreement.consistent states which it is. r_squared_percentile ranks the fit against all same-size windows on this pair, so an R² comes with its placement instead of standing alone. Where history is too short the window is omitted and listed in windows_unavailable with a reason — never estimated from fewer bars; below 500 bars (1d) / 150 (1w) the raw values still come but percentile is null rather than a rounded number from too small a sample. Pairs listed within the last few months (the tokenized equities and ETFs) therefore return data_sufficient: false and an empty channel list — that is the answer, not an error. Set interval to '1w' for the weekly view; note that a window is counted in bars, so 365 on '1w' means 365 weeks and most pairs do not reach it. Band edges describe past dispersion around the regression line. Related: arena_get_key_levels (pivot clusters), arena_get_btc_market_structure (trend flips and their base rate), arena_get_historical_analog (whether a condition like the current one ever paid). [Free tier]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
pairNoPair, e.g. "BTCUSDT" (default), "ETHUSDT", "PAXGUSDT". Full history is used regardless of listing date.
intervalNoDefault '1d'. On '1w' a 365-bar window means 365 weeks — most pairs do not reach it and it is reported as unavailable.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • addedInput schema / additionalProperties
      Added value: +false
    • removedInput schema / properties / context
      Removed value: -{
      -  "description": "Explain why you are calling this tool and how it fits into the user's overall goal. This parameter is used for analytics and user intent tracking. YOU MUST provide 15-25 words (count carefully). NEVER use first person ('I', 'we', 'you') - maintain third-person perspective. NEVER include sensitive information such as credentials, passwords, or personal data. Example (20 words): \"Searching across the organization's repositories to find all open issues related to performance complaints and latency issues for team prioritization.\"",
      -  "type": "string"
      -}
    • removedInput schema / required
      Removed value: -[
      -  "context"
      -]
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does exceptionally well. It discloses edge cases: windows omitted with reason, percentile null below bar thresholds, data_sufficient false for recent pairs, and the count of bars in weekly intervals. It explains that band edges describe past dispersion and that free tier constraints apply. This is exemplary behavioral disclosure beyond any structured field.

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?

The description is long but every sentence carries information: mechanics, edge cases, related tools, and an example. It is front-loaded with the central question and structured logically. While not succinct, it is dense and well-organized, efficiently packing context without repetition.

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?

Despite having no output schema, the description explains the return structure (agreement.consistent, r_squared_percentile, windows_unavailable, data_sufficient) and how to interpret them. It covers the bar-count semantics, free-tier limitations, and the meaning of band edges. This is remarkably complete for an agent to call the tool correctly without additional docs.

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 already covers both parameters (pair and interval) with descriptions. The description adds extra meaning: full history regardless of listing date for pair, and the bar-count implication for interval ('1w' means 365 weeks, most pairs unavailable). This goes beyond the schema, enriching the parameter semantics.

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 the tool's function: mechanically fitted log-linear regression trend channels with 1σ/2σ bands over three fixed windows. It mentions the pair context and explicitly names related sibling tools (arena_get_key_levels, arena_get_btc_market_structure, arena_get_historical_analog) to differentiate them, making the purpose unambiguous.

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?

Provides clear context on when to use the tool (to assess channel robustness and window dependence) and names related tools for different analyses (pivot clusters, trend flips, historical analogs). It also gives practical usage tips like setting interval to '1w' for weekly view. However, it does not explicitly define exclusionary conditions (e.g., 'use this when, but not when X'), leaving some inference to the agent.

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.