ForexBestRobots V305 · regression prior20 · strategy120

NUMERIC REPRODUCTION · Python3.12+ standard library
Research material, not an EA or a broker backtest. From the extracted root:
python3 authoring/calculate.py
python3 authoring/verify_independently.py
python3 authoring/check_boundaries.py

Reconstructs 375702 retained USD/JPY M1 observations, 6265 H1 bars, exact
prior20 OLS channels, ATR14, 200 first daily candidates, both models, fills
and 0/2/4-pip cost scenarios. The second program imports no primary
calculation helper: separate grouping, centered direct-window Fraction fits,
explicit squared residuals, 80-digit roots/weighted ATR and Fraction metrics.
Synthetic boundary fixtures test arithmetic only, never market candles.
Both programs were authored by the same assistant, not externally certified.

IMMUTABLE PROTOCOL · saved before the first replay · SHA-256
9f6b61739b90f75d2255c73942b64a07f05529c071e75d5ecabaa65304f9361e
The supplied JSON protocol is authoritative. Previously studied 2024 quotes
are not an unseen holdout or future validation. Original daily archives were
not downloaded again; retained source hashes are included.

INPUT AND FIT
Minute labels are UTC interval ends, previously shifted -1h from fixed GMT+1.
M1 opens at end-60. H1 groups are (start,end]. Price integers are millionths
of JPY per USD; divide by 1000000. One pip=10000 units=0.01 JPY/USD.
Missing bars are not invented. Retained partial hours advance calculations.
For signal i, fit ONLY C[i-20]..C[i-1] at x=0..19. OLS slope b, intercept a,
projected centre mu=a+20b. SSE is the training squared-residual sum.
s=sqrt(SSE/20); boundaries=mu +/-2s. R2=1-SSE/SST for SST>0, unavailable
on constant closes. A perfect nonconstant line has valid zero RMS. No epsilon
or clipping. This width is not sqrt(SSE/18), raw-close SD, or MetaTrader's
maximum-close-deviation drawing width. No 95-percent containment claim.

RULES
First numerical closing breakout per weekday, H1 ends 07:00-15:00 UTC inclusive,
February-December; January initializes. Long above upper, short below lower,
strict comparisons via exact signed and squared distance. Equality and wicks
alone are not candidates. No extra previous-close-cross condition. First
candidate consumes its date BEFORE quality, ATR, risk, fit, next-open or busy
checks; no replacement. Require 21 complete adjacent local H1 hours, without
repairing older recursive ATR history. Filter adds R2>=0.50 AND direction*b>0;
baseline omits only these two conditions. Fit conditions share price inputs,
not independent confirmation. R2 threshold equality passes; flat slope fails.
ATR14 seeds with the first14 TR mean, then Wilder smoothing. Risk=1.5ATR
rounded UP to .001 JPY/USD;10-80pips inclusive. Exact next M1 only. Stop1R,
target2R,4 clock hours,one position/model. Opening priority: observed-open
stop, fixed-target valuation (no favorable improvement), time exit, conditional
held-gap valuation. Intraminute stop/target tie: stop first. Flag every missing
held minute even when higher-priority exit acts. Unknown path unverified.
Intraminute exits have null exit_t and an interval; no invented second.
Opening-exit final display shows only known open, not later minute range.

RESULTS AND DISPLAY
At2pips: baseline151 trades,+10.11514738146002R; filtered23,+5.718945648655314R.
Closed-trade drawdown falls from9.916181076922483R to2.922581220982682R, while
TOTAL R ALSO FALLS. Filtered11net winners,12net losers. First retained trade
is the first net LOSS; do not replace with the later first winner. The first
winner's observed open crosses target, but valuation stays at fixed target.
Neither model has held gaps,truncation or same-minute double-touch here.
At4pips baseline=-1.1409872272491466R,filtered=+3.963186083844227R. Costs deduct
once from same fills,not measured historical bid/ask,commission,slippage,swap.
R sums are not account returns,equity,capital drawdown or a sizing model.
23trades,single pair and reused year do not establish a reliable future edge.
64boundary fixtures and separate indicator/decision/fill/metric checks pass.

H1 rolling curves use each hour's own prior20 fit. The separate fixed-fit
figure uses ONE frozen20-close fit for all residuals, with signal excluded
at x20. Before signal close, selected direction,decision,planned risk and full
components are hidden. H1 never shows E/S/T or outcome. M1 only for entries;
result appears at observed exit. No joining curves over missing observations.

SHA256.json covers all packaged members except itself. Data,programs and
frozen identity contain no account connection or credentials. Reference
sources appear in the article; the exact trading model is defined here.
