# XTester article supporting example / Приложение к статье

Synthetic EMA(3) sensitivity diagnostic. Not an XTester run, broker simulation, exchange dataset or investment advice.
Учебный расчёт EMA(3) на синтетических данных. Это не запуск XTester, не биржевые данные и не модель исполнения сделок.

Run in a writable extracted directory with Python 3 (standard library only):
    python3 example.py

The script contains the fixed input series and REGENERATES example-input.csv,
example-decisions.csv and example-results.json next to itself. It does not read
an edited input CSV. Keep originals if you change the experiment.
Код содержит исходный ряд и перезаписывает CSV/JSON рядом с собой. Изменение CSV
не меняет расчёт: для нового опыта нужно менять CLOSE в копии кода.

Inputs: 12 hourly synthetic candles, 2026-01-01, close values
80,80,80,80,80,80,100,100,99,101,98,102.
Warmup lengths: 2,4,8 candles, including the first-price seed.
Evaluation candle opens: [08:00,12:00) UTC; close decisions: 09:00..12:00 UTC.
No trading-state changes during warmup. Initially flat. EMA is not reset at the window boundary.
Alpha=0.5. Update EMA, then enter when Close>EMA and flat; exit when Close<EMA
and long; equality retains state. No fills, fees, sizing, balances or PnL.

Expected: maximum EMA gap (2 versus 8)=2.5, final gap=0.3125;
two differing actions, first at 09:00 UTC. Four and eight candles match only
on this series; this is not a universal warmup recommendation.

Files: example.py (code), example-input.csv (generated input table),
example-decisions.csv (12 decision rows), example-results.json (full results).
SHA256SUMS.txt covers these four frozen files and this README.
Source package: indicator-warmup-fixed-window-backtest, prepared 2026-11-06.
No dependency downloads, network access or credentials are required.
