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

# Strategy examples

> Complete Hizz JSON examples for breakout, mean-reversion, and trend-following ideas.

These examples live only in the documentation. Copy a JSON block into a local
file, change one concern at a time, then submit the complete file to the
validator described in [Write your own strategy](/ai-trading/write-a-strategy).

<Warning>
  Examples demonstrate the file contract; they are not investment advice or
  claims of profitability. Parameters and fee assumptions require independent
  testing before paper or live use.
</Warning>

## What each example teaches

| Example               | Trigger              | Filters                     | Risk           | Execution lesson                              |
| --------------------- | -------------------- | --------------------------- | -------------- | --------------------------------------------- |
| ZEC 4h maker breakout | `donchian_breakout`  | `ema_trend`, `volume_surge` | `atr_bracket`  | Maker entry/routine exit with taker hard stop |
| BTC 1h RSI reversion  | `rsi_reversion`      | `ema_trend`                 | `atr_bracket`  | Conservative all-taker baseline               |
| ETH 4h trend trailing | `trend_continuation` | `atr_expansion`             | `atr_trailing` | Maker entry with taker exits                  |

## ZEC 4h maker breakout

This example combines a four-hour Donchian trigger with a daily trend gate,
volume confirmation, an ATR bracket, and post-only routine orders. Hard stops
remain taker orders.

```json theme={null}
{
  "name": "ZEC 4h maker breakout example",
  "thesis": "Trade confirmed four-hour ZEC Donchian breakouts in the daily trend with volume confirmation, an ATR bracket, and post-only routine execution.",
  "frequency": "medium",
  "definition": {
    "schemaVersion": 1,
    "slug": "example-zec-4h-breakout-maker",
    "symbol": "ZEC-USD",
    "trigger": {
      "kind": "donchian_breakout",
      "timeframe": "base",
      "lookback": 36,
      "thresholdBps": 5,
      "clock": "4h"
    },
    "filters": [
      {
        "kind": "ema_trend",
        "timeframe": "high",
        "fast": 20,
        "slow": 50,
        "clock": "1d"
      },
      {
        "kind": "volume_surge",
        "timeframe": "base",
        "window": 20,
        "multiplier": 1.15,
        "clock": "4h"
      }
    ],
    "risk": {
      "kind": "atr_bracket",
      "timeframe": "base",
      "atrPeriod": 14,
      "atrStopMult": 3,
      "riskReward": 4,
      "maxHoldHours": 20
    },
    "sizing": { "riskFraction": 0.15, "leverage": 1 },
    "entryPolicy": { "maxEntriesPerUtcDay": 1 },
    "feeBps": 13,
    "allowLong": true,
    "allowShort": true,
    "reverseOnOpposite": false
  },
  "data": {
    "provider": "pyth",
    "frames": {
      "base": {
        "interval": "4h",
        "lookbackDays": 600,
        "ticker": "Crypto.ZEC/USD"
      },
      "high": {
        "interval": "1d",
        "lookbackDays": 600,
        "ticker": "Crypto.ZEC/USD"
      }
    }
  },
  "executionPolicy": {
    "schemaVersion": 1,
    "entryMode": "maker",
    "routineExitMode": "maker",
    "emergencyExitMode": "taker",
    "emergencyExitReasons": ["stop"],
    "maker": {
      "ttlSeconds": 180,
      "offsetBps": 0,
      "entryMaxAttempts": 2,
      "routineExitMaxAttempts": 2,
      "routineExitFallbackSeconds": 420
    },
    "costs": {
      "hizzFeeBps": 5,
      "strikeMakerFeeBps": 0,
      "strikeTakerFeeBps": 8
    }
  }
}
```

## BTC 1h RSI reversion

This example trades one-hour RSI extremes only when the daily EMA trend permits
that side. It uses an all-taker execution baseline so the cost assumption does
not depend on passive fills.

```json theme={null}
{
  "name": "BTC 1h RSI reversion example",
  "thesis": "Trade one-hour BTC RSI extremes only in the direction permitted by the daily EMA trend, using a fixed ATR stop and target.",
  "frequency": "medium",
  "definition": {
    "schemaVersion": 1,
    "slug": "example-btc-1h-rsi-reversion",
    "symbol": "BTC-USD",
    "trigger": {
      "kind": "rsi_reversion",
      "timeframe": "base",
      "period": 14,
      "oversold": 28,
      "overbought": 72,
      "clock": "1h"
    },
    "filters": [
      {
        "kind": "ema_trend",
        "timeframe": "high",
        "fast": 20,
        "slow": 50,
        "clock": "1d"
      }
    ],
    "risk": {
      "kind": "atr_bracket",
      "timeframe": "base",
      "atrPeriod": 14,
      "atrStopMult": 1.5,
      "riskReward": 1.8,
      "maxHoldHours": 36
    },
    "sizing": { "riskFraction": 0.1, "leverage": 1 },
    "entryPolicy": { "maxEntriesPerUtcDay": 2 },
    "feeBps": 13,
    "allowLong": true,
    "allowShort": true,
    "reverseOnOpposite": false
  },
  "data": {
    "provider": "pyth",
    "frames": {
      "base": {
        "interval": "1h",
        "lookbackDays": 600,
        "ticker": "Crypto.BTC/USD"
      },
      "high": {
        "interval": "1d",
        "lookbackDays": 600,
        "ticker": "Crypto.BTC/USD"
      }
    }
  },
  "executionPolicy": {
    "schemaVersion": 1,
    "entryMode": "taker",
    "routineExitMode": "taker",
    "emergencyExitMode": "taker",
    "emergencyExitReasons": ["stop"],
    "maker": {
      "ttlSeconds": 180,
      "offsetBps": 0,
      "entryMaxAttempts": 2,
      "routineExitMaxAttempts": 2,
      "routineExitFallbackSeconds": 420
    },
    "costs": {
      "hizzFeeBps": 5,
      "strikeMakerFeeBps": 0,
      "strikeTakerFeeBps": 8
    }
  }
}
```

## ETH 4h trend trailing

This example follows established four-hour EMA separation only during expanding
volatility. Entries are passive; both routine and emergency exits are taker
orders so a trailing exit is not left waiting in the book.

```json theme={null}
{
  "name": "ETH 4h trend trailing example",
  "thesis": "Follow established four-hour ETH trends only during expanding volatility and manage exits with ATR-scaled initial and trailing stops.",
  "frequency": "medium",
  "definition": {
    "schemaVersion": 1,
    "slug": "example-eth-4h-trend-trailing",
    "symbol": "ETH-USD",
    "trigger": {
      "kind": "trend_continuation",
      "timeframe": "base",
      "fast": 20,
      "slow": 50,
      "thresholdBps": 12,
      "clock": "4h"
    },
    "filters": [
      {
        "kind": "atr_expansion",
        "timeframe": "base",
        "atrPeriod": 14,
        "slowPeriod": 50,
        "clock": "4h"
      }
    ],
    "risk": {
      "kind": "atr_trailing",
      "timeframe": "base",
      "atrPeriod": 14,
      "atrStopMult": 2.5,
      "trailAtrMult": 3,
      "maxHoldHours": 240
    },
    "sizing": { "riskFraction": 0.15, "leverage": 1 },
    "entryPolicy": { "maxEntriesPerUtcDay": 1 },
    "feeBps": 13,
    "allowLong": true,
    "allowShort": true,
    "reverseOnOpposite": true
  },
  "data": {
    "provider": "pyth",
    "frames": {
      "base": {
        "interval": "4h",
        "lookbackDays": 600,
        "ticker": "Crypto.ETH/USD"
      }
    }
  },
  "executionPolicy": {
    "schemaVersion": 1,
    "entryMode": "maker",
    "routineExitMode": "taker",
    "emergencyExitMode": "taker",
    "emergencyExitReasons": ["stop"],
    "maker": {
      "ttlSeconds": 180,
      "offsetBps": 0,
      "entryMaxAttempts": 2,
      "routineExitMaxAttempts": 2,
      "routineExitFallbackSeconds": 420
    },
    "costs": {
      "hizzFeeBps": 5,
      "strikeMakerFeeBps": 0,
      "strikeTakerFeeBps": 8
    }
  }
}
```

## Validate a copied example

Use the code-block copy button, save the JSON as a local file, then validate it:

```bash theme={null}
curl -X POST https://hizz.io/api/v1/ai-trading/strategies/validate \
  -H "Content-Type: application/json" \
  --data-binary @my-strategy.json
```

The validator returns the normalized strategy and the exact node graph. Inspect
the graph before changing the file so you can see which module and cable each
JSON section creates.

## Safe modifications to try first

<AccordionGroup>
  <Accordion title="Change the market without inventing a ticker" icon="coins">
    Change `definition.symbol` and every direct historical `ticker` together.
    Use a market/provider pair returned by Hizz coverage rather than guessing a
    Pyth namespace.
  </Accordion>

  <Accordion title="Change one timeframe" icon="clock">
    Update the frame `interval`, the trigger/filter `clock` labels, and any
    holding period that was expressed for the old cadence. Then validate and
    retest; changing 1h to 4h creates a different strategy.
  </Accordion>

  <Accordion title="Stress costs" icon="coins">
    Increase `feeBps` for a uniform stress test, or update the maker/taker cost
    fields in `executionPolicy`. Do not count maker rebates on exits that are
    configured as taker orders.
  </Accordion>

  <Accordion title="Reduce exposure" icon="shield-halved">
    Lower `sizing.riskFraction` or leverage. Remember that `riskFraction` is
    allocated margin, not a guaranteed maximum loss percentage.
  </Accordion>
</AccordionGroup>

## Keep an experiment log

For every variant, record the JSON version, data provider, timeframe, date
range, fee assumptions, symbol, trade count, return, realized payoff, maximum
drawdown, and whether the result was in-sample, walk-forward, or paper. That
record makes a result reproducible and reduces selection bias.
