{
  "study": "BTC/USDT H4 Heikin Ashi and EMA200",
  "protocol_version": 1,
  "declared_before_results": true,
  "market": "Binance BTCUSDT spot",
  "quote_unit": "USDT",
  "timezone": "UTC",
  "data": {
    "warmup_start_utc": "2020-01-01T00:00:00Z",
    "exclusive_archive_end_utc": "2026-10-01T00:00:00Z",
    "intervals": ["15m", "4h"],
    "source": "https://data.binance.vision/data/spot/monthly/klines/BTCUSDT",
    "verify_publisher_sha256": true,
    "h4_construction": "Sixteen adjacent positive-volume M15 candles with standard close timestamps. Require exact aggregated OHLC equality with the publisher H4 archive. Record volume differences as diagnostics and retain the sum of M15 volume.",
    "unavailable_h4": "A missing, zero-volume, or nonstandard-duration M15 candle makes its H4 interval unavailable. Reset HA, EMA and ATR after an unavailable H4 interval. Require 200 consecutive complete H4 candles before a signal."
  },
  "pre_result_data_amendment": {
    "date": "2026-11-11",
    "original_protocol_sha256": "8c28464300713f0b2d79cbf30106d85b89d36a7bc4f906a255a9bbd21e2f705e",
    "reason": "Before calculating any strategy results, the archive comparison found four H4 intervals with volume-only differences. All complete aggregated OHLC values match. Volume magnitude is unused by the strategy. The data check now requires exact OHLC equality and reports each volume difference."
  },
  "periods": {
    "development": {
      "start": "2021-01-01T00:00:00Z",
      "end_exclusive": "2025-01-01T00:00:00Z"
    },
    "holdout": {
      "start": "2025-01-01T00:00:00Z",
      "end_exclusive": "2026-10-01T00:00:00Z"
    }
  },
  "indicators": {
    "ema_length": 200,
    "ema_source": "Real H4 close",
    "ema_seed": "SMA of the first 200 consecutive complete real H4 closes",
    "ema_alpha": "2/201",
    "atr_length": 14,
    "atr_source": "Real H4 OHLC. First true range is high minus low. Later true range includes the previous real close.",
    "atr_seed": "Mean of the first 14 true ranges, then Wilder recursion",
    "ha_seed": "First HA open = (real open + real close)/2",
    "ha_close": "(real open + real high + real low + real close)/4",
    "ha_open": "(previous HA open + previous HA close)/2"
  },
  "signals": {
    "common": "Evaluate only after a complete H4 close. Require real close strictly above EMA200.",
    "ordinary": "Real close > real open and previous real close <= previous real open",
    "heikin_ashi": "HA close > HA open and previous HA close <= previous HA open",
    "position_policy": "Long only. One position per arm. Ignore signals while that arm holds a position. Each arm follows its own signal calendar. After resolution, the next signal can occur at the close of the H4 candle containing that resolution.",
    "entry": "Next adjacent H4 open, taken from the first actual M15 candle. Reject an unavailable opening candle.",
    "period_boundary": "Entry must be inside its declared period and entry plus 120 hours must be strictly before that period's exclusive end."
  },
  "exits": {
    "stop_atr_multiple": "2",
    "target_atr_multiple": "3",
    "atr_snapshot": "ATR of the completed signal candle",
    "level_anchor": "Unslipped real entry reference",
    "maximum_holding_h4": 30,
    "time_exit": "Actual M15 open exactly 120 hours after entry, if neither price exit has resolved",
    "intrabar_order": "At each M15 candle check its open first. A gap through a stop or target exits at that open. Otherwise check low and high against the fixed levels.",
    "ambiguous_primary": "Stop first if both levels occur in one M15 candle and its open is between them",
    "ambiguous_sensitivity": "Target first for those same M15 candles",
    "missing_exit_data": "Mark outcome unavailable at the first unavailable M15 before resolution. Suppress further signals in that arm until the original 120-hour deadline."
  },
  "costs": {
    "base": {"fee_each_side": "0.001", "adverse_slippage_each_side": "0.0002"},
    "stress": {"fee_each_side": "0.002", "adverse_slippage_each_side": "0.0004"},
    "interpretation": "Declared hypothetical cost scenarios. Fees apply to modeled entry and exit notionals."
  },
  "measurement": {
    "one_r": "Two signal-bar ATR units in price, equal to entry reference minus fixed stop",
    "net_r": "For one theoretical BTC, subtract modeled entry cost and both fees from modeled sale proceeds, then divide by the initial price-risk distance",
    "path": "Cumulative closed-trade net R in chronological exit order",
    "drawdown": "Peak-to-trough fall of the cumulative closed-trade path in R",
    "account_sizing": "No account sizing, compounding or percentage-return claim"
  },
  "examples": {
    "positive": "First completed holdout HA trade with positive base-cost net R",
    "nonpositive": "First completed holdout HA trade with zero or negative base-cost net R"
  }
}
