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.
| Type | int (seconds) |
| Default | 300 (5 minutes) |
| Field | BotConfig.cooldown_seconds |
| Consumed in | src/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 streakfrom src.config import BotConfig
cfg = BotConfig(ssid="...", cooldown_seconds=900)Interactions
max_consec_lossesโ the trigger; its counter resets when the cooldown starts.PO_MAX_DAILY_LOSSโ separate, longer-acting daily dollar stop.
See also
๐ฌ Unsure how this interacts with the rest of the configuration? Ask in the Chipa Discord โ or prototype strategies no-code with ChipaEditor.