min_wait_between_trades

๐Ÿฆ‰ 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

Enforces a minimum pause, in seconds, after each trade is placed before the bot may place another.

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

Typeint (seconds)
Default60
FieldBotConfig.min_wait_between_trades
Consumed insrc/bot.py (AITradingBot._trade_loop)

What it does

When a trade is placed, src/bot.py records self._last_trade_time = time.time(). On every subsequent loop iteration this gate runs early, before any prediction:

elif self._last_trade_time > 0 and now - self._last_trade_time < self.cfg.min_wait_between_trades:
    wait_left = int(self.cfg.min_wait_between_trades - (now - self._last_trade_time))
    reason = f"Wait between trades ({wait_left}s left)"

While active, the diagnostic log (at most every 30 s) shows e.g. โธ Wait between trades (42s left). The timer is measured from trade entry, not from resolution, and applies even if the previous trade already resolved.

Separately, the AdaptiveStrategy can impose an extra cooldown on top of this during cold streaks: 120 s extra when the recent-10 win rate is below 40%, 300 s when below 30% (get_extra_cooldown() in src/trading/strategy.py). That extra wait is also measured from _last_trade_time and is checked immediately after this gate.

Valid values

Any non-negative integer (seconds). 0 disables the pause (the max-concurrent-trades gate still applies). With the default 60-second timeframe and 60-second wait, at most about one trade per candle is possible.

Examples

# src/config.py
min_wait_between_trades: int = 180      # at least 3 minutes between entries
from src.config import BotConfig
cfg = BotConfig(ssid="...", min_wait_between_trades=180)

Interactions

  • max_concurrent_trades โ€” with the default of 1 pending trade, the effective spacing is often the trade expiry (120โ€“600 s), longer than this wait.
  • cooldown_seconds is a different, loss-triggered pause; both can be in force at once.
  • Adaptive cooldown (src/trading/strategy.py) adds up to 300 s on losing streaks.

See also

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