85161b4965
**H1 Bias Fix:** - Fixed cache check to ensure loop_count=1 always calculates H1 bias - Changed exception log from DEBUG to WARNING for visibility - Added log on first calculation (loop==1) in addition to every 4 loops - Result: H1 bias now correctly calculated from first candle **Filter Config Infrastructure (WIP):** - Added FilterConfigManager (src/filter_config.py) for dynamic filter control - Added data/filter_config.json with 11 entry filters (flash_crash, regime, risk, session, spread, h1_bias, ml_confidence, signal_combination, cooldown, time_filter, market_close) - Added API endpoints: GET/POST /api/filters/config - Note: Bot integration pending — requires wrapper around all filter checks Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
64 lines
1.7 KiB
JSON
64 lines
1.7 KiB
JSON
{
|
|
"filters": {
|
|
"flash_crash_guard": {
|
|
"enabled": true,
|
|
"name": "Flash Crash Guard",
|
|
"description": "Block entries during extreme price movements"
|
|
},
|
|
"regime_filter": {
|
|
"enabled": true,
|
|
"name": "Regime Filter",
|
|
"description": "Filter based on HMM regime detection"
|
|
},
|
|
"risk_check": {
|
|
"enabled": true,
|
|
"name": "Risk Check",
|
|
"description": "Daily/total loss limits validation"
|
|
},
|
|
"session_filter": {
|
|
"enabled": true,
|
|
"name": "Session Filter",
|
|
"description": "Trading session (Sydney/London/NY) validation"
|
|
},
|
|
"spread_check": {
|
|
"enabled": true,
|
|
"name": "Spread Check",
|
|
"description": "Block entries when spread too wide"
|
|
},
|
|
"h1_bias": {
|
|
"enabled": true,
|
|
"name": "H1 Bias Filter",
|
|
"description": "Multi-timeframe H1 EMA20 alignment (#31B)"
|
|
},
|
|
"ml_confidence": {
|
|
"enabled": true,
|
|
"name": "ML Confidence",
|
|
"description": "XGBoost confidence vs dynamic threshold"
|
|
},
|
|
"signal_combination": {
|
|
"enabled": true,
|
|
"name": "Signal Combination",
|
|
"description": "SMC + ML signal agreement check"
|
|
},
|
|
"cooldown": {
|
|
"enabled": true,
|
|
"name": "Cooldown Period",
|
|
"description": "Minimum time between trades (150s)"
|
|
},
|
|
"time_filter": {
|
|
"enabled": true,
|
|
"name": "Time Filter",
|
|
"description": "Block specific hours (#34A: skip 9,21 WIB)"
|
|
},
|
|
"market_close_guard": {
|
|
"enabled": true,
|
|
"name": "Market Close Guard",
|
|
"description": "Block entries near daily/weekend close"
|
|
}
|
|
},
|
|
"metadata": {
|
|
"updated_at": "2026-02-09T08:05:00+07:00",
|
|
"version": "1.0"
|
|
}
|
|
}
|