AI Strategy Playbook

RSI Mean-Reversion AI Crypto Trading Bot (Runnable MCP Script)

Naive RSI < 30 bots blow up during strong downtrends. Combining Eterna's native `getRsi()` and `getEma()` inside a single sandbox execution lets your AI agent filter regime cleanly and execute at 0.014% maker fees.

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

An RSI mean-reversion agent on Eterna MCP screens liquid USDT perpetuals in one `execute_code` call using `eterna.getRsi()` plus a higher-timeframe `eterna.getEma()` trend filter (so it only buys oversold dips above the 200 EMA and avoids catching falling knives), then places a risk-sized limit order with automatic `stopLoss` and `takeProfit`.

SDK IndicatorsgetRsi + getEmaZero manual candle math
Target EntryLimit (0.014%)Maker fee beats market-order drag
Timeframe15m / 1h4h EMA-200 regime filter
Risk Rule1% equity / tradeHard stopLoss + 2R takeProfit
https://mcp.eterna.exchange/mcp

1. Runnable `execute_code` RSI + EMA Filter Script

Paste this prompt or code into Claude, Cursor, or Eterna CLI to scan top majors in one turn.

rsi-mean-reversion-scan.ts
const watchlist = ["BTCUSDT", "ETHUSDT", "SOLUSDT", "XRPUSDT", "SUIUSDT"];
const candidates = [];

for (const symbol of watchlist) {
  const [ticker, rsi15m, ema200_1h] = await Promise.all([
    eterna.getTickers({ symbol }),
    eterna.getRsi({ symbol, interval: "15", period: 14 }),
    eterna.getEma({ symbol, interval: "60", period: 200 }),
  ]);

  const price = Number(ticker[0].lastPrice);
  const rsi = Number(rsi15m.value ?? rsi15m.latest);
  const ema200 = Number(ema200_1h.value ?? ema200_1h.latest);

  if (price > ema200 && rsi <= 32) {
    candidates.push({ symbol, setup: "OVERSOLD_UPTREND_LONG", price, rsi, ema200 });
  } else if (price < ema200 && rsi >= 68) {
    candidates.push({ symbol, setup: "OVERBOUGHT_DOWNTREND_SHORT", price, rsi, ema200 });
  }
}

return { scanned: watchlist.length, matches: candidates };
Returns: Filtered list of regime-aligned RSI mean-reversion candidates ready for risk sizing.

2. Common Failure Modes & How to Avoid Them

  • Never buy RSI < 30 during macro liquidation cascades without checking 1h/4h EMA trend direction.
  • Use limit orders near the bid/ask (`0.014%` maker fee) rather than chasing fills with market orders.
  • Cap exposure to one position per correlated cluster (e.g., do not long BTC, ETH, and SOL simultaneously on the same dip).
FAQ

Frequently asked questions

What RSI threshold works best on crypto perpetuals?
Liquid majors like BTCUSDT and ETHUSDT often bounce around 28 to 33 in uptrends; higher-beta alts frequently stretch to 20 to 25. Always pair RSI with a trend filter and fixed stopLoss.
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