skip_volatile_regime

🦉 AthenaAI is an AI-powered ensemble machine-learning trading bot for PocketOption, built on BinaryOptionsToolsV2Get it on GitLab
💬 Need help? Join the Chipa Discord · ⚡ Go no-code with ChipaEditor

Hard gate that skips every trade cycle while the regime detector classifies the market as VOLATILE. Disabled by default — the ML ensemble and adaptive strategy are left to decide.

This field has no environment variable — to change it, edit the default in src/config.py or construct BotConfig yourself.

Typebool
DefaultFalse
FieldBotConfig.skip_volatile_regime
Consumed insrc/bot.py (AITradingBot._trade_loop)

What it does

Each trade-loop iteration detects the current regime and, if this flag is set, blocks volatile markets before any prediction is made:

regime = self.regime_detector.detect(candle_list, self.cfg.regime_window)
if self.cfg.skip_volatile_regime and regime == Regime.VOLATILE:
    # diagnostic: "⏸ Volatile regime — skipping"
    continue

RegimeDetector.detect (src/core/regime.py) computes the standard deviation of per-candle returns over the last regime_window candles (default 30) and returns Regime.VOLATILE when that volatility exceeds 0.0008 (thresholds calibrated for 1-minute EURUSD). Otherwise it returns trending-up/down or ranging based on the normalized linear-regression slope (±0.0003).

With the default False, volatile regimes are not hard-blocked. Instead:

  • The regime label is still fed to the ensemble context, logged with each trade, and stored in the journal.
  • The AdaptiveStrategy (src/trading/strategy.py) learns per-regime win rates from actual results and will itself block any regime (including volatile) whose win rate drops below 48% over at least 15 trades — a data-driven version of this flag.

Valid values

True or False. Set True for a hard, unconditional filter; leave False (default) to let the adaptive layer block volatile conditions only if they actually lose.

Examples

# src/config.py
skip_volatile_regime: bool = True       # never trade volatile markets
from src.config import BotConfig
cfg = BotConfig(ssid="...", skip_volatile_regime=True)

Interactions

  • regime_window sets the detection window, and so how quickly the regime label reacts.
  • The adaptive strategy’s regime blocking works independently and remains active either way.

See also

💬 Unsure how this interacts with the rest of the configuration? Ask in the Chipa Discord — or prototype strategies no-code with ChipaEditor.