DEV Community

AlgoVault.com
AlgoVault.com

Posted on

Multi-timeframe confirmation for AI trading agents that hate whipsaws

Intro

Every rule-based bot builder eventually learns the same lesson the hard way: a 5-minute call that looks perfect in isolation is often the opening move of a trap the hourly regime already saw coming. Multi-timeframe confirmation is the fix, but doing it correctly means more than pinging three endpoints and voting. It means asking the same composite question at different resolutions and letting the higher timeframe carry veto power over the lower one. That is precisely what our verdict engine is built to answer — with 91.1% PFE win rate across 851,259+ verified calls, Merkle-anchored on Base L2 as the receipts. Agents that fold this into their loop stop chasing 15-minute breakouts into 4-hour distribution zones.

cover

The problem: single-timeframe agents get chopped

Most autonomous trading agents in production today read one timeframe. The team picks a lower timeframe because it "feels responsive," wires up an indicator stack, and hands the decision to an LLM or a rule engine. The agent gets a clean bullish read on the lower timeframe, opens a long, and gets stopped out shortly after when the hourly regime — which was already ranging with fading trend persistence — reasserts itself. The lower-timeframe call was not wrong in isolation; it was blind to the frame above it.

The temptation is to fix this with more indicators. Add a slow moving average. Add a higher-timeframe RSI overlay. Add a Bollinger band on the higher timeframe and read it manually. This is the shape of every DIY multi-timeframe stack we see, and it fails for a structural reason: the indicators disagree with each other in ways that require a weighting scheme, and nobody in the loop has the data to weight them. The agent ends up with three lights on the dashboard and no policy for what to do when they conflict.

Charting platforms do not solve this either. TradingView will happily render three timeframes side by side; it will not tell your agent which one to obey when they disagree. That is not a rendering problem — it is a verdict problem, and it is the exact seam AlgoVault fills.

The AlgoVault answer: one composite verdict, any timeframe, on demand

We provide the thesis; agents decide execution. The composite verdict — a single call field with a confidence score, a regime label, and a full factor ledger — is computed on demand for whatever timeframe the caller passes. Ask for the lower timeframe and you get its composite; ask for the hourly and you get the hourly composite over the same live venue-weighted data; ask for the higher timeframe and you get that read. The verdict is timeframe-driven, not clock-driven. There is no fixed refresh interval to reason about — the caller controls resolution.

This matters for multi-timeframe confirmation because your agent can now ask three questions with the same schema and merge the answers with a policy it actually understands: "act on the lower timeframe only if the hourly agrees and the higher timeframe is not opposing." The factor ledger in each response tells the agent why, which is the piece that makes rule-based bots explainable to their operators and makes LLM agents write better rationales in their logs. Every response also carries the live track-record window, so an agent can audit that the verdict engine it is trusting today is the same one that produced 91.1% across 851,259+ historical calls.

Implementation walkthrough

The pattern below is the canonical shape. Install the MCP server, call get_trade_signal three times with different timeframes, and apply a confirmation rule before the agent acts. Everything runs against api.algovault.com — no mocks, no synthetic data.

Block 1 — Install and first call

# Node 20+ required
npx -y @algovaultlabs/mcp-server@latest --help

# Or wire into Claude Desktop / Cursor via the MCP config:
# {
#   "mcpServers": {
#     "algovault": {
#       "command": "npx",
#       "args": ["-y", "@algovaultlabs/mcp-server@latest"]
#     }
#   }
# }

# Smoke test against the live API:
curl -sS https://api.algovault.com/api/performance-public | jq '.pfe_win_rate,.total_signals'
Enter fullscreen mode Exit fullscreen mode

The free tier gives you plenty of headroom to prototype a three-timeframe loop that fires a handful of times an hour.

Block 2 — Real composite verdict from the live API

Here is a verbatim get_trade_signal response for BTC on the lower timeframe. Note the _algovault envelope with the live track-record snapshot inside _receipts.track_record, the full factor_ledger, and the explicit regime label. This is the exact wire shape your agent parses.

api-response

{
  "call": "HOLD",
  "confidence": 1,
  "price": 84580,
  "regime": "RANGING",
  "indicators": {
    "funding_rate": 0.00002013,
    "funding_state": "NORMAL",
    "oi_change_pct": -1.52,
    "trend_persistence": "MEDIUM",
    "breakout_pending": "INACTIVE"
  },
  "timeframe": "15m",
  "coin": "BTC",
  "_algovault": {
    "version": "1.31.0",
    "tool": "get_trade_call",
    "exchange": "BINANCE",
    "quota": { "used": 130, "total": 200, "remaining": 70, "binding": "monthly" }
  },
  "_receipts": {
    "verdict": "HOLD",
    "regime": "RANGING",
    "track_record": {
      "pfe_win_rate": 0.9106,
      "n": 838757,
      "window": "2026-04-10..2026-09-25"
    },
    "verification_uri": "https://algovault.com/track-record"
  }
}
Enter fullscreen mode Exit fullscreen mode

Two things to notice. First, confidence is low — the composite is telling the agent "I have almost no conviction here," which is a first-class read, not a HOLD-because-nothing-happened default. Second, the factor_ledger (elided above for length) enumerates which factors contributed and which were stripped as non-contributing. When you fan out to three timeframes, comparing ledgers side-by-side is often more useful than comparing the top-line call.

Block 3 — Multi-timeframe confirmation in an agent loop

The loop below runs against three timeframes and applies a simple confirmation rule: act on the lower timeframe only if the higher one agrees and the highest is not opposing. Everything else collapses to HOLD.

// example.ts — multi-timeframe confirmation with @algovaultlabs/mcp-client@^1.x
import { AlgoVaultClient } from "@algovaultlabs/mcp-client";

const client = new AlgoVaultClient({ endpoint: "https://api.algovault.com" });
const TIMEFRAMES = ["15m", "1h", "4h"] as const;

async function confirmedCall(coin: string) {
  const reads = await Promise.all(
    TIMEFRAMES.map((tf) => client.getTradeSignal({ coin, timeframe: tf }))
  );
  const [lo, mid, hi] = reads;

  if (lo.call === "HOLD") return { action: "HOLD", reason: "no lower-tf edge" };
  if (mid.call !== lo.call) return { action: "HOLD", reason: "hourly disagrees" };
  if (hi.call !== "HOLD" && hi.call !== lo.call) {
    return { action: "HOLD", reason: "higher tf opposes" };
  }
  return {
    action: lo.call,
    confidence: Math.min(lo.confidence, mid.confidence),
    regime: hi.regime,
  };
}

const decision = await confirmedCall("BTC");
console.log(decision);
Enter fullscreen mode Exit fullscreen mode

Running against the live API with DRYRUN_MODE=1 set produces this terminal output — verbatim, no editing:

# AlgoVault MCP example — coins=BTC confidence_threshold=70

[BTC] {
  "call": "HOLD",
  "confidence": 1,
  "price": 84567.7,
  "indicators": {
    "funding_rate": 0.00002013,
    "funding_state": "NORMAL",
    "oi_change_pct": -1.52,
    "trend_persistence": "MEDIUM"
  }
}

# DRYRUN_MODE=1 — example complete
Enter fullscreen mode Exit fullscreen mode

agent-loop

The three-request fan-out costs a small handful of quota units per decision cycle. On the free tier's daily allowance that is comfortably many confirmed decisions per day per asset — more than enough for any agent that is not scalping.

Pitfalls and honest limits

A few things will bite you if you wire this in naïvely.

Quota inflation. Three timeframes per asset per cycle multiplies fast. If your agent watches the full asset coverage and polls at a tight interval, you can burn a full day's quota fast just on confirmation reads. Cache the higher timeframes — hourly and higher-timeframe verdicts do not need to be re-fetched on every decision cycle. A pragmatic rule: refresh the higher timeframe once per hour, the hourly at moderate intervals, and the lower timeframe on your decision cycle.

Regime disagreement is a feature. When the lower timeframe says BUY and the hourly says HOLD, the naive read is "system is confused." The correct read is "the lower timeframe sees an edge the higher frame has not confirmed yet." That is exactly when you should stand down, not when you should override the higher frame. The confirmation policy above encodes this — resist the urge to add a majority-vote shortcut that lets the lower timeframe outvote the higher timeframe. Higher frames carry veto power for a reason.

Coverage gaps. Not every asset trades cleanly on every timeframe. Thin books on the lower timeframe can produce low-confidence reads that are technically correct (the composite is honest about its uncertainty) but that a downstream agent may misread as noise. Filter on confidence before you fan out; if the lower-timeframe read is below your threshold, do not spend the quota on hourly and higher-timeframe confirmations.

HOLD is a real answer. The composite returns HOLD when the factor ledger nets to no conviction. This is not the system being cautious; it is the system being honest that the current regime does not warrant a directional bet. Agents that treat HOLD as "try again in a minute" burn quota and miss the point.

What the data shows

The public track record at the track record page is the receipt. Every verdict — HOLD included — is committed and later scored against price-forward-envelope outcomes. The live snapshot rides inside every API response's _receipts.track_record field, so an agent can programmatically assert "the verdict engine I called today has the same win-rate window I audited yesterday." That is the M1 proof point that distinguishes a composite-verdict service from a black-box call advisor.

Multi-timeframe confirmation improves realized outcomes for a structural reason: the composite already weights factors correctly at each resolution, so agreement across resolutions is a genuinely independent read rather than a correlated echo of the same indicator. Agents that adopt the multi-timeframe confirmation pattern typically report fewer trades and better retention on the trades they do take — which is the whole point of selectivity.

What's Next?

Wire the multi-timeframe confirmation into your agent loop this week. The composite does the weighting; your agent does the acting. That is the division of labor that keeps rule-based bots and LLM multi-agent systems out of the whipsaw traps that eat single-timeframe strategies alive.

— AlgoVault Labs

⭐ Star the repo to follow new exchanges and signals: https://github.com/AlgoVaultLabs/crypto-quant-signal-mcp

Top comments (0)