"""
Central configuration for the AI Trading Bot core engine.
Phase 1 scope: indicators, candlestick patterns, price action, confidence scoring.
No broker / live order logic lives here yet.
"""

# --- Confidence score weights (must sum to 100) ---
CONFIDENCE_WEIGHTS = {
    "trend": 20,
    "price_action": 20,
    "volume": 15,
    "option_chain": 15,   # placeholder score fed in externally until Phase 4 (options module)
    "indicators": 15,
    "news": 10,           # placeholder score fed in externally until news module exists
    "global_market": 5,   # placeholder score fed in externally until global market module exists
}

assert sum(CONFIDENCE_WEIGHTS.values()) == 100, "Confidence weights must sum to 100"

# Minimum total confidence required to take a trade
MIN_CONFIDENCE_TO_TRADE = 90

# Risk management
RISK_REWARD_RATIO = 3          # 1:3
MAX_TRADES_PER_DAY = 1

# Indicator periods (tune later against backtest results)
EMA_PERIODS = (9, 21, 50, 200)
SMA_PERIODS = (20, 50, 200)
RSI_PERIOD = 14
ADX_PERIOD = 14
ATR_PERIOD = 14
MACD_FAST, MACD_SLOW, MACD_SIGNAL = 12, 26, 9
STOCH_RSI_PERIOD = 14
CCI_PERIOD = 20
ROC_PERIOD = 12
MOMENTUM_PERIOD = 10
CMF_PERIOD = 20
BOLLINGER_PERIOD, BOLLINGER_STD = 20, 2
DONCHIAN_PERIOD = 20
SUPERTREND_PERIOD, SUPERTREND_MULTIPLIER = 10, 3

# Swing detection (for market structure / BOS / CHoCH)
SWING_LOOKBACK = 3  # bars on each side to confirm a swing high/low
