YAML Metadata Warning:empty or missing yaml metadata in repo card
Check out the documentation for more information.
- π€ Bot Exnova AI
π€ Bot Exnova AI
Automated binary options trading bot with quantum-grade signal analysis, adaptive self-regulation, and real-time Telegram notifications.
π Table of Contents
- Overview
- Features
- Architecture
- Quick Start
- Configuration
- Telegram Notifications
- Auto-Regulation System
- Trading Modes
- Risk Management
- Project Structure
- API Reference
- Roadmap
π Overview
Bot Exnova AI is a fully automated trading bot for the Exnova binary options platform. It combines multiple technical analysis strategies (ICT, VA-MOD, RSI, Bollinger Bands, and more) with a reactive Auto-Regulation System that adapts parameters in real time based on performance β without requiring manual intervention.
All significant events (trade opens, wins, losses, emergency mode, daily summaries) are pushed instantly to your Telegram account so you always know what the bot is doing, even when you're away from your desk.
β¨ Features
Trading Engine
- Multi-strategy signal confluence β a trade is only entered when multiple strategies agree
- ICT (Inner Circle Trader) analysis β Order Blocks, Fair Value Gaps, Liquidity Sweeps, BOS, OTE, Pullback detection
- VA-MOD feed β Deriv real-price integration via dual-feed architecture
- Precise candle-entry timing β waits for optimal entry point within the candle
- Martingale & Soros recovery strategies (configurable)
Adaptive Intelligence
- 3-level auto-regulation β Normal β Cautious β Emergency, with automatic recovery
- Per-hour performance learning β optimal confidence levels per hour of day
- Per-asset performance learning β tracks which assets perform best for you
- Config snapshot & rollback β restores best settings after a bad streak
- A/B strategy testing β compare strategy variants in live conditions
Notifications
- Real-time Telegram alerts β trade opened, win, loss, emergency, daily summary
- Non-blocking β notifications never delay trade execution
- 4 notification levels β ALL / TRADES / ALERTS / CRITICAL
- Automatic retry β failed messages retried 3Γ with backoff
Reliability
- Circuit breaker β prevents rapid-fire reconnection loops
- Exponential back-off β 5s β 10s β 30s β 60s β 120s on errors
- Graceful shutdown β open trades are preserved on stop
- Emergency persistence β emergency-mode settings survive a restart
Configuration
.envfile support β secrets never go in committed JSON- Environment variable priority β override any setting without touching files
- Typed & validated config β errors caught at startup, not mid-trade
ποΈ Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Bot Exnova AI β
ββββββββββββββββ¬βββββββββββββββββββ¬ββββββββββββββββββββββββ€
β BotEngine β AutoRegulation β TelegramNotifier β
β (main loop) β (adaptive AI) β (async notifications)β
ββββββββββββββββ΄βββββββββββββββββββ΄ββββββββββββββββββββββββ€
β ConfigService β
β .env β env vars β config_real.json β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ€
β ExnovaBot (legacy) β
β Strategy analysis Β· Trade execution Β· Result tracking β
ββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββββ β
β ICT β VA-MOD β RSI β BB β Correlation β
β Strategy β Feed β β β Sentiment β
ββββββββββββββ΄βββββββββββ΄ββββββββ΄βββββββ΄βββββββββββββββββ-β
Core Modules
| Module | Role |
|---|---|
core/bot_engine.py |
Main trading loop, connection management, circuit breaker |
core/auto_regulation_system.py |
Adaptive parameter tuning based on win/loss streaks |
core/telegram_notifier.py |
Async Telegram notification queue |
core/config_service.py |
Typed config loader (env + .env + JSON) |
core/config_manager.py |
Legacy JSON config read/write helper |
core/bot_state.py |
Shared runtime state (balance, mode, stats) |
core/exnova_bot.py |
Broker connection, strategy execution, trade tracking |
β‘ Quick Start
1. Clone & install
git clone https://github.com/swordenkisk/bot-exnova-ai.git
cd bot-exnova-ai
pip install -r requirements.txt
2. Configure
cp .env.example .env
Edit .env with your credentials:
EXNOVA_EMAIL=your@email.com
EXNOVA_PASSWORD=your_password
EXNOVA_ACCOUNT_TYPE=PRACTICE
TELEGRAM_BOT_TOKEN=123456789:ABCdef...
TELEGRAM_CHAT_ID=987654321
TELEGRAM_LEVEL=TRADES
3. Run
# Practice account (safe default)
python main.py
# Real account
EXNOVA_ACCOUNT_TYPE=REAL python main.py
4. Verify config (optional)
python core/config_service.py
Expected output:
β
Credentials set: True
β
Telegram active: True
β
Trade amount: $2.00
β
Account type: PRACTICE
β
Strategy mode: NORMAL
β
Auto-regulation: True
βοΈ Configuration
All settings can be controlled via environment variables (highest priority), the .env file, or config_real.json (lowest priority). Secrets (passwords, API tokens) should only be in .env.
Broker
| Variable | Default | Description |
|---|---|---|
EXNOVA_EMAIL |
β | Your Exnova login email |
EXNOVA_PASSWORD |
β | Your Exnova password |
EXNOVA_ACCOUNT_TYPE |
PRACTICE |
PRACTICE or REAL |
Bot
| Variable | Default | Description |
|---|---|---|
BOT_TRADE_AMOUNT |
2.0 |
Trade size in account currency |
BOT_MAX_DAILY_TRADES |
50 |
Hard cap on trades per day |
BOT_MAX_CONCURRENT_TRADES |
2 |
Max open trades at once |
BOT_STRATEGY_MODE |
NORMAL |
SPEED / NORMAL / CONSERVATIVE |
Risk Management
| Variable | Default | Description |
|---|---|---|
RISK_STOP_LOSS_DAILY |
0.05 |
Stop trading after losing 5% of balance |
RISK_STOP_WIN_DAILY |
0.20 |
Stop trading after gaining 20% of balance |
RISK_MAX_CONSECUTIVE_LOSSES |
5 |
Trigger emergency mode |
Auto-Regulation
| Variable | Default | Description |
|---|---|---|
AUTO_REG_ENABLED |
true |
Enable/disable the regulation system |
AUTO_REG_LOSS_TRIGGER |
3 |
Consecutive losses before first adjustment |
AUTO_REG_EMERGENCY_THRESHOLD |
5 |
Consecutive losses for emergency mode |
AUTO_REG_MIN_CONFIDENCE |
0.40 |
Floor for confidence adjustments |
AUTO_REG_MAX_CONFIDENCE |
0.80 |
Ceiling for confidence adjustments |
π± Telegram Notifications
Setup (2 minutes)
- Message @BotFather β
/newbotβ copy the token - Message @userinfobot β copy your chat ID
- Add to
.env:TELEGRAM_BOT_TOKEN=123456789:ABCdefGHIjklMNO... TELEGRAM_CHAT_ID=987654321 TELEGRAM_LEVEL=TRADES
Notification Levels
| Level | What you receive |
|---|---|
ALL |
Everything including periodic heartbeats |
TRADES |
Every trade open + close (win/loss) β recommended |
ALERTS |
Wins, losses, emergency mode, bot start/stop only |
CRITICAL |
Emergency mode and fatal errors only |
Message Examples
Trade opened:
π TRADE OPENED
ββββββββββββββββββββ
Asset: EURUSD
Direction: CALL
Amount: $2.00
Confidence: 75%
Mode: NORMAL
Time: 14:23:01 UTC
Trade closed (win):
β
TRADE CLOSED β WIN
ββββββββββββββββββββ
Asset: EURUSD
P&L: +$1.68
Session WR: 72.3%
Balance: $1,052.40
Time: 14:24:30 UTC
Emergency mode:
π¨ EMERGENCY MODE ACTIVATED
ββββββββββββββββββββ
Reason: 5 consecutive losses
Con. Losses: 5
New Mode: CONSERVATIVE
Time: 16:45:12 UTC
β οΈ Bot has paused trading. Review required.
Daily summary:
π DAILY SUMMARY
ββββββββββββββββββββ
Trades: 25 (W:18 / L:7)
Win Rate: 72.0%
Total P&L: +$18.90
Balance: $1,018.90
Best Asset: EURUSD
Date: 2025-02-16
π€ Auto-Regulation System
The Auto-Regulation System monitors every trade result and automatically adjusts parameters to protect your capital during bad streaks.
State Machine
βββββββββββββββββββββββββββββββββββββββββββ
β NORMAL MODE β
β Default confidence & strategy settings β
ββββββββββββββββ¬βββββββββββββββββββββββββββ
β N consecutive losses
β (AUTO_REG_LOSS_TRIGGER, default: 3)
βΌ
βββββββββββββββββββββββββββββββββββββββββββ
β CAUTIOUS MODE β
β Confidence β by step (default +5%) β
β Min strategies required β by 1 β
β Telegram: βοΈ ADJUSTMENT alert β
ββββββββββββββββ¬βββββββββββββββββββββββββββ
β N consecutive losses
β (AUTO_REG_EMERGENCY_THRESHOLD, default: 5)
βΌ
βββββββββββββββββββββββββββββββββββββββββββ
β EMERGENCY MODE β
β Confidence forced to 0.70 β
β Strategies required: 3 β
β Settings persisted to disk β
β Telegram: π¨ EMERGENCY alert β
ββββββββββββββββ¬βββββββββββββββββββββββββββ
β 2 consecutive wins
β (recovery_wins_needed)
βΌ
βββββββββββββββββββββββββββββββββββββββββββ
β RECOVERY β Snapshot Restored β
β Pre-streak settings reloaded β
β Telegram: β
CLEARED alert β
βββββββββββββββββββββββββββββββββββββββββββ
Performance Learning
After accumulating 5+ trades per hour/asset, the system builds an optimal profile:
# Get best settings for the current hour
config = bot.auto_regulation.get_optimal_config_for_hour(14)
# β {"confidence": 0.68, "strategies": 3, "win_rate": 0.74, "total_trades": 22}
# Get best settings for a specific asset
config = bot.auto_regulation.get_optimal_config_for_asset("EURUSD")
# β {"confidence": 0.72, "strategies": 2, "win_rate": 0.71, "total_trades": 41}
π Trading Modes
| Mode | Min Confidence | Description |
|---|---|---|
SPEED |
Low | More signals, faster execution, higher risk |
NORMAL |
Medium | Balanced signal quality and frequency β default |
CONSERVATIVE |
High | Fewer but higher-quality signals, lower risk |
Switch mode without restarting:
# Via environment variable (takes effect on next run)
BOT_STRATEGY_MODE=CONSERVATIVE python main.py
# Via dashboard API
curl -X POST http://localhost:5000/api/mode \
-H "Content-Type: application/json" \
-d '{"mode": "CONSERVATIVE"}'
π‘οΈ Risk Management
The bot enforces three layers of risk protection:
- Daily stop-loss (
RISK_STOP_LOSS_DAILY) β trading halts if losses exceed X% of starting balance - Daily take-profit (
RISK_STOP_WIN_DAILY) β trading halts after reaching profit target - Auto-regulation β real-time parameter tightening during losing streaks
All three are configurable per the Configuration table above.
π Project Structure
bot-exnova-ai/
βββ core/
β βββ __init__.py # Package exports
β βββ auto_regulation_system.py # Adaptive parameter tuning
β βββ bot_engine.py # Main trading loop + circuit breaker
β βββ bot_state.py # Shared runtime state
β βββ config_manager.py # JSON config read/write
β βββ config_service.py # Typed config (.env + JSON + defaults)
β βββ exnova_bot.py # Broker connection + trade execution
β βββ logger.py # Logging setup
β βββ telegram_notifier.py # Async Telegram notifications
βββ strategies/
β βββ ict_strategy.py # ICT: OB, FVG, Liquidity, BOS, OTE
β βββ vamod_strategy.py # VA-MOD: Deriv price feed integration
βββ utils/
β βββ iq_style_dashboard.py # Optional web dashboard
βββ data/
β βββ trade_history.json # Persistent trade log
βββ docs/
β βββ ... # Additional documentation
βββ .env.example # β Copy to .env and fill in secrets
βββ .env # Your secrets (never commit this)
βββ .gitignore
βββ config_real.json # Non-secret bot settings
βββ requirements.txt
βββ main.py # Entry point
βββ CHANGES.md # Upgrade notes
βββ README.md # This file
π API Reference
TelegramNotifier
from core.telegram_notifier import get_notifier, NotifLevel
notifier = get_notifier()
# Trade events
notifier.trade_opened("EURUSD", "CALL", 2.0, confidence=0.75, mode="NORMAL")
notifier.trade_closed("EURUSD", "WIN", profit=1.68, win_rate=72.0, balance=1050.0)
# Risk events
notifier.adjustment("3 consecutive losses", new_confidence=0.65, consecutive_losses=3)
notifier.emergency("5 consecutive losses", consecutive_losses=5, current_mode="CONSERVATIVE")
notifier.emergency_cleared(wins=2)
# Lifecycle
notifier.bot_event("started", detail="Mode: NORMAL", balance=1000.0)
notifier.bot_event("stopped", detail="Daily target reached")
notifier.daily_summary(wins=18, losses=7, profit=12.5, balance=1012.5, top_asset="EURUSD")
AutoRegulationSystem
from core.auto_regulation_system import integrate_auto_regulation
# Attach to bot
integrate_auto_regulation(bot)
# Record a trade result
bot._record_trade_result(result=True, asset="EURUSD",
confidence=0.73, strategies=3, profit=1.68)
# Get performance report
report = bot.auto_regulation.get_performance_report()
# β {"status": "normal", "win_rate": 72.0, "total_trades": 25, ...}
# Get per-hour optimal config
opt = bot.auto_regulation.get_optimal_config_for_hour(14)
# Start an A/B test
test_id = bot.start_ab_test("ICT_v2", duration=60)
ConfigService
from core.config_service import get_config
config = get_config()
# Access all settings with full IntelliSense
print(config.bot.fixed_trade_amount) # 2.0
print(config.bot.strategy_mode) # "NORMAL"
print(config.telegram.is_configured()) # True / False
print(config.risk_management.stop_loss_daily) # 0.05
# Safe export for logging (secrets redacted)
import pprint
pprint.pprint(config.to_safe_dict())
π£οΈ Roadmap
v1.1 (Current)
-
.envfile support with priority loading - Full Telegram notification system
- Working auto-regulation (emergency mode, snapshots, recovery)
- Circuit breaker + exponential back-off reconnection
- Typed configuration with validation
v1.2 (Next)
- Web dashboard redesign (React frontend)
- SQLite trade history (replace flat JSON)
- Email notification fallback
- Backtesting mode against historical data
- Docker compose deployment
v2.0
- Async bot engine (asyncio)
- Multi-broker support
- Mobile app for remote control
- AI-based signal scoring (ML model trained on your own history)
β οΈ Disclaimer
Binary options trading involves significant financial risk. This bot is provided for educational and experimental purposes. Past performance does not guarantee future results.
- Start with a PRACTICE account and observe behavior before going live
- Never risk money you cannot afford to lose
- The auto-regulation system reduces risk but cannot eliminate it
- Monitor the bot regularly β do not leave it fully unattended
π License
Β© 2025 swordenkisk β All Rights Reserved
Unauthorized copying, distribution, or commercial use of this software is strictly prohibited without express written permission.
Built with β€οΈ for serious traders who want automation without blind trust.