PO_TIMEFRAME
๐ฆ 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
The candle period, in seconds, for all market data the bot consumes.
| Type | int (seconds) |
| Default | 60 |
| Required | No |
| Maps to | BotConfig.timeframe |
| Read in | main.py (build_config()) |
What it does
build_config() parses the value with int(env("PO_TIMEFRAME", "60")). A non-integer value (e.g. 1m or 60.5) raises ValueError and crashes at startup โ there is no fallback.
The value flows into src/bot.py in four places:
- Warmup history size โ
start()converts the warmup candle count to seconds of history:warmup_offset = effective_warmup * cfg.timeframe, then callsclient.get_candles(asset, timeframe, warmup_offset). With defaults, 60 candles ร 60 s = 3600 s of history. - Live candle subscription โ
_candle_stream()passestimedelta(seconds=cfg.timeframe)tosubscribe_symbol_time_aligned(orsubscribe_symbol), so the stream delivers one completed candle per period. - Dataset label horizon โ
_load_dataset()computeslabel_horizon = max(1, int(cfg.default_expiry / max(cfg.timeframe, 1))), i.e. how many candles ahead the training label looks. With defaults, 300 / 60 = 5 candles. Atimeframeof0is guarded bymax(timeframe, 1)here but would still produce a zero warmup offset and a nonsensical subscription. - Startup banner โ logged as
Timeframe: %ds.
Valid values
A positive integer number of seconds that PocketOption supports as a candle period (e.g. 60, 300). The bot does not validate against a list; unsupported values fail at the API level.
Examples
export PO_TIMEFRAME=60$env:PO_TIMEFRAME = '60'# .env
PO_TIMEFRAME=60Interactions
PO_DEFAULT_EXPIRYdivided byPO_TIMEFRAMEsets the dataset label horizon โ change one and you change how training labels are generated.PO_DATASETmust contain candles of this same timeframe for pre-training labels to be meaningful (the bot cannot verify this).- The
warmup_candlescount itself is a config-only field:warmup-candles. - Real environment variables override
.envvalues (see index).
See also
๐ฌ Unsure how this interacts with the rest of the configuration? Ask in the Chipa Discord โ or prototype strategies no-code with ChipaEditor.