PO_MAX_DAILY_LOSS
🦉 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 daily stop-loss, in dollars. Once the day’s net P&L falls to or below minus this amount, the bot stops opening new trades until the next UTC day.
| Type | float ($) |
| Default | 300.0 |
| Required | No |
| Maps to | BotConfig.max_daily_loss |
| Read in | main.py (build_config()) |
What it does
build_config() parses it with float(env("PO_MAX_DAILY_LOSS", "300.0")) — a non-numeric value raises ValueError and crashes at startup.
The value is enforced by MoneyManager (src/trading/money_manager.py):
- Every resolved trade’s profit or loss is added to
daily_pnlviaMoneyManager.record(pnl), called from_result_checker()insrc/bot.py. - On every loop iteration,
_trade_loop()callsmoney_mgr.can_trade(), which returnsdaily_pnl > -cfg.max_daily_loss. When it returnsFalsethe loop skips trading and periodically logs⏸ Daily loss limit reached. can_trade()first callsreset_if_new_day(): when the UTC calendar date changes,daily_pnlresets to0.0(loggingNew day — resetting daily P&L tracker) and trading resumes automatically.
Details worth knowing:
- The check is strict: trading stops when
daily_pnl <= -max_daily_lossexactly, e.g. at −$300.00 with the default. - The limit gates new trades only — a trade already open when the limit is hit still runs to expiry, so the actual daily loss can overshoot by up to one stake.
daily_pnllives in memory only. Restarting the bot resets it to zero, which effectively lifts the day’s stop-loss.- P&L is computed with an assumed payout of 0.85: a win adds
stake * 0.85, a loss subtracts the full stake.
Valid values
A positive dollar amount. 0 (or negative) makes can_trade() false from the first check (0 > 0 fails), so the bot never trades — not a useful setting.
Examples
export PO_MAX_DAILY_LOSS=150$env:PO_MAX_DAILY_LOSS = '150'# .env
PO_MAX_DAILY_LOSS=300Interactions
- Loss size per trade is bounded by
PO_MAX_STAKEand floored byPO_BASE_STAKE; with defaults the daily stop equals three max-stake losses or twelve base-stake losses. - Independent of the consecutive-loss cooldown (
max-consec-losses,cooldown-seconds), which pauses temporarily rather than for the day.
Risk note: binary options trading can lose money, and past performance does not guarantee future results. This is your primary daily circuit breaker — set it to an amount you can afford to lose, and remember a restart clears the counter.
See also
💬 Unsure how this interacts with the rest of the configuration? Ask in the Chipa Discord — or prototype strategies no-code with ChipaEditor.