signal_confirmations

πŸ¦‰ 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

Requires N consecutive candles to produce the same predicted direction before the bot will trade. With the default of 1, a single closed candle’s signal is enough β€” trading is effectively instant.

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

Typeint
Default1
FieldBotConfig.signal_confirmations
Consumed insrc/bot.py (AITradingBot._check_signal_ready, _trade_loop)

What it does

After the confidence, indicator-alignment, and other gates pass, _trade_loop calls _check_signal_ready(direction, confidence, candle_ts) with the timestamp of the latest candle. The logic in src/bot.py:

  1. One vote per unique candle. If the latest recorded signal already has the same candle_ts, the method returns False immediately β€” the current candle has already voted, and the bot waits for the next closed candle. Confirmation counting is per unique candle timestamp, not per poll iteration (the loop polls every poll_interval seconds, many times per candle).
  2. The (candle_ts, direction, confidence) tuple is appended to a signal history, trimmed to the last signal_confirmations * 3 entries.
  3. If fewer than signal_confirmations signals are recorded, it logs πŸ“‘ Signal building: X/N candles agree on call and returns False.
  4. The last signal_confirmations entries must all match the current direction; mixed directions log πŸ“‘ Signal not confirmed β€” mixed directions … and return False.
  5. On success it logs βœ… Signal CONFIRMED: call xN candles avg_conf=…% and returns True; the trade proceeds and the history is cleared.

The history is also cleared whenever a signal fails the confidence gate (confidence < min_confidence) or the overconfidence gate (confidence > max_confidence), so confirmation streaks only build across candles that individually pass those gates.

With signal_confirmations = 1, step 4 trivially passes on the first qualifying candle: instant trading with one closed candle.

Valid values

Any positive integer. 1 (default) = no multi-candle wait. 2–3 = require a short streak of agreeing candles β€” fewer trades, filtering one-candle noise, at the cost of entering later (each extra confirmation delays entry by one timeframe period, 60 s by default).

Examples

# src/config.py
signal_confirmations: int = 2           # two consecutive candles must agree
from src.config import BotConfig
cfg = BotConfig(ssid="...", signal_confirmations=2)

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.