Methodology
Methodology Reference
Every number the engine produces, derived from first principles.
This document serves two purposes: it is the implementation spec for packages/engine, and it is the source content for the public /methodology documentation pages. If a calculation isn't in this document, the engine doesn't do it.
Companion to THRESHER-DESIGN.md. Version 1.0.
Docs site structure (each Part I/II section below = one page):
/methodology → overview + pipeline diagram
/methodology/indicators/{slug} → sma, ema, macd, rsi, atr, adx, obv,
relative-volume, bollinger, pivots
/methodology/engine/{slug} → families, weights, composite, confidence,
stops, targets, gates, sizing
/methodology/example → worked end-to-end trade derivation
/methodology/limitations → what this engine cannot see
Pipeline overview
Everything flows one direction. No step can reach backward.
OHLCV bars (per timeframe)
│
▼
[Part I] Indicators ───── pure math on bars; no opinions yet
│
▼
[Part II] Signal families ─ each indicator's reading becomes a scored,
│ directional vote with a written reason
▼
Composite score S ──────── weighted sum of family scores
│
▼
Direction ──────────────── long / short / none (threshold on S)
│
▼
Confidence C ───────────── base from |S|, minus itemized penalties
│
▼
Trade plan ─────────────── stop from structure, target from structure,
│ R:R from those two
▼
Refusal gates G1–G5 ────── trade emitted only if all pass;
otherwise: which gate failed, and why
Conventions used throughout: C_t = close of bar t, H_t/L_t/V_t = high/low/volume, n = lookback period. "Bar" means one unit of the selected timeframe (1 h, 1 d, or 1 w).
Part I — Indicators
I.1Simple Moving Average (SMA)I.2Exponential Moving Average (EMA)I.3MACD (Moving Average Convergence Divergence)I.4Relative Strength Index (RSI, Wilder)I.5Average True Range (ATR, Wilder)I.6Average Directional Index (ADX, with +DI / −DI)I.7On-Balance Volume (OBV)I.8Relative VolumeI.9Bollinger Bands and %BI.10Pivot Support & Resistance (fractal method)
Part II — Determination
II.1Signal familiesII.2Weights and the compositeII.3Direction thresholdsII.4ConfidenceII.5Stop placementII.6Target selectionII.7The refusal gatesII.8Position sizing (advisory)
Appendix