# =====================================================================
# AI GOLD BOT CENTRAL CONFIGURATIONS (.env.example)
# =====================================================================

# ---- Symbol & Multi-Timeframe Architecture ----
BOT_SYMBOL=XAUUSD
BOT_PRIMARY_TF=5M
BOT_SCOPES=5M,15M,30M
BOT_HTF_CONFIRM=15M,30M,1H,4H,1D

# ---- Loop & Execution Safety Guards ----
BOT_MAX_TRADES=2
BOT_MAX_SPREAD_POINTS=80
BOT_DEVIATION_POINTS=30
BOT_MAX_SL_PIPS=65.0
BOT_MAX_SL_DOLLARS=15.0       # Hard Dollar SL Ceiling — max $15.00 (150 pips) disaster cap on 0.01 lot

# ---- Enhanced Risk/Reward & Trade Management ----
BOT_BE_ATR=2.0
BOT_SCALP_BE_ATR=1.5          # 1.5R buffer gives trade room to breathe before moving to BE
BOT_PARTIAL_ATR=1.5           # Partial 50% booked at 1.5R so booked wins are meaningful
BOT_MAX_LOT_SIZE=0.20

# ---- Counter-Trend (CT) Trade Management ----
BOT_CT_BE_ATR=1.2             # CT BE trigger distance
BOT_CT_TARGET_ATR=1.8         # CT Hit & Run full exit target
BOT_CT_GUARD_PEAK=1.4         # Peak profit guard trigger
BOT_CT_GUARD_DROP=0.6         # Drop threshold from peak

# ---- Regime-Adaptive BE & Trail Factors ----
BOT_TRENDING_BE_FACTOR=1.5    # TRENDING: wider BE — let trend runners breathe
BOT_RANGE_BE_FACTOR=1.2       # RANGE: balanced BE
BOT_CHOPPY_BE_FACTOR=1.0      # CHOPPY: balanced BE

# ---- Centralized Dynamic Risk & Drawdown Engine ----
BOT_USE_KELLY=true
BOT_KELLY_FRACTION=0.25       # Fractional-Kelly multiplier applied to the positive Kelly edge (f*): 0.25 = Quarter-Kelly
BOT_MIN_RISK=0.01
BOT_MAX_RISK=0.02
BOT_DEFAULT_RISK=0.02
BOT_MAX_PORTFOLIO_RISK=0.25
BOT_HARD_LOSS_FLOOR=0.25
BOT_CONTRARIAN_RISK=0.25

# ---- News / AI (multi-provider LLM) ----
LLM_PROVIDER=groq,gemini
GROQ_MODEL=groq/compound
GEMINI_MODEL=gemini-2.5-flash-lite
BOT_NEWS_REFRESH_SEC=3600
# Optional real LLM-generated trade debrief in execution/journal_ai.py, persisted
# alongside (never instead of) the existing template lesson. Defaults to true here --
# fill in GROQ_API_KEY/GEMINI_API_KEY above for it to actually activate (silently
# stays template-only otherwise). See journal_ai.md SS5 for the design rationale
# (latency, cost, determinism); config.py's own code-level fallback (used only if
# this key is absent entirely) remains false.
BOT_ENABLE_LLM_JOURNAL=true

# ---- Observability Webhook ----
GROQ_API_KEY=
GEMINI_API_KEY=
DISCORD_WEBHOOK_URL=
