YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

πŸ€– Bot Exnova AI

Automated binary options trading bot with quantum-grade signal analysis, adaptive self-regulation, and real-time Telegram notifications.

License: All Rights Reserved Python Telegram Status


πŸ“‹ Table of Contents


πŸ” 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

  • .env file 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)

  1. Message @BotFather β†’ /newbot β†’ copy the token
  2. Message @userinfobot β†’ copy your chat ID
  3. 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:

  1. Daily stop-loss (RISK_STOP_LOSS_DAILY) β€” trading halts if losses exceed X% of starting balance
  2. Daily take-profit (RISK_STOP_WIN_DAILY) β€” trading halts after reaching profit target
  3. 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)

  • .env file 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.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support