Strategy Playbook

Multi-Timeframe (15m + 1h + 4h) AI Confluence Trading Agent

Single-timeframe indicators whipsaw in choppy crypto markets. Eterna's `execute_code` sandbox lets an AI agent evaluate 4h, 1h, and 15m indicators in parallel in under 200ms without paying for 12 sequential LLM turns.

Updated: By Eterna Quant & AI Team (Agent Strategy Playbooks)Read as Markdown
Strategy Summary

Check 3 timeframes simultaneously inside one `execute_code` call using `Promise.all`: require 4h EMA 50 > EMA 200 for macro trend alignment, 1h MACD histogram > 0 for momentum confirmation, and 15m RSI pullback into 38-48 near VWAP for tight-stop entries.

4h FilterEMA 50 vs EMA 200Macro directional bias
1h FilterMACD HistogramIntermediate momentum check
15m TriggerRSI + VWAPPrecision pullback timing
Total LLM Turns1 execute_code callParallel Promise.all execution
https://mcp.eterna.exchange/mcp

1. Atomic 3-Timeframe Confluence Scanner

mtf-confluence.ts
const symbols = ["BTCUSDT", "ETHUSDT", "SOLUSDT", "SUIUSDT", "NVDAUSDT"];

const scans = await Promise.all(
  symbols.map(async (symbol) => {
    const [ema50_4h, ema200_4h, macd_1h, rsi_15m, vwap_15m, ticker] =
      await Promise.all([
        eterna.getEma({ symbol, interval: "240", period: 50 }),
        eterna.getEma({ symbol, interval: "240", period: 200 }),
        eterna.getMacd({ symbol, interval: "60" }),
        eterna.getRsi({ symbol, interval: "15", period: 14 }),
        eterna.getVwap({ symbol, interval: "15" }),
        eterna.getTickers({ symbol }),
      ]);

    const price = Number(ticker[0].lastPrice);
    const bullish4h = ema50_4h.value > ema200_4h.value;
    const momentum1h = macd_1h.histogram > 0;
    const pullback15m = rsi_15m.value >= 38 && rsi_15m.value <= 48 && price >= vwap_15m.value * 0.996;

    return {
      symbol,
      price,
      bullish4h,
      momentum1h,
      rsi15m: rsi_15m.value,
      setup: bullish4h && momentum1h && pullback15m ? "LONG_CONFLUENCE" : "WAIT",
    };
  }),
);

return scans;
FAQ

Frequently asked questions

Why does Promise.all inside execute_code beat separate tool calls for MTF analysis?
Fetching 6 calls across 5 symbols equals 30 API reads. Separate tool calls would burn 30 LLM round trips and minutes of stale prices; `execute_code` runs all 30 concurrently in one turn.
Primary Sources

References & verification links

Start Trading via MCP

Connect your AI agent in 30 seconds

One remote MCP URL. 800+ USDT perpetuals, 380+ spot pairs, 0.014% maker / 0.035% taker, no KYC.

View on GitHub