MTContext Docs
Tool Reference

Indicator

2 tools in this category.

Overview

Indicator includes 2 tools for this workflow area.

Available tools: check_confluence, get_indicator.

Use the parameter tables and examples below as the canonical request contract.

check_confluence

Evaluates up to 8 indicator conditions across timeframes for one symbol and returns a single pass/fail verdict together with every condition's actual value. Each condition is { timeframe, indicator, params?, field?, op, value, bar_index? } resolved through the same indicator registry as get_indicator (see that tool's description for the supported indicator list and their params). bar_index (default 0) counts backward from the most recent completed bar — 0 is the latest — consistent with get_indicator's newest-first array convention. op is one of gt|gte|lt|lte|between|cross_above|cross_below; between takes value as a [low, high] tuple, every other op takes a single number. field selects a named series for composite indicators (e.g. MACD's histogram, BOLLINGER's upper) and is required for MACD/BOLLINGER/ADX/STOCHASTIC/ICHIMOKU; it defaults to values for single-series indicators. For gt/gte/lt/lte only, value may instead be { field_ref: string } naming another field already resolved within this same condition's indicator output, compared at the same bar — e.g. { indicator: "ADX", field: "plus_di", op: "gt", value: { field_ref: "minus_di" } } expresses +DI > -DI directly, instead of two static thresholds that can silently disagree. field_ref is rejected (BAD_PARAMS) with between/cross_above/cross_below — those need a full referenced series, not a single value. A condition using field_ref echoes an object for its value field in the response (previously always a number/tuple); value_actual is still the condition's own numeric current value either way. Distinct (indicator, timeframe, params) triples are dispatched at most once per call. Aggregation: mode all (default) requires every condition to pass, any requires at least one, at_least requires min_matches conditions (required when mode is at_least). Fails closed: a condition whose dispatch errors, whose series is too short, or whose field_ref is unresolvable is reported status: "unavailable" and forces the whole response to incomplete: true, passed: false, regardless of mode. Requires the analytics capability (Team+ tier).

Parameters

NameTypeRequiredDefaultDescription
symbolstringYes
conditionsarrayYes
modestringNo"all"(one of: all, any, at_least)
min_matchesintegerNo

Example Request

{
  "tool": "check_confluence",
  "arguments": {
    "symbol": "EURUSD",
    "conditions": []
  }
}

get_indicator

Returns raw indicator values for a symbol and timeframe. Values are deterministic and unlabelled — no directional signals or verdicts are attached; the caller interprets them. Provide either timeframe (single) or timeframes (array, returns results keyed by timeframe under by_timeframe) — exactly one.

Returned value arrays are ordered newest-first (index 0 is the most recent completed bar); every response includes order: "newest_first" plus a current convenience field (or one <series>_current field per named series for composite indicators) holding index 0's value, for callers who just want the latest reading. This is the opposite of the oldest-first/chronological convention used by detect_structure, detect_patterns, the get_market_structure family, and get_order_flow — don't assume one ordering applies across the whole toolset.

Supported indicators: RSI (Relative Strength Index): period 2-200 (default 14) → values: number[] MACD (Moving Average Convergence Divergence): fast 2-200 (default 12), slow 2-200 (default 26), signal 2-200 (default 9) → macd: number[], signal: number[], histogram: number[] ATR (Average True Range): period 1-200 (default 14) → values: number[] SMA (Simple Moving Average): period 1-200 (default 20), applied_price CLOSE|OPEN|HIGH|LOW|MEDIAN|TYPICAL (default CLOSE) → values: number[] EMA (Exponential Moving Average): period 1-200 (default 20), applied_price CLOSE|OPEN|HIGH|LOW|MEDIAN|TYPICAL (default CLOSE) → values: number[] BOLLINGER (Bollinger Bands): period 2-200 (default 20), deviation 0.1-10 (default 2.0), applied_price CLOSE|OPEN|HIGH|LOW|MEDIAN|TYPICAL (default CLOSE) → upper: number[], middle: number[], lower: number[] ADX (Average Directional Index / DMI): period 2-200 (default 14) → adx: number[], plus_di: number[], minus_di: number[] STOCHASTIC (Stochastic Oscillator): k_period 1-200 (default 5), d_period 1-200 (default 3), slowing 1-200 (default 3) → k: number[], d: number[] CCI (Commodity Channel Index): period 1-200 (default 14) → values: number[] PARABOLIC_SAR (Parabolic Stop and Reverse): step 0.001-1 (default 0.02), maximum 0.01-1 (default 0.2) → values: number[] ICHIMOKU (Ichimoku Kinko Hyo): tenkan 1-200 (default 9), kijun 1-200 (default 26), senkou 1-200 (default 52) → tenkan: number[], kijun: number[], senkou_a: number[], senkou_b: number[], chikou: number[] WPR (Williams %R): period 1-200 (default 14) → values: number[] MFI (Money Flow Index): period 1-200 (default 14) → values: number[] STDDEV (Standard Deviation): period 1-200 (default 20), applied_price CLOSE|OPEN|HIGH|LOW|MEDIAN|TYPICAL (default CLOSE) → values: number[] DEMARKER (DeMarker): period 1-200 (default 14) → values: number[] MOMENTUM (Momentum): period 1-200 (default 14), applied_price CLOSE|OPEN|HIGH|LOW|MEDIAN|TYPICAL (default CLOSE) → values: number[]

Parameters

NameTypeRequiredDefaultDescription
symbolstringYes
timeframestringNo(one of: M1, M5, M15, M30, H1, H4, D1, W1, MN1)
timeframesarrayNo
countintegerNo10
indicatorstringYes(one of: RSI, MACD, ATR, SMA, EMA, BOLLINGER, ADX, STOCHASTIC, CCI, PARABOLIC_SAR, ICHIMOKU, WPR, MFI, STDDEV, DEMARKER, MOMENTUM)
paramsobjectNo

Example Request

{
  "tool": "get_indicator",
  "arguments": {
    "symbol": "EURUSD",
    "indicator": "RSI",
    "timeframe": "M1",
    "count": 10
  }
}

Usage Notes

  • Start with a smaller count/bars value while iterating, then increase once the workflow is stable.
  • Use one timeframe for quick checks and multiple timeframes only when you need cross-timeframe analysis.

On this page