Back to articles

I Asked an AI Agent to Find a Tradable Candlestick Pattern. It Refused to Pretend Three Trades Were Proof.

Serg
Serg
August 3, 2026
8 views

I Asked an AI Agent to Find a Tradable Candlestick Pattern. It Refused to Pretend Three Trades Were Proof.

Verdict: marginal / needs more data · Asset/TF: BTC 1h · Sample: 4,379 strictly post-selection bars, 2025-06-11 to 2025-12-11

Hypothesis

Candlestick-pattern tools usually answer the easiest question: “does this chart look like a Morning Star?” The harder and more useful question is: “when this geometry appeared before, after costs and without leaking the discovery sample into the test, did it produce a repeatable edge?”

I asked an agent connected to the native RLXBT macOS app to search for a bullish three-candle Morning Star, freeze the discovered pattern, validate it on data that became available only after selection, archive the complete experiment, and make the same frozen pattern usable as a live signal.

The interesting result was not a new buy signal. It was a research workflow that knew when not to promote one.

Strategy

RLXBT represents the three candles as scale-free geometry: signed body, upper and lower wick, relative range, gaps, and cumulative close path. This makes the query comparable across different price levels instead of matching absolute BTC prices.

The exact pattern and gate were frozen before evaluation:

{
  "pattern_id": "morning_star_btc_1h",
  "candles": [
    { "open": 104.0, "high": 104.5, "low": 98.5, "close": 99.0 },
    { "open": 98.6, "high": 99.5, "low": 97.5, "close": 98.8 },
    { "open": 99.2, "high": 104.0, "low": 98.9, "close": 103.5 }
  ],
  "entry_rules": [
    {
      "condition": "candlestick_similarity_b4121b6f3ec7 >= 0.84678770",
      "direction": 1,
      "signal": "pattern_long"
    }
  ],
  "exit_rules": [],
  "max_hold_bars": 24,
  "position_size": 1.0,
  "commission": 0.0005,
  "slippage": 0.0002
}

The feature was causal: every value before feature_available_from_timestamp was forced to NaN. The threshold was not swept on the reserved tail.

Backtest

Metric Value
Strictly post-availability bars 4,379
Total return +4.162%
Sharpe 1.942
Max drawdown 1.987%
Trades / win rate 3 / 100%
Directional long baseline -16.846%
Commission / slippage 5 bps / 2 bps

At first glance this looks excellent: positive return, high Sharpe, shallow drawdown, and a large advantage over simply staying long during the same period.

But there were only three trades. A 100% win rate over three observations is not robust evidence; it is a reason to collect more data.

Robustness (the proof — do not skip)

  • Temporal holdout: passed structurally. All 4,379 evaluated bars occur after the pattern-selection availability boundary; 39,403 earlier bars were physically excluded from performance.
  • Frozen gate: passed. The similarity threshold, direction, holding period, and costs were fixed before the reserved tail was evaluated.
  • Directional baseline: passed. The pattern experiment beat the same-direction baseline on return and Sharpe.
  • Walk-Forward: not statistically available with only three trades; no WFE is reported.
  • Monte-Carlo: not statistically available with only three trades; no risk-of-ruin estimate is reported.
  • Sensitivity: no post-OOS parameter sweep was allowed.
  • Final verdict: needs_more_data. The candidate is archived for continued research, not authorized for live trading.

This distinction matters. “Out-of-sample” describes where evidence came from; it does not guarantee that there is enough evidence.

Research trail

The agent used RLXBT through MCP:

get_ai_instructions → search_candlestick_patterns → run_pattern_experiment → get_report → save_pattern_signal → evaluate_signal

Here is what each stage contributed:

  1. search_candlestick_patterns compared one-to-ten-candle OHLC combinations using scale-free geometry and empirical forward outcomes.
  2. run_pattern_experiment materialized one frozen rolling similarity feature, excluded all pre-availability rows, applied realistic costs, compared a directional baseline, attempted robustness checks, and archived the result automatically.
  3. get_report returned the complete reproducibility packet: dataset fingerprint, candles, feature method, availability boundary, threshold, costs, strategy, baseline, metrics, warnings, and verdict.
  4. save_pattern_signal stored the frozen candidate in the Pattern Library.
  5. evaluate_signal made the same definition usable on new closed candles. RLXBT computes similarity and returns matched: true/false; the calling execution system still owns position state, risk limits, and orders.

The report was then reopened after restarting the application. RLXBT restored the causal feature and reproduced return, Sharpe, and trade count with zero drift.

Why this changes agentic backtesting

An agent should not merely generate strategy JSON. It should leave behind an auditable research object.

For pattern research that object includes:

  • the exact drawing or candle combination;
  • a scale-independent similarity definition;
  • the timestamp when the selected idea first became available;
  • a frozen gate and direction;
  • realistic costs and holding rules;
  • a baseline;
  • robustness evidence—or an explicit record that evidence is insufficient;
  • a report ID that the user can reopen in the native dashboard;
  • a live evaluator that uses the same frozen specification.

That closes a gap found in many backtesting workflows: the visual idea, historical test, research report, and live signal are often four different implementations. In RLXBT they can be one reproducible object.

Reproduce

Load hourly BTC OHLCV data in the RLXBT macOS app, connect an MCP-compatible agent to:

http://127.0.0.1:8142/api/mcp/sse

Ask the agent to search for a three-candle Morning Star, freeze its similarity threshold and availability boundary, use non-zero commission and slippage, run run_pattern_experiment, and inspect the archived Report rather than judging the chart alone.

The reusable lesson is simple: pattern discovery should produce a testable hypothesis, not an automatic trade.

Reproducible research result

Backtest evidence

BTC1h4,379 bars
Research verdict
needs more data
+4.16%
Total return
1.94
Sharpe
1.99%
Max drawdown
3
Trades
100.00%
Win rate

Robustness

Walk-Forward efficiencyNot enough evidence
Monte-Carlo risk of ruinNot enough evidence
Sensitivity leadernot evaluated: insufficient trades
This result is archived research, not a validated trading strategy. More independent evidence is required.
Report: rpt_1785759615140_0
MCP trail: get_ai_instructions → search_candlestick_patterns → run_pattern_experiment → get_report → save_pattern_signal → evaluate_signal

Comments (0)

No comments yet. Be the first to share your thoughts!