{
  "id": "eurjpy-aroon-h4-ema200-v1",
  "frozen_on": "2026-11-12",
  "frozen_before": "Before acquisition or reading/processing any EURJPY source prices for this new Aroon study and before any indicator or performance computation for it. Previous unrelated EURJPY research exists but has not been used for this specification.",
  "source_plan_library_file_id": "libfile_fde3_f-0e357bed062481918433d2ca5bf35bd1_4aaf69fd96c4819197b87d875abd2c30",
  "question": "Does an Aroon25 Up/Down crossing with a directional EMA200 gate produce useful net outcomes compared with its no-EMA ablation and a prespecified price/EMA200 crossing comparator?",
  "market": "EUR/JPY, HistData Generic ASCII M1 Bid OHLC; hypothetical JPY-denominated FX contract account, not physical EUR holdings, not a broker reconstruction and not converted into USD.",
  "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; prices JPY per EUR",
    "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.",
    "normalization": "Verify7annualZIPs2019–2025 and CSV identity/CRC; retain originalbytes and computed SHA256. Sort by fixedEST+5h UTC. At repeatedtimestamps retain one row only when the complete source row bytes are identical; preserve every repetition in the audit. Conflicting repetitions fail, with no discretionary quote selection. Reject invalid OHLC/precision. No source DST reinterpretation."
  },
  "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 JPY/EUR; reject nonzero precision finer than1e-6 rather than silently round. All extrema use exactintegers; EMA/ATR use floating arithmetic 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.",
  "atr_length": 14,
  "atr_seed": "TRfirstH-L;thenmax(H-L,abs(H-prevObservedClose),abs(L-prevObservedClose));seed mean first14observedTR atindex13;thenWilder(13prior+current)/14. SignalATR must be positive.",
  "crossing": "Two consecutive actual H4 bucket anchors exactly14400secondsapart; no signal bridges missing H4 buckets/weekends. BullAroon:previousUp<=previousDown,currentUp>currentDown;bear:previousUp>=previousDown,currentUp<currentDown. Previous equality allowed,current equality fails. Indicator windows recurse over observed bars across gaps.",
  "primary_signal": "When flat at completed H4 cutoff, bullishArooncross AND currentClose>EMA200 forlong;bearishArooncross AND currentClose<EMA200 forshort;ATR14positivefinite and indicatorsdefined. No50/70/30or100confirmation gate, no waitingforlaterEMAconfirmation.",
  "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": 1000000,
    "currency": "JPY",
    "one_position": true,
    "long_and_short": true,
    "risk_fraction": 0.01,
    "maximum_notional_to_equity": 1,
    "quantity": "qEUR=min(.01*preentryEquityJPY/Lunit,preentryEquityJPY/(entryFillJPYperEUR+commissionJPYperEUR)); fractionalEUR allowed;1xnotional-to-equitycap. Historical minimumlot/margincloseout not reconstructed.",
    "cash_bookkeeping": "Contract EURnotional is collateral/exposure, not cash spent buyingEUR. Balance/equity and allcommissions/financing/P&L areJPY. Debit entrycommission; mark direction*qEUR*(liquidationBidOrModeledAsk-entryFill)-accruedfinancing. At exit credit directionalpricePnL minus exitcommission andfinancing. No USD conversion or third-pair return is used.",
    "Lunit": "Dprice+slippagePrice+2*commissionJPYperEUR, nominal stoploss before unknownfuturefinancing; financing and gaps can exceed planned1%stoprisk.",
    "net_pnl": "direction*qEUR*(exitFill-entryFill)-2*qEUR*commissionJPYperEUR-qEUR*carryJPYperEURPerUnit*rolloverUnits",
    "net_r": "netPnLJPY/(qEUR*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 Aroon/EMA 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.01,
  "costs": {
    "baseline": {
      "spread_pips": 2.0,
      "slippage_pips_per_leg": 0.2,
      "commission_jpy_per_100000_eur_per_leg": 500.0,
      "carry_pips_per_rollover_unit": 0.5
    },
    "higher_cost": {
      "spread_pips": 4.0,
      "slippage_pips_per_leg": 0.4,
      "commission_jpy_per_100000_eur_per_leg": 1000.0,
      "carry_pips_per_rollover_unit": 1.0
    },
    "zero_cost": {
      "spread_pips": 0,
      "slippage_pips_per_leg": 0,
      "commission_jpy_per_100000_eur_per_leg": 0,
      "carry_pips_per_rollover_unit": 0
    },
    "spread_scope": "Onepip=.01JPY/EUR. AskOHLC modeledBid+constant scenario spread, not observedAsk/historicalspread. Slippage separateadverseJPY/EUR adjustment; commissionfixedJPYperEUR on eachleg, notUSD or percentage.",
    "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_ema",
    "ema_only",
    "zero_cost",
    "higher_cost"
  ],
  "variant_rules": {
    "no_ema": "Remove only the directional price/EMA200 gate from identical Aroon crosses; ATR/clock/exits/sizing/costs unchanged.",
    "ema_only": "Use adjacent price/EMA200 crosses instead ofAroon:previousClose<=previousEMA,currentClose>currentEMA forlong;inverseforshort;noArooncondition. KeepATR/execution/costs/exits/sizing. Separate one-position calendar. This changes the entrytrigger and cadence, so it doesnot isolate causal addedinformation at matchedentrytimes,lag orfrequency.",
    "zero_cost": "Primarysignal with all4costassumptionszero; resimulatefills,levels,quantity andtradecalendar.",
    "higher_cost": "Primarysignal with all4costassumptionsdoubled; resimulatefills,levels,quantity andtradecalendar."
  },
  "passive_reference": "Cash-only JPYreference remains1000000 with nointerest. No FX buy-and-hold is labeledriskmatched; no accountcurrencyconversion is required.",
  "diagnostics": {
    "fixed_quantity_costs": "At primary original dates, source Bid entry/exit references, direction and originalqEUR, 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. All P&L is JPY, with scenario commissionJPYperEUR andcarryJPYperEUR.",
    "gap_exclusion": "Remove flagged gap-affected trades at original quantities, report retained ledgerPnL, not resimulated return or an avoidable real-time filter.",
    "cross_events": "ForAroon andprice/EMA200 separately,count every adjacent directional cross withpositiveATR regardlessofaccountoccupancy, whose completeddecisioncutoff is in period[start,end). ForAroon recordbefore/afterdirectionalEMA gate, side,undefinedEMA andexact nextM1openingavailability;EMApricecross alreadyselectsdirectionbyprice. Year=decisioncutoffyear. Thesearedependentcandidates,notfundedtrades orknownfalse signals.",
    "rapid_recross_proxy": "Expostdescriptiveonly: oppositecross ofsame trigger (AroonUp/Down forAroon;price/EMA200 forEMAonly) within next3scheduledH4slots/12h. Requireall3futurebuckets and requiredindicatorinputs andcutoffs<=periodEnd;otherwisecensor evenifpartialreversalseen. NoEMA gateonoppositeAroonrecross. Reportnumerator,eligible,censored before/afterEMA. Differenttriggers/cadences notcausalisolation,notentrytimeinformation or a futurefilter.",
    "equal_extrema": "For evaluated H4bar decisioncutoffs in[start,end), reporthigh/low tied-extremumwindows,windowswheremostrecentvsoldestchoice changesAroon, and candidatecrossdifferences underoldesttiechoice. This is a descriptivediagnostic,notan additional fundedaccount or an ex-post policy switch. Primaryalwaysusesmostrecentties."
  },
  "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 initial1000000JPY 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": "Firstcompletedearlyaccounttrade,firstcompletedlateraccounttrade,andfirstlatertradewithoppositenetPnLsign;else nextlatertrade;elseunavailable. H4sourceBid+EMA200pricepane,AroonUp/Down0–100pane with50orientationline(noentrygate),extremumage0–25pane. Ssignal,EsourceBidopening,Xliquidationreference;shortXmodeledAsk distinguished fromBidcandles/fills. M15detailsuseBidlong,modeledAskshort,onlycomplete15actualsourceM1groups. Neverinventcandle around an exit in an omittedM15group; sourceM1exit can still exist.",
  "later_trade_sample_warning_below": 30,
  "sources": [
    "https://www.tradingview.com/support/solutions/43000501801-aroon-indicator/",
    "https://www.tradingview.com/support/solutions/43000773004-aroon-oscillator/",
    "https://chartschool.stockcharts.com/table-of-contents/technical-indicators-and-overlays/technical-indicators/aroon",
    "https://www.histdata.com/f-a-q/data-files-detailed-specification/"
  ],
  "aroon": {
    "length": 25,
    "window_observed_bars": 26,
    "window": "Current observed H4 bar plus25previous observed H4 bars, indices[t-25,t]. Require all26observations before first value. Bar age is observed-bar index distance0..25, not elapsed UTC hours.",
    "extrema": "Use source Bid high and low integers. If highesthigh or lowestlow occurs morethanonce in the26barwindow, choose its most recent occurrence (smallest age).",
    "formula": "AroonUp=100*(25-ageHigh)/25=4*(25-ageHigh);AroonDown=4*(25-ageLow). Keep exact integer values0,4,...100; no rounded or epsilon trading comparisons.",
    "boundary": "Age0gives100,age25gives0;age12gives52andage13gives48. With this integer25intervalconvention,50isnotattained on H4 either. A flat26barwindow has bothmostrecentages0andUp=Down=100; neither direction gets a strict cross.",
    "interpretation": "Recency of extremes, not price-move magnitude, order flow, ADX or known future trend. The50line is chartorientation only, not an entrygate."
  },
  "ema": {
    "length": 200,
    "seed": "SMA of first200observed H4 closes atindex199; thenalpha2/201 over observed bars.",
    "trend_gate": "Long currentClose>currentEMA200;short currentClose<currentEMA200;exactequalityfails. No slope or extra confirmation gate."
  }
}
