Expand description
Pure on-demand market-state and price-level snapshots. On-demand analytical snapshots over chronological OHLCV bars. These are pure computations: no provider, persistence, strategy scheduling or UI dependencies. Callers provide finite input bars and applicable volume data. Timestamp values are not inspected. Output enums/fields preserve the existing consumer wire representation with the serde feature.
Structs§
- Activity
Reading - Cheat
Sheet Level - Cheat
Sheet Reading - Fear
Gauge Reading - Fear
Greed Reading - Month
Statistics - What the completed observations of one calendar month say.
- Monthly
Return - One calendar month’s return, measured close to close across the month boundary.
- Price
Summary - Regime
Reading - Seasonality
Report - Monthly seasonality of a price series: what each calendar month did, historically.
- Trend
Persistence Reading - Trend
Reading
Enums§
- Cheat
Sheet Level Kind - Cheat
Sheet Level Side - Fear
Gauge State - Fear
Greed Driver - Fear
Greed State - Market
Phase - Five-step market phase. “Strong” means the regime vote also calls it
Trending, not just that direction is non-flat — a directional move inside aRangingread (still choppy, just currently drifting) is the plainUp/Down. - Position
Alignment - Regime
State - Trend
Direction - Trend
Persistence Direction - Trend
Persistence Sensor - Which of the four sensors currently drives (
driver) or drags down (drag) the composite score, to explain a change of the score. - Trend
Persistence State
Functions§
- activity_
reading atr_percentileis the caller’s already-computedPriceSummary::atr_percentile.use_volumetoggles the volume component;windowbounds how far back “recent history” reaches for the volume percentile.- atr_
distance - Unsigned price distance in ATR units; unavailable for a non-positive ATR.
- cheat_
sheet - Price levels around the last close, from the last
windowbars (120 for 0, at least 2, at most all).Nonefor fewer than 2 bars, a window without range, or a non-positive last close. - classify_
trend_ regime - Classifies the regime from
bars(oldest first).Noneuntil enough bars exist to seed all three measures.adx_lenalso drives the ADX smoothing window (Wilder default: both 14);windowis the lookback for Choppiness and the Efficiency Ratio. - fear_
gauge_ reading - Reads the current fear/complacency state from
bars(oldest first, current bar last).Noneuntil enough bars exist to seed the WVF window and its spike band (WVF_LEN + BAND_LEN - 1). - fear_
greed_ reading - Instrument sentiment
0..=100from five component scores, each0..=100and 50 while its reading is missing: - monthly_
seasonality - Computes the monthly seasonality of a bar series.
- position_
alignment - price_
summary - Builds the summary from
bars(oldest first).atr_lenis the Wilder ATR period,stop_multthe ATR multiple for the suggested stop.Nonefor fewer thanatr_len + 1bars. - trend_
persistence_ reading - Reads the current trend-persistence state from
bars(oldest first, current bar last).Noneuntil enough bars exist to seed the four sensors’LEN-bar window, theSMOOTH_LEN-bar composite smoothing, and theAdxindicator’s own warmup. - trend_
reading - Direction from a smoothed price’s slope over
lenbars (kind/jma_phase/jma_powerselect the kernel), combined withregime’s trend/range vote into a 5-step phase.deadband_pctis the minimum|slope_pct|to call itUp/Downinstead ofFlat— keeps noise from flipping direction every bar.Noneuntil the kernel has publishedlen + 1values, or for a zero reference value;slope_pct = 100 · (s_last / s_(last-len) - 1)over those published values.