Skip to main content
Hizz strategies are declarative JSON files assembled from approved modules. You describe the market, signal, filters, risk, sizing, data, and execution policy; Hizz validates the file and compiles the same rules into a backtest graph and an agent runtime. Strategy files never contain JavaScript, Python, callbacks, shell commands, private keys, or arbitrary network requests.

Download the canonical template

Start with the live schema returned by Hizz.

Browse complete examples

Read and copy breakout, mean-reversion, and trend-following JSON.

What you will build

Every directional strategy has this pipeline:
The ports are typed. Market data emits candles, triggers emit a directional bias, filters emit a gate, risk emits a bracket, and sizing emits a position. Hizz rejects unknown modules, missing inputs, and incompatible connections instead of silently changing the strategy.

1. Create a minimal file

Save the following as my-btc-strategy.json:
This file uses one base timeframe, one trigger, no optional filters, and one risk module. It is the best shape for a first validation because every added module creates another assumption that must be tested.

2. Understand the top-level fields

schemaVersion must currently be 1. Use a lowercase, hyphenated slug and keep it stable after a strategy is published so links and backtest records do not change identity.

3. Choose a trigger

Exactly one trigger is required. For every fast/slow pair, fast must be lower than slow. thresholdBps is measured in basis points: 100bps = 1%.

4. Add filters only when they have a job

Filters are combined as gates. An entry is allowed only when the trigger and all configured filters agree.
Available filter kinds are ema_trend, macd_rsi, atr_expansion, volume_surge, and bollinger_middle_break. If a filter references high, the matching data.frames.high frame must exist.

5. Define exits and sizing

Choose one risk block:
sizing.riskFraction is the fraction of strategy capital allocated as margin. It is not the percentage of the account guaranteed to be lost at the stop. Leverage multiplies notional exposure and fee dollars.
For atr_bracket, riskReward is the configured initial target distance divided by the initial stop distance. It is not the realized average-win to average-loss ratio. Timeouts, reversals, gaps, fees, and unfilled maker orders can make the realized payoff very different.

6. Select valid market data

The execution symbol and historical ticker use different namespaces: Do not turn an arbitrary equity ticker into Crypto.TICKER/USD. Hizz only backtests explicit market/provider mappings. Current mapped crypto examples include ADA, BTC, ETH, HYPE, NEAR, NIGHT, SOL, XRP, and ZEC. The market picker and API return the available provider coverage for each Strike symbol. Supported intervals:
  • Pyth: 1m, 2m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 12h, 1d, 1w, 1M
  • Binance: 1m, 5m, 15m, 30m, 1h, 2h, 4h, 1d
  • Strike: 1m, 3m, 5m, 15m, 30m, 1h, 2h, 4h, 6h, 8h, 12h, 1d, 3d, 1w, 1M

7. Add maker/taker execution when needed

Without an executionPolicy, Hizz validates the strategy with conservative taker defaults. A post-only strategy can declare passive entries and routine exits while keeping hard stops as taker orders:
Maker means post-only intent, not guaranteed execution. A historical candle cannot reproduce queue position, cancellation latency, or every missed fill. Keep current venue fees in your own assumptions instead of copying an old example indefinitely.

8. Validate the file

A successful response contains:
If validation fails, fix every item in issues. Do not remove an unknown module and assume the remaining strategy means the same thing.

9. Inspect the compiled graph

Open the visual module workbench and compare your composition with a published strategy. Every cable should connect matching input/output data types. Hover a node for its responsibility; select it to inspect parameters, ports, and immediate upstream/downstream modules.

10. Backtest and review

The anonymous v1 API runs bounded simulations for published slugs. Private strategies saved under My Strategy can be backtested in the authenticated Hizz application. Review several non-overlapping windows and stress the fee assumption instead of selecting the single best period. Before any live use, check:
  • enough trades to interpret win rate and payoff
  • maximum drawdown and mark-to-market equity, including open-position PnL
  • realized average win/loss, not only configured riskReward
  • maker/taker costs, missed-fill risk, leverage, and minimum order size
  • long-only, short-only, and both-direction behavior separately
  • paper results after the historical test window
Validation proves that a file matches the runtime contract. A backtest proves only what the rules did on the selected historical data and assumptions. Neither is evidence that a strategy is safe or will be profitable.

Use Codex or another AI to help

Give the agent the live OpenAPI document and a bounded task:
An AI should return a file for review, not authority to move funds. Saving, deploying, and arming an agent remain authenticated human actions.