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.
| Type | int |
| Default | 1 |
| Field | BotConfig.signal_confirmations |
| Consumed in | src/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:
- One vote per unique candle. If the latest recorded signal already has the same
candle_ts, the method returnsFalseimmediately β 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 everypoll_intervalseconds, many times per candle). - The
(candle_ts, direction, confidence)tuple is appended to a signal history, trimmed to the lastsignal_confirmations * 3entries. - If fewer than
signal_confirmationssignals are recorded, it logsπ‘ Signal building: X/N candles agree on calland returnsFalse. - The last
signal_confirmationsentries must all match the current direction; mixed directions logπ‘ Signal not confirmed β mixed directions β¦and returnFalse. - On success it logs
β Signal CONFIRMED: call xN candles avg_conf=β¦%and returnsTrue; 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 agreefrom src.config import BotConfig
cfg = BotConfig(ssid="...", signal_confirmations=2)Interactions
PO_TIMEFRAMEsets the candle period, hence the real-time cost of each confirmation.PO_MIN_CONF/PO_MAX_CONFβ failing these gates clears the confirmation history.min_wait_between_tradesapplies after the trade, independently of confirmations.
See also
π¬ Unsure how this interacts with the rest of the configuration? Ask in the Chipa Discord β or prototype strategies no-code with ChipaEditor.