> ## Documentation Index
> Fetch the complete documentation index at: https://uncoded.ch/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Recipe — Multi-Timeframe Strategy

> Daily trend filter + 15-minute entry. Two-strategy composition pattern that combines longer-cycle context with faster entry timing.

<Info>
  **Multi-timeframe strategies combine longer-cycle context with faster entry timing.** A daily-timeframe trend filter establishes "we're in a tradable regime"; a `15-minute` entry trigger catches the entry within that regime. Two strategies, one composed system. Better than either alone.
</Info>

## Goal

Capture entries on `BTCUSDT 15m` only when the daily timeframe confirms a tradable regime (uptrending). Avoid entries during sustained daily downtrends.

## Why multi-timeframe

<AccordionGroup>
  <Accordion title="Faster timeframes have more noise" icon="wave-square">
    `15m` candles produce many entry signals — but many are noise that won't follow through. Daily timeframe filters out the regime-mismatched entries.
  </Accordion>

  <Accordion title="Slower timeframes have fewer entries" icon="hourglass">
    Daily-only strategies fire infrequently. You miss entry timing opportunities within a confirmed daily trend. Adding `15m` entry timing increases activity within the daily-confirmed regime.
  </Accordion>

  <Accordion title="The composition is selective" icon="filter">
    "Daily uptrend AND `15m` entry signal" is more selective than either alone. Selectivity = better per-trade quality, even at lower trade count.
  </Accordion>
</AccordionGroup>

## When to pick this recipe

<CardGroup cols={2}>
  <Card title="Crypto markets in mixed regimes" icon="layer-group">
    When daily timeframes show uptrends but with intra-day chop. The recipe captures the daily trend while tolerating intra-day volatility.
  </Card>

  <Card title="You're an experienced operator" icon="user-graduate">
    Multi-strategy composition is more complex than single-strategy patterns. Best after you've validated single-strategy recipes.
  </Card>

  <Card title="You want a more sophisticated strategy" icon="diagram-project">
    Beyond starter recipes, multi-timeframe is a "level-2" pattern — more involved, more powerful when validated.
  </Card>
</CardGroup>

## When NOT to pick this recipe

<Warning>
  * ❌ **First-month operators** — start with single-strategy recipes.
  * ❌ **You haven't run RSI mean-reversion or EMA-cross successfully** — multi-timeframe builds on those patterns.
  * ❌ **Pure sideways markets** — daily filter keeps `canBuy: false` most of the time.
  * ❌ **Capital below `$10,000`** — composition pattern needs sufficient capital for meaningful per-trade P\&L.
</Warning>

## Setup steps — two strategies in composition

<Steps>
  <Step title="Strategy A: Daily trend filter">
    SignalEditor → New Strategy. Name: `daily-trend-filter-btcusdt`.

    * Price node: `BTCUSDT`, timeframe `1d`.
    * Indicator: EMA(50) on price.
    * Condition: price `>` EMA(50) AND EMA(50) is rising over `5` daily bars (use the `rising` trend condition, length `5`).
    * Trigger: `once_per_bar_close`.
    * Webhook: write `trend_filter_btcusdt: true` to a custom config flag.
  </Step>

  <Step title="Strategy A mirror — daily filter OFF">
    SignalEditor → New Strategy. Name: `daily-trend-filter-btcusdt-off`.

    * Same Price + EMA setup.
    * Condition: price `<` EMA(50) OR EMA(50) is `falling` over `5` daily bars.
    * Trigger: `once_per_bar_close`.
    * Webhook: write `trend_filter_btcusdt: false`.
  </Step>

  <Step title="Strategy B: 15m entry trigger">
    SignalEditor → New Strategy. Name: `entry-trigger-btcusdt-15m`.

    * Price node: `BTCUSDT`, timeframe `15m`.
    * Indicator: RSI(14) on price.
    * Condition: RSI `<` `30` AND `trend_filter_btcusdt == true` (read the flag set by Strategy A).
    * Trigger: `once_per_bar_close`.
    * Webhook: write `canBuy: true` for the mode.
  </Step>

  <Step title="Strategy B mirror — entry OFF">
    SignalEditor → New Strategy. Name: `entry-trigger-btcusdt-15m-off`.

    * Same Price + RSI.
    * Condition: RSI `>` `70` OR `trend_filter_btcusdt == false`.
    * Trigger: `once_per_bar_close`.
    * Webhook: write `canBuy: false`.
  </Step>

  <Step title="Test the chain end-to-end">
    Manually drive the chain by sending test webhooks. Verify:

    * When daily trend is on AND 15m entry triggers, mode's `canBuy` flips to true.
    * When daily trend turns off, mode's `canBuy` flips to false regardless of 15m signals.
    * Database surface (Dashboard) shows the expected configuration state after each step.
  </Step>

  <Step title="Backtest the combined system">
    Run the Backtester with the mode + 4-strategy composition. Validate the combined behavior on multiple historical windows.
  </Step>

  <Step title="Forward-test on small capital">
    `$3,000–$5,000` allocation for 4+ weeks (multi-timeframe recipes have less frequent entries — need longer windows to validate).
  </Step>

  <Step title="Promote if validated">
    Scale to full capital after forward-testing agrees with backtest.
  </Step>
</Steps>

## Expected behavior

<AccordionGroup>
  <Accordion title="Firing frequency" icon="clock">
    Entries fire only when both filters agree. Expect substantially fewer entries than RSI mean-reversion alone — perhaps `1/3` to `1/5` of the rate. The trade-off: each entry has higher selectivity.
  </Accordion>

  <Accordion title="Win rate" icon="trophy">
    Multi-timeframe filtering typically improves win rate over single-strategy approaches. Expect `~70–85%` win rate on validated combinations.

    However: total return depends on win count × avg win size. Lower frequency means total return may be similar or modestly different from less-selective approaches.
  </Accordion>

  <Accordion title="Drawdown character" icon="chart-line-down">
    Multi-timeframe with daily trend filter typically has shallower drawdowns than unfiltered approaches — the filter excludes most "buying into a downtrend" scenarios.
  </Accordion>
</AccordionGroup>

## Common mistakes

<AccordionGroup>
  <Accordion title="❌ Running just the entry strategy without the filter" icon="ban">
    Without Strategy A's daily filter writing `trend_filter_btcusdt: true/false`, Strategy B's read of the flag is undefined. Behavior collapses to RSI-only.

    **Fix**: build all 4 strategies (A, A-off, B, B-off) before going live.
  </Accordion>

  <Accordion title="❌ Forgetting the OFF strategies" icon="ban">
    Without the mirror strategies, flags stay set forever once flipped.

    **Fix**: every "set to true" strategy needs a paired "set to false" strategy. Always.
  </Accordion>

  <Accordion title="❌ Both timeframes on noise-prone settings" icon="ban">
    Daily trend filter with `length 5` for `rising` is reasonable. With `length 1` (just one bar's direction), the filter trips constantly.

    **Fix**: use trend-detection lengths that match the timeframe's character (`5–20` for daily; `20–50` for hourly).
  </Accordion>

  <Accordion title="❌ Forward-testing too short" icon="ban">
    Multi-timeframe strategies have less frequent firing. A 1-week forward test may include zero entries.

    **Fix**: forward-test for at least 4 weeks; longer if your daily filter excludes most of the recent regime.
  </Accordion>
</AccordionGroup>

## What's next

<CardGroup cols={2}>
  <Card title="RSI Mean-Reversion" icon="circle-down" href="/strategies/recipes/rsi-mean-reversion">
    The single-strategy recipe this builds on.
  </Card>

  <Card title="EMA Cross Trend" icon="arrow-trend-up" href="/strategies/recipes/ema-cross-trend">
    Trend-following alternative.
  </Card>

  <Card title="SignalEditor" icon="wand-magic-sparkles" href="/modules/signaleditor">
    Build the multi-strategy composition.
  </Card>

  <Card title="Backtester" icon="flask" href="/modules/backtester">
    Validate the composed system on history.
  </Card>
</CardGroup>
