{
  "id": "mpf-bitcoin-h4-williams-r-mfi-midline-20261116-v1",
  "status": "frozen_before_first_calculation_of_this_strategy",
  "frozen_at_utc": "2026-11-16T06:36:40.375259+00:00",
  "site_baseline": {
    "version": 375,
    "commit": "0bf0df9715c927251672124106f7832892f6c0cf"
  },
  "instrument": "Binance BTCUSDT spot",
  "direction": "long_only",
  "timeframe_seconds": 14400,
  "warmup_start": "2019-06-01T00:00:00Z",
  "price_scale": 100000000,
  "volume_scale": 100000000,
  "source_manifest": "source-manifest.json",
  "source_manifest_sha256": "c3cf9b07adbda9609ad23756050cf01ea305be9ed65fc1d2944ea41267496e30",
  "source_policy": "Read exactly the79 named original ZIPs; independently verify expected SHA256, matching CHECKSUM sidecar and archive CRC, one exact named CSV member and12 columns. Original source strings are preserved in normalized-source.csv. Reject duplicate anchors, nonpositive/nonfinite/invalid OHLC bounds, negative/nonfinite/nonrepresentable base volume, misaligned or nonintegral H4 anchors, timestamps outside named source month, and prices/volume not representable on the1e8 scales. Genuine zero volume is valid. Sort source rows by anchor after validating each archive order. Do not fabricate observations.",
  "timestamp_policy": "Detect1000 or1000000 source units by raw opening timestamp magnitude (>=100000000000000 means microseconds); require raw opening divisible by unit and normalized opening on UTC14400-second grid. Preserve original raw close timestamp. Canonical iff raw_close=(normalized_open+14400)*unit-1; do not round that comparison. Source close-label anomalies stay in evidence.",
  "indicators": {
    "reset": "A missing scheduled H4 anchor or noncanonical source close ends the indicator segment. Noncanonical rows have unavailable indicators and no new close signal. The next canonical row starts fresh. Canonical run lengths count actual adjacent canonical rows; volume zero and unavailable WR/MFI alone do not reset history.",
    "williams_r14": "Current-inclusive14 canonical rows. HH=max high_int, LL=min low_int. WR=-100*(HH-close_int)/(HH-LL). Range0 is unavailable. Preserve integer numerator/denominator; current WR>-50 iff2*C>HH+LL, previous WR<=-50 uses its own window. Previous unavailable WR blocks a crossing; no bridging. Exit WR<=-50 requires only a defined current canonical WR, not100-bar entry eligibility.",
    "mfi14": "TP=(H+L+C)/3. Last14 classified adjacent TP comparisons require15 prices. Compare exact z=H_int+L_int+C_int with prior z; current flow numerator=z*volume_int. Positive if z>prior z, negative if z<prior z, equal contributes neither. P and N are sums of14 nonnegative integer contributions. MFI=100P/(P+N), unavailable if total0; positive-only100, negative-only0. Filter MFI>50 is exact P>N. Volume is total venue BTC quantity, not quote/taker/signed/capital flow.",
    "constant_volume": "Construct a separate MFI replacing each strictly positive measured volume with exactly1 BTC (1e8 volume units), retaining source zeros. TP direction and windows stay fixed. All models retain real-data common eligibility; constructed unavailable MFI fails its diagnostic gate.",
    "atr14": "First TR=H-L in a canonical segment; later max(H-L,abs(H-Cprev),abs(L-Cprev)). Mean first14 TR using math.fsum seed; thereafter (13*previous+TR)/14 in binary64. Exact source integers determine all WR/MFI boundary comparisons; ATR/fills/accounts use unrounded binary64."
  },
  "common_entry_eligibility": "Current canonical run>=100; current positive ATR14; current and immediately preceding WR defined in same segment; current real MFI defined. Predecessor may have run99. Same eligibility for filtered, WR-only and constructed-volume models.",
  "primary_signal": "When flat after processing current interval events: previous WR<=-50 and current WR>-50 and exact real MFI>50. No EMA, -80 recovery, upper-zone exclusion or added trigger.",
  "control_signal": "Same common eligibility, crossing, exits, periods and account rules; remove only MFI>50. Separate cash calendar, not a subset of actual filtered fills.",
  "constant_volume_signal": "Same common real-data eligibility and WR crossing; require constructed MFI>50. Diagnostic only, base costs all3 periods.",
  "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"
    ]
  },
  "period_restarts": "Each [start,end) account starts independently flat with10000USDT. Carry continuous preperiod indicator history since warmup start subject to resets. A valid close signal on the immediately preceding scheduled candle may enter at start only at its exact scheduled observed opening. Missing scheduled opening cancels that entry; do not defer it. No positions/queued exits carry between periods. No new entry at/after end.",
  "initial_cash": 10000,
  "risk_fraction": 0.01,
  "max_positions": 1,
  "leverage": false,
  "holding_limit_intervals": 30,
  "base_costs": {
    "fee_each_side": 0.001,
    "slippage_each_side": 0.0005
  },
  "higher_costs": {
    "fee_each_side": 0.002,
    "slippage_each_side": 0.001
  },
  "zero_costs": {
    "fee_each_side": 0,
    "slippage_each_side": 0
  },
  "cost_scenarios": "Filtered and WR-only models each independently rerun full/early/later at base, zero and higher costs:18 account runs. Constructed-volume diagnostic at base for all3 periods:3 more. Fees on actual filled notionals; adverse slippage each side. No spreads/impact/order-book/live-fee reconstruction; cash interest0. No leverage, borrowing, shorting, pyramiding or target.",
  "entry": "Signal becomes available at scheduled H4 close open+14400. Queue only the immediately next scheduled observed opening. E=O*(1+s); SL=E-2*signal ATR14. Require0<SL<O and positive unit loss; reject already-breached/nonpositive protection. Do not use entry candle later close metadata to censor an available opening. Entries on a subsequently noncanonical bar remain, with quality flag.",
  "position_size": "Lunit=E*(1+f)-SL*(1-s)*(1-f); q=min(0.01*pre-entry cash/Lunit,pre-entry cash/(E*(1+f))). Charge entry fee immediately; cash never borrows. Continuous fractional BTC; historical lot/tick/notional constraints not reconstructed. Planned R denominator freezes q*Lunit. Stops gapped through can lose more than planned1%.",
  "event_priority": "For an existing position at each observed open:1 stop gap O<=SL;2 persistent queued WR exit;3 elapsed missed time deadline. An opening exit cannot reopen at that same open. When flat, execute only an eligible pending next-open entry. Then for surviving/new positions:4 intrabar low<=SL at SL;5 surviving scheduled holding-limit close;6 terminal period last available close. After interval events and marks, use only a valid completed close to queue next opening entry or exit. A new close signal following an intrabar/close exit may queue a following open.",
  "exit": "Fixed initial stop only, no trailing/target. WR<=-50 on any defined canonical completed close while held queues next-open liquidation, including entry interval. Once queued it persists until exit; missing next exit opening delays to first observed opening, retaining stop-gap priority. Deadline=entry_open+30*14400, counting scheduled slots including gaps, with entry interval1. Surviving observed30th interval exits at scheduled close; if deadline interval absent, first subsequent observed opening under declared priorities, flagged. Period end uses last available observed close within period; report its actual scheduled availability and flag a noncanonical or early terminal proxy. No tick path or exact within-H4 stop time is inferred.",
  "exit_prices": "Reference is raw observed opening for opening exits, fixed SL for intrabar stop, or observed source close for time/terminal close. Actual modeled X=reference*(1-s), then fee f*q*X. PnL=q*(X-E)-f*q*(E+X). Intrabar stop timestamp denotes interval start plus precision=within_4h, not an exact execution time. Open and scheduled-close event timestamps are modeled points; noncanonical close fills are explicitly partial/stale proxies.",
  "missing_path": "Held positions retain protection over gaps/noncanonical bars. Flag any trade covering a missing observed interval or a noncanonical row, including an opening exit before later metadata becomes known. Flags are retrospective diagnostics, never an executable avoidance filter. Missing paths remain unobservable; no interpolated bars.",
  "equity": "At every observed evaluation H4 scheduled close, mark cash+q*C*(1-s)*(1-f); after liquidation, cash. Initial cash participates in running peak. Maximum drawdown is sampled at these H4 close marks, not intrabar. Show return100*(terminal cash/initial-1), positive/negative/zero net trades, PF=sum positive netPnL/abs(sum negative netPnL) (null without losses), mean netR (null if no trades), total fees/slippage/turnover. Zero trades return0, drawdown0, null PF/meanR. No annualized return metric.",
  "exposure": "Observed-interval occupancy proxy includes each observed evaluation candle when already held at its opening or entered there, including an opening-exit interval. Divide by observed evaluation rows. Not elapsed-time, capital-weighted or exact tick exposure.",
  "annual": "Within a single independently funded account run, use last marked equity for each UTC calendar year divided by prior year last mark (initial cash for first). Includes mark-to-market open positions, costs and compounding, not sums of calendar trade PnL.",
  "benchmarks": "Cash0%; separate fully invested cash-funded buy-and-hold base-cost account for each full/early/later period, entry at first available opening and terminal last-close sale. No timing/risk equivalence; disclose differing exposure and dataset boundaries.",
  "candidate_diagnostics": "Record every common-eligible WR upward crossing, exact MFI filter sign, and model calendar states/actions. Count failed gate and already-held candidates separately. Trade count differences alone do not prove rejected trades were losses. Do not infer subset or sum account deltas as an isolated filter effect.",
  "example_selection": {
    "order": [
      "early",
      "later",
      "opposite"
    ],
    "early": "First chronologically completed filtered/base early-period trade.",
    "later": "First chronologically completed filtered/base later-period trade.",
    "opposite": "First later-period filtered/base trade whose strictly positive/negative netPnL sign is opposite to the first later example. This is an explicitly outcome-conditioned teaching illustration, not an unbiased performance sample.",
    "unavailable": "If any predicate has no example, show unavailable without an attractive substitute.",
    "context": "Display20 observed rows before signal through3 observed rows after exit; context availability never ranks examples. Mark S completed signal, E raw entry reference, X exit reference, SL fixed protection; actual modeled fills differ by stated adverse slippage."
  },
  "display": "Price2 decimals, WR/MFI2, base volume6, ATR/flows6; netR3. Display rounding never drives comparisons. WR axis fixed-100..0 and MFI axis0..100, both with-50/50 midlines. Even observed-index candle spacing, mark compressed calendar gaps and noncanonical rows, break unavailable indicator lines; fixed S/E/X/SL markers and axes while reader selection moves. Equity visual may sample the last observed mark per UTC day plus first/last; reported metrics use every H4 mark and downloadable replay reconstructs full curves.",
  "independent_verification": {
    "method": "Separate source loader, indicator implementation, event/account engine consuming only original ZIPs and frozen protocol/manifest; no primary implementation/indicator/signal ledger used to derive values. Main binary64 versus independent Decimal(50); exact discrete decisions and source/WR/MFI integer decisions.",
    "absolute_tolerances": {
      "price_atr_indicators": 1e-08,
      "account_cash_equity_pnl_fees": 1e-06,
      "btc_quantity": 1e-12,
      "dimensionless_metrics": 1e-08
    },
    "before_first_calculation": "Each implementation records its code SHA and protocol/manifest SHA before calculation. Any mismatch is investigated without changing parameters/periods; implementation fixes recorded."
  },
  "research_disclosure": "Retrospective reused historical data, dates and rules fixed before this new calculation; no parameter search/optimization/prospectively unseen-test or live-performance claim. MFI shares price inputs with WR and uses venue total BTC volume, not independent proof of capital flow.",
  "audited_dependencies": {
    "williams-guide": "3bf65c70f998363ebc9c89c676a4af8839c3e0de972c70145cc6de5f35a46f6f",
    "mfi-guide": "386e62ccb0f6901b755eb4106a5938dd5ec048757bbd3d2e686ec8a3080cbea3"
  },
  "sources": [
    "https://www.tradingview.com/support/solutions/43000501985-williams-r-r/",
    "https://www.tradingview.com/support/solutions/43000502348-money-flow-mfi/",
    "https://www.tradingview.com/support/solutions/43000501823-average-true-range-atr/",
    "https://github.com/binance/binance-public-data/blob/master/README.md"
  ]
}
