{
  "id": "audusd-kama-h4-adx14-v1",
  "frozen_on": "2026-11-12",
  "frozen_before": "All new AUDUSD source ZIP acquisition, indicator and performance calculation; only provider documentation and one download-page metadata probe were inspected beforehand.",
  "source_plan_library_file_id": "libfile_fde3_f-0e357bed062481918433d2ca5bf35bd1_4aaf69fd96c4819197b87d875abd2c30",
  "question": "Do KAMA10,2,30 price crosses gated by ADX14>=25 differ from a prespecified EMA30+ADX comparator in rapid recrosses and net outcomes after explicit FX costs?",
  "market": "AUD/USD, HistData Generic ASCII M1 Bid OHLC; hypothetical USD-denominated FX contract account, not a reconstruction of a broker account or physical currency holdings.",
  "source": {
    "name": "HistData Generic ASCII M1",
    "specification": "https://www.histdata.com/f-a-q/data-files-detailed-specification/",
    "source_timezone": "Fixed EST UTC-05:00 without DST; convert to UTC by adding5h.",
    "raw_years": [
      2019,
      2020,
      2021,
      2022,
      2023,
      2024,
      2025
    ],
    "raw_fields": "semicolon YYYYMMDD HHMMSS;BidOpen;BidHigh;BidLow;BidClose;volume_placeholder",
    "volume": "Source has no meaningful consolidated trading volume; do not treat its placeholder as measured volume.",
    "integrity": "Retain original ZIPs privately, ZIP CRC, computedSHA256, exactCSV identity and acquisition manifest; no provider-published checksum or redistribution license is claimed.",
    "publication": "Publish original analytics and selected illustrative/resampled observations with source attribution; do not bundle the full original M1 ZIP database. Reproducibility package includes original code, protocol, acquisition instructions and source hashes; raw archives must be obtained separately from the provider."
  },
  "warmup_start_utc": "2019-06-01T00:00:00Z",
  "bar_seconds": 14400,
  "execution_seconds": 60,
  "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,
  "price_precision": "Parse source decimal prices exactly to integer millionths of USD/AUD; reject nonzero precision finer than1e-6, rather than silently round. Indicators convert to floating arithmetic only after exact source differences.",
  "aggregation": "UTC H4 buckets at00,04,08,12,16,20. Aggregate all observed M1 Bid rows within a bucket, retaining first/last source times and row count. Retain partial session/holiday buckets, flag sparse coverage; never invent flat minutes/candles. Bucket ts is its UTC anchor, not a claim a quote existed at that anchor. H4 values become available only at anchor+14400.",
  "kama": {
    "er_length": 10,
    "fast_period": 2,
    "slow_period": 30,
    "seed": "SMA of first10 observed H4 closes at index9; first adaptive update index10, requiring10 close changes/11closes.",
    "er": "abs(C_t-C_(t-10))/sum(abs(close changes over exactly10 changes)); numerator/denominator use exact source integer differences. If denominator0 defineER0; exact numerator=denominator givesER1.",
    "sc": "[ER*(2/3-2/31)+2/31]^2",
    "update": "KAMA_t=KAMA_prev+SC_t*(C_t-KAMA_prev). A zero one-bar price change does NOT generally freeze KAMA; it continues moving toward price unless price equals priorKAMA.",
    "precision": "No rounding or epsilon in trading comparisons."
  },
  "ema": {
    "length": 30,
    "seed": "SMA of first30 observed H4 closes, thenalpha2/31",
    "comparator_scope": "A prespecified fixed EMA30, not a lag-matched or signal-frequency-matched average. The comparison does not isolate adaptivity at equal effective smoothing."
  },
  "adx": {
    "length": 14,
    "threshold": 25,
    "comparison": ">=",
    "dm": "UpMove=currentH-previousH;DownMove=previousL-currentL. +DM=UpMove only if UpMove>DownMove andUpMove>0; -DM analogously; ties both0. First source bar DM=0. Exact integer source differences.",
    "tr": "FirstTR=H-L; thereafter max(H-L,abs(H-previousC),abs(L-previousC)).",
    "smoothing": "Seed ATR,+DMmean,-DMmean with first14 observed values atindex13; then Wilder(13*prior+current)/14. DI=100*smoothedDM/ATR; ifATR0 definebothDI0. DX=100*abs(DIplus-DIminus)/(DIplus+DIminus), zero sum→DX0. FirstADX mean of first14 finiteDX (indices13..26), thenWilder14.",
    "role": "ADX gates strength, not direction; no DI directional gate, rising-ADX gate or additional filter."
  },
  "atr_length": 14,
  "atr_seed": "Same WilderATR14 as ADX denominator; signalATR mustbe positive.",
  "crossing": "Two actual H4 bucket anchors must be exactly14400seconds apart; no price-cross signal across missing UTC H4 buckets, including the weekend. Bull:previousClose<=previousMA andcurrentClose>currentMA. Bear:previousClose>=previousMA andcurrentClose<currentMA. Current equality fails; previous equality qualifies. Indicator recursion still continues over observed bars.",
  "primary_signal": "When flat at the completed H4 decision cutoff, use KAMA crossing direction and contemporaneousADX14>=25. No waiting for later ADX confirmation.",
  "entry": "Immediate next scheduled H4 opening (the signal cutoff), requiring an actual source M1 row exactly at that timestamp. Missing opening or out-of-period entry cancels; no deferred entry. Long buys modeledAskOpen+slippage; short sells BidOpen-slippage.",
  "fresh_signal": "No same-opening re-entry after an old position exits at that opening. A position exited before the decision cutoff, including within the preceding minute or exactly at its completed close, may use a fresh H4 signal at that cutoff. A within-minute exit anchored at the cutoff is not yet flat at the opening.",
  "account": {
    "initial_cash": 10000,
    "currency": "USD",
    "one_position": true,
    "long_and_short": true,
    "risk_fraction": 0.01,
    "maximum_notional_to_equity": 1,
    "quantity": "qAUD=min(.01*preentryEquity/Lunit,preentryEquity/(entryFill+commissionPerAUD)); fractionalAUD allowed; historical lot size/minimum order and broker margin closeout not reconstructed.",
    "cash_bookkeeping": "Contract notional is collateral/exposure, not cash spent buying AUD. Debit entrycommission from balance; mark direction*q*(liquidationBidOrModeledAsk-entryFill), then subtract accrued financing. At exit credit directional pricePnL minus exitcommission and financing.",
    "Lunit": "Dprice+slippagePrice+2*commissionPerAUD, the nominal stop loss before unknown future financing. Financing and opening gaps may exceed this planned1% stop budget.",
    "net_pnl": "direction*q*(exitFill-entryFill)-2*q*commissionPerAUD-q*carryPricePerUnit*rolloverUnits",
    "net_r": "netPnL/(q*Lunit)"
  },
  "exits": {
    "stop_atr_multiple": 2,
    "target_price_stop_multiple": 2,
    "max_holding_h4_slots": 30,
    "levels": "Dprice=2*signalATR. LongSL=entry-Dprice,T=entry+2Dprice; shortSL=entry+Dprice,T=entry-2Dprice. Require positive finite levels and keep fixed. No KAMA/EMA/ADX or opposite-cross exit.",
    "quotes": "Long exits trigger on sourceBid; short exits on modeledAsk=Bid+scenarioSpread. Opening checks before minute high/low. Opening beyond stop/target uses actual observed opening reference, with adverse exit slippage.",
    "minute_order": "Scan all observed M1 rows from entry. If both barriers touch inside one minute while its opening is between them, ordering is unresolved: stop-first primary and target-first bound. No inferred tick path. Missing earlier minutes are flagged, not filled.",
    "deadline": "Earliest of entry+30*14400, nextFriday17:00 America/New_York, orperiodEnd. Barrier exits before timed liquidation. Time and weekly close use the source minute closing at the exact deadline when present (modeled closing execution); otherwise first later available opening, checking opening barriers before timed exit and before that later minute range. Never use quotes beyond the evaluated period; period-end terminal fallback uses last observed in-period close and explicitly records its source time.",
    "tie_priority": "After barriers, time deadline first, thenweek_close, thenperiod_end if cutoffs tie. No indicator-driven exit.",
    "event_precision": "Intraminute barrier exit is an interval[minuteStart,minuteStart+60), not a tick. Opening and modeled completed-minute close events remain distinct."
  },
  "pip_size": 0.0001,
  "costs": {
    "baseline": {
      "spread_pips": 1.0,
      "slippage_pips_per_leg": 0.1,
      "commission_usd_per_100000_aud_per_leg": 3.5,
      "carry_pips_per_rollover_unit": 0.2
    },
    "higher_cost": {
      "spread_pips": 2.0,
      "slippage_pips_per_leg": 0.2,
      "commission_usd_per_100000_aud_per_leg": 7.0,
      "carry_pips_per_rollover_unit": 0.4
    },
    "zero_cost": {
      "spread_pips": 0,
      "slippage_pips_per_leg": 0,
      "commission_usd_per_100000_aud_per_leg": 0,
      "carry_pips_per_rollover_unit": 0
    },
    "spread_scope": "Ask OHLC are modeled as Bid+constant scenario spread, not observed Ask or historical spread reconstruction. Slippage is a separate adverse price adjustment; commission is fixed USD perAUD traded on each side.",
    "financing": "Explicit research debit for both directions, not actual historical swaps or interest credits: Monday-Friday17:00 America/New_York, Wednesday3units and other weekdays1. No weekend cutoffs or holiday value-date calendar. Charge when entryTime<cutoff and position remains open aftercutoff. Exact open/close exit atcutoff does not incur thatcutoff; an intraminute exit whose interval starts atcutoff does. Entry atcutoff doesnot pay the preceding interval. Financing is accrued in H4 equity and paid in nettradePnL."
  },
  "variants": [
    "primary",
    "no_adx",
    "ema30",
    "zero_cost",
    "higher_cost"
  ],
  "variant_rules": {
    "no_adx": "Remove only ADX>=25 from identical KAMA crossing; ATR still validpositive.",
    "ema30": "Replace KAMA with EMA30 in the crossing only; keepADX>=25,ATR,execution,costs,holding and sizing. EMA30 isnotlagmatched.",
    "zero_cost": "Primary signal with spread/slippage/commission/carry allzero; resimulate levels, quantities and trade calendar.",
    "higher_cost": "Primary signal with higher-costscenario; resimulate levels, quantities and trade calendar."
  },
  "passive_reference": "Cash-only USD reference earns0 and stays10000. Do not present a leveraged/short FX buy-and-hold as risk matched.",
  "diagnostics": {
    "fixed_quantity_costs": "At primary original dates, source Bid entry/exit references, direction and originalqAUD, reprice Bid/Ask and slippage then recost commissions/carry forzero/base/higher costs; do not shift triggers, levels, dates or quantities. Report ledgerPnL, not account-return percentage.",
    "gap_exclusion": "Remove flagged gap-affected trades at original quantities, report retained ledgerPnL, not resimulated return or an avoidable real-time filter.",
    "cross_events": "ForKAMA andEMA30 separately count every valid adjacent bullish/bearish crossing with positiveATR, ignoring flatstate, whose decisioncutoff lies in the evaluated period (include equalstart,exclude equalend). Recordbefore/afterADX>=25,undefinedADX,side and exact next-minute availability. Year=decision-cutoff year.",
    "rapid_recross_proxy": "Ex-post descriptive proxy only: price crosses the same MA in the opposite direction within the next3 scheduledH4 buckets (12h). Classify only when all3 future buckets and their required MA inputs exist and their cutoffs are<=periodEnd; otherwisecensor, evenif a partial reversal was seen. No ADX gate on the opposite cross. Report rates among complete windows, separatelybefore/afterADX, with numerator/denominator/censoredcounts. These dependent candidate events are not funded trades, true/false signal labels, causal evidence, or a future trading filter."
  },
  "equity": "Mark at observed H4 bucket cutoffs using sourceBidClose for long or modeledAskClose forshort, entrycommission and financing accrued through thatcutoff; exitcommission/slippage charged at actual modeled exit only. Include initial10000 as opening peak. H4 sampling is not continuous intraminute drawdown. Annual attribution uses native H4 bucket-opening year, evenif cutoff nextyear.",
  "exposure": "Observed H4 bucket occupancy (position held at any time), not exact elapsed time. Holding slots count elapsed scheduled4h intervals, including any quote gaps.",
  "source_gaps": "Retain all source gaps. Separate gaps entirely outside the modelSunday17-to-Friday17 NewYork weekly session from unobserved in-session minutes, without asserting whether missing quotes mean feed failure or no updates. Trades spanning unobserved open-session minutes are flagged.",
  "gallery": "First completed earlyaccount trade, first completed lateraccount trade, then first later trade with opposite netPnL sign; otherwise next later trade, otherwise explicitly unavailable. H4 charts show sourceBid with modelAsk exit references distinguished forshorts. M15 exit panels use the relevant liquidation quote side, aggregating only complete15minute groups from actual sourceBid (Ask shifted by scenarioSpread when needed); modeledAsk never labeled observedAsk.",
  "later_trade_sample_warning_below": 30,
  "sources": [
    "https://chartschool.stockcharts.com/table-of-contents/technical-indicators-and-overlays/technical-overlays/kaufmans-adaptive-moving-average-kama",
    "https://www.tradingview.com/support/solutions/43000589099-average-directional-index-adx/",
    "https://www.histdata.com/f-a-q/data-files-detailed-specification/"
  ]
}
