{
  "id": "btc-mfi-h4-ema200-v1",
  "frozen_on": "2026-11-12",
  "source_plan_library_file_id": "libfile_fde3_f-0e357bed062481918433d2ca5bf35bd1_4aaf69fd96c4819197b87d875abd2c30",
  "market": "Binance BTCUSDT spot",
  "bar_seconds": 14400,
  "warmup_start_utc": "2019-06-01T00:00:00Z",
  "periods": {
    "full": [
      "2020-01-01T00:00:00Z",
      "2026-01-01T00:00:00Z"
    ],
    "early": [
      "2020-01-01T00:00:00Z",
      "2023-01-01T00:00:00Z"
    ],
    "later": [
      "2023-01-01T00:00:00Z",
      "2026-01-01T00:00:00Z"
    ]
  },
  "retrospective": true,
  "initial_cash": 10000,
  "mfi_length": 14,
  "mfi_threshold": 20,
  "mfi_previous_strictly_below": true,
  "mfi_current_at_or_above": true,
  "ema_length": 200,
  "ema_initialization": "SMA of first 200 closes; alpha=2/201 afterwards",
  "atr_length": 14,
  "atr_initialization": "First TR=H-L; SMA of first 14 TR; Wilder alpha=1/14 afterwards",
  "typical_price": "(H+L+C)/3",
  "mfi_flow_assignment": "Compare typical price to preceding observed bar; equal assigns neither flow",
  "zero_total_flow": "undefined; no signal",
  "entry": "Next scheduled bar open, multiplied by (1+slippage); cancel if the immediate next scheduled bar is absent",
  "long_only": true,
  "one_position": true,
  "leverage": 1,
  "stop_atr_multiple": 2,
  "target_price_stop_multiple": 2,
  "max_holding_bars": 30,
  "entry_bar_holding_count": 1,
  "risk_fraction": 0.01,
  "risk_unit_formula": "entry*(1+fee)-stop*(1-slippage)*(1-fee)",
  "quantity": "min(0.01*cash/risk_unit,cash/(entry*(1+fee)))",
  "net_r": "net pnl/(quantity*risk_unit)",
  "baseline_fee_per_leg": 0.001,
  "baseline_slippage_per_leg": 0.0005,
  "stress_fee_per_leg": 0.002,
  "stress_slippage_per_leg": 0.001,
  "variants": [
    "primary",
    "no_ema",
    "constant_volume",
    "zero_cost",
    "higher_cost"
  ],
  "passive_reference": true,
  "ambiguous_bar_resolution": "Replay native 1m candles for double-touch 4h bars; unresolved minute or missing replay data: stop first primary, target first bound",
  "gap_execution": "At an opening quote beyond a barrier use open, then adverse sell slippage. Opening checks precede intrabar ranges.",
  "end_exit": "Last observed bar close within each independent period, then adverse sell slippage",
  "equity_marking": "cash + open quantity * native 4h close; exit fee on liquidation only",
  "extra_conventions_before_calculation": {
    "indicator_gaps": "No synthetic bars. EMA/ATR recurse over observed bars; MFI uses the most recent 14 observed TP comparisons. Disclose gaps. Missing immediate next scheduled entry cancels the signal.",
    "reported_close_time": "Retain source metadata and anomalies. A close-based signal is available only at the scheduled four-hour cutoff, never at an earlier source-close metadata timestamp.",
    "minute_gap": "When a double-touch bar lacks any expected minute before resolving a barrier, treat ordering as unresolved and apply primary/bound convention.",
    "entry_bar": "Stop/target activate immediately after modeled purchase; raw opening quote is the first reference for newly active barriers.",
    "cash_precision": "Float arithmetic; clamp only residual cash in [-1e-8,0) to zero and record any larger discrepancy as an error.",
    "first_entry": "A warm-up bar whose scheduled cutoff equals the period start can supply the first in-period entry; the account starts flat and no earlier trades are simulated.",
    "holding_deadline": "Entry bar counts 1; deadline=entry_ts+30*14400. At the 30th scheduled close, exit; if that quote is missing, the first observed open after deadline is used, after opening barrier checks. Holding count uses scheduled H4 slots.",
    "source_gaps": "Flag any position carried across a missing native H4 bar; opening-gap execution remains a model assumption. Report an exclusion diagnostic for affected trades."
  },
  "later_trade_sample_warning_below": 30
}
