cooldown_seconds

๐Ÿฆ‰ AthenaAI is an AI-powered ensemble machine-learning trading bot for PocketOption, built on BinaryOptionsToolsV2 โ†’ Get it on GitLab
๐Ÿ’ฌ Need help? Join the Chipa Discord ยท โšก Go no-code with ChipaEditor

How long, in seconds, the bot pauses trading after hitting max_consec_losses consecutive losses.

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

Typeint (seconds)
Default300 (5 minutes)
FieldBotConfig.cooldown_seconds
Consumed insrc/bot.py (AITradingBot._trade_loop)

What it does

When the consecutive-loss check fires, the bot sets a wall-clock deadline:

self._cooldown_until = now + self.cfg.cooldown_seconds
log.warning("Hit %d consecutive losses โ†’ cooldown %ds", ...)

On every subsequent loop iteration, one of the early gates blocks trading until the deadline passes:

elif now < self._cooldown_until:
    reason = f"Cooldown ({int(self._cooldown_until - now)}s left)"

While active you will see (at most every 30 s) โธ Cooldown (212s left) in the log. During the cooldown the candle stream and result checker keep running โ€” only new trade entries are blocked; pending trades still resolve and still train the model.

This is distinct from two other pauses:

  • min_wait_between_trades: a fixed pause after every trade.
  • The adaptive cooldown (src/trading/strategy.py): 120โ€“300 s extra spacing between trades when the recent-10 win rate drops below 40%/30%.

Valid values

Any non-negative integer (seconds). 0 makes the loss-streak trigger a no-op pause (the counter still resets). Typical values: 300โ€“1800 (5โ€“30 minutes). Longer cooldowns also let market conditions change before the bot resumes.

Examples

# src/config.py
cooldown_seconds: int = 900             # 15-minute pause after a loss streak
from src.config import BotConfig
cfg = BotConfig(ssid="...", cooldown_seconds=900)

Interactions

See also

๐Ÿ’ฌ Unsure how this interacts with the rest of the configuration? Ask in the Chipa Discord โ€” or prototype strategies no-code with ChipaEditor.