Expand description
§indicators — Technical Indicators + Market Regime Detection
Unified crate combining:
- Signal layers (ported from
indicators.py): VWAP, EMA, ML SuperTrend, Trend Speed, Liquidity Profile, Confluence Engine, Market Structure, CVD, AO, Hurst, Price Acceleration. - Regime detection: Indicator-based, HMM, and Ensemble detectors.
- Standalone batch functions:
ema(),sma(),atr(),rsi(),macd().
§Quick start — signal engine
ⓘ
use indicators::{Indicators, ConfluenceEngine, LiquidityProfile, MarketStructure,
CVDTracker, VolatilityPercentile, SignalStreak, compute_signal,
settings::BotSettings};
let s = BotSettings::btc();
let mut ind = Indicators::new(&s);
let mut liq = LiquidityProfile::new(s.liq_period, s.liq_bins);
let mut conf = ConfluenceEngine::new(s.conf_ema_fast, s.conf_ema_slow,
s.conf_ema_trend, s.conf_rsi_len, s.conf_adx_len);
let mut ms = MarketStructure::new(s.struct_swing_len, s.struct_atr_mult);
let mut cvd = CVDTracker::new(s.cvd_slope_bars, s.cvd_div_lookback);
let mut vol = VolatilityPercentile::new(200);
let mut streak = SignalStreak::new(s.signal_confirm_bars);
// per-candle update
ind.update(&candle);
liq.update(&candle);
conf.update(&candle);
ms.update(&candle);
cvd.update(&candle);
vol.update(ind.atr);
let (raw, _) = compute_signal(candle.close, &ind, &liq, &conf, &ms, &s, Some(&cvd), Some(&vol));
if streak.update(raw) { /* confirmed signal */ }§Quick start — regime detection
ⓘ
use indicators::EnsembleRegimeDetector;
let mut det = EnsembleRegimeDetector::default_config();
det.update(high, low, close);
if det.is_ready() { println!("{}", det.regime()); }Re-exports§
pub use confluence::ConfluenceEngine;pub use cvd::CVDTracker;pub use engine::Indicators;pub use liquidity::LiquidityProfile;pub use settings::BotSettings;pub use signal::SignalComponents;pub use signal::SignalStreak;pub use signal::compute_signal;pub use structure::MarketStructure;pub use vol_regime::MarketRegimeTracker;pub use vol_regime::PercentileTracker;pub use vol_regime::VolatilityPercentile;pub use functions::IndicatorError;pub use functions::atr;pub use functions::ema;pub use functions::macd;pub use functions::rsi;pub use functions::sma;pub use functions::true_range;pub use functions::ATR;pub use functions::EMA;pub use functions::IndicatorCalculator;pub use functions::StrategyIndicators;pub use primitives::ADX;pub use primitives::BollingerBands;pub use primitives::BollingerBandsValues;pub use primitives::RSI;pub use router::ActiveStrategy;pub use router::AssetSummary;pub use router::DetectionMethod;pub use router::EnhancedRouter;pub use router::EnhancedRouterConfig;pub use router::RoutedSignal;pub use types::MarketRegime;pub use types::RecommendedStrategy;pub use types::RegimeConfidence;pub use types::RegimeConfig;pub use types::TrendDirection;
Modules§
- confluence
- Confluence Engine.
- cvd
- Layer 8 — Cumulative Volume Delta (OHLCV heuristic).
- engine
- Core Indicators Engine — Layers 1–4, 9–11.
- functions
- Standalone batch indicator functions and incremental structs.
- liquidity
- Layer 5 — Liquidity Thermal Map.
- primitives
- Technical Indicators for Regime Detection
- router
- Enhanced Strategy Router
- settings
BotSettings— typed replacement for Python’sDEFAULT_SETTINGS_*dicts.- signal
- Signal aggregator — combines all 11 layers into a single trading signal.
- structure
- Layer 7 — Market Structure + Fibonacci Engine.
- types
- Core domain types:
Candle, market regime classification, regime config. - vol_
regime - Volume-regime helpers: rolling percentile tracker, volatility regime classifier, and a simple MA-slope market regime classifier.
Structs§
- Ensemble
Config - Configuration for ensemble detector
- Ensemble
Regime Detector - Ensemble regime detector combining indicator-based and HMM methods.
- Ensemble
Result - Result from ensemble detection
- Ensemble
Status - Status information for monitoring / dashboards
- HMMConfig
- Configuration for HMM regime detector
- HMMRegime
Detector - Hidden Markov Model for regime detection.
- Regime
Detector - Main indicator-based regime detection engine.