Technical Analysis
When to use
Activate when a user wants a technical read on a DSE stock: "analyze the chart for GP",
"is BEXIMCO technically bullish?", "what do RSI and MACD say?", "run technical analysis".
This skill is the technical leg of the dual-mode signal — pair it with momentum-screen
for trade setups, or feed its score into signal-synthesizer.
What it does
Implements the six-member Technical Committee plus a Chair (PRD-002 FR-AG-2, FR-AG-13..18):
- Trend — 50/150/200 SMA stack, price vs 200-day, ADX trend strength (+DI/-DI).
- Momentum & Oscillator — RSI(14), MACD, ROC(12), MFI(14).
- Chart Pattern — breakout/breakdown vs 40-bar range, consolidation tightness.
- Candlestick — hammer, shooting star, bullish engulfing on the latest bars.
- Levels — 60-bar support/resistance, distance-to-support, range position.
- Volume & Flow — OBV slope (accumulation/distribution), relative volume vs 20-day avg.
The Chair aggregates members with the weights in scripts/analyze.py (WEIGHTS), notes
agreement vs conflict (e.g. "pattern bullish but volume not confirming → downgraded"), and
downgrades confidence when members disagree. Output is a Thinking Card (see suite README).
How to run
# input must follow the suite data contract and include at least 30 OHLCV bars
python3 scripts/analyze.py --input data.json --pretty
cat data.json | python3 scripts/analyze.py
Reads ohlcv (required, ≥30 bars; ≥200 for full MA stack), optional microstructure
(flags circuit-limit / floor-price conditions) and mode. Returns score (-1..+1),
confidence (0..1), rating, sub_scores per member, key_metrics, and reasoning.
Try it now with the shared fixture:
python3 scripts/analyze.py --input ../_fixtures/sample_input.json --pretty
Interpreting output
score ≥ 0.5strong_bullish,0.15..0.5bullish,-0.15..0.15neutral, etc.- Low
confidencewith achair_noteabout conflict means members disagree — treat as "stand aside" rather than a weak buy. flagscarry confidence penalties (e.g.limited_history_<200_bars,microstructure_circuit_or_floor) — never silently dropped.
Notes
Indicator math lives in scripts/indicators.py (pure Python, reusable). Formula definitions
and DSE-specific caveats are in references/INDICATORS.md.
Output is educational analysis only, never financial advice.