VEGA BOT: Rule-Based AI for Intelligent Pending Orders

VEGA BOT: Rule-Based AI for Intelligent Pending Orders

15 December 2025, 10:00
Lo Thi Mai Loan
2
90


VEGA BOT AI Module: Intelligent Pending Orders and Trade Management

Automated trading for breakout strategies becomes significantly more effective when it is guided by an intelligent AI Module. VEGA BOT’s AI Module is a rule-based, score-driven system designed to manage pending orders, dynamic trailing, adaptive stop-loss, and take-profit levels. It provides traders with a professional, risk-managed approach to breakout trading.

This article explains the AI Module in detail, including how the AI Score is calculated, how Pending Offsets work, and how to configure the key EA inputs for optimal performance.


1. What is the AI Module?

The AI Module in VEGA BOT is a rule-based, heuristic AI system specifically designed to manage trading entries and exits.

Important distinctions:

  • This AI is not a machine learning model — it does not require historical datasets or training.

  • Instead, it uses predefined rules, weighted scoring, and normalized market indicators to make deterministic, transparent trading decisions.

  • It is adaptive and can optionally adjust weights after trades close, without the complexity of full ML.

1.1 Key Purpose

The AI Module controls four core functions in the EA:

  1. Pending Order Placement – Decide whether to open a buy stop or sell stop pending order.

  2. Pending Offset Calculation – Adjust distance from support/resistance based on probability of breakout.

  3. Trade Management – Manage dynamic trailing stops, adaptive stop-loss (SL), and take-profit (TP).

  4. Optional Weight Adjustment – Slightly adapt feature weights based on trade outcomes (profit/loss).

In essence, the AI Module acts as a smart controller, evaluating market conditions and making automated entry and exit decisions.


1.2 How the AI Score is Calculated

The core of the AI Module is the AI Score, which summarizes multiple market conditions into one actionable metric.

Formula:

AI Score=W1TrendStrength+W2PriceCompression+W3ATRExpansion+W4SessionPower

Where:

Factor Description Weight Symbol
TrendStrength Measures how strong and mature the current trend (e.g., distance from SuperTrend or EMA) W1
PriceCompression Indicates volatility contraction on a lower timeframe (M15) – potential breakout W2
ATRExpansion Momentum expansion measured using ATR (Average True Range) W3
SessionPower Liquidity and importance of the current trading session W4

Notes:

  • All features are normalized between 0 → 1.

  • Weights W1–W4 can be adjusted for different instruments like GOLD/XAUUSD, US30, NAS100.

  • The AI Score is compared against thresholds to place, cancel, or adjust pending orders.


1.3 Decision Thresholds

  • AI_SCORE_PLACE → Score ≥ this value → EA places pending order.

  • AI_SCORE_CANCEL → Score < this value → EA cancels pending order.


1.4 Pending Offset

The Pending Offset determines how far the pending order is placed from breakout levels:

  • High Score → Smaller offset → Aggressive entry (closer to breakout)

  • Low Score → Larger offset → Conservative entry (further from breakout)

Example rules:

AI Score ≥ 3.8 → Offset = 15 points AI Score ≥ 3.4 → Offset = 30 points AI Score < 3.4 → Offset = 50 points

Points are in instrument-specific units (XAUUSD: 0.01 = 1 point).


1.5 Example Calculation

Consider GOLD (XAUUSD) breakout scenario:

Feature Value Normalized Weight Contribution
TrendStrength 0.9 0.9 1.6 1.44
PriceCompression 0.7 0.7 1.4 0.98
ATRExpansion 1.0 1.0 1.2 1.2
SessionPower 1.0 1.0 1.0 1.0


AI Score = 1.44 + 0.98 + 1.2 + 1.0 = 4.62 → Score > 3.4 → Place pending order → Score > 3.8 → Pending Offset = 15 points (aggressive)

  • A high AI Score indicates strong trend, high momentum, favorable session, triggering an aggressive entry.

  • A lower AI Score may delay, adjust offset, or cancel the pending order.


1.6 Key Inputs for the AI Module in VEGA BOT

VEGA BOT allows traders to customize AI behavior through several inputs:

1.6.1 Use_AI – Enable or Disable AI Module

input bool Use_AI = false; // Use AI Model Check Entry

  • Master switch for the AI Module.

  • true → AI Module manages entries.

  • false → EA ignores AI Module, uses standard breakout logic.

1.6.2 AI_SCORE_PLACE – Minimum Score to Place Pending

input double AI_SCORE_PLACE = 3.4;

  • Minimum AI Score required to place a pending order.

  • Higher value → fewer, higher-quality trades; lower value → more opportunities.

1.6.3 AI_SCORE_CANCEL – Cancel Pending Below This Score

input double AI_SCORE_CANCEL = 2.5;

  • Score threshold below which pending orders are canceled to reduce risk.

  • Must always be less than AI_SCORE_PLACE .

1.6.4 AI_TIMEZONE – Timezone Offset for Session Calculations

input int AI_TIMEZONE = 0; // Timezone offset vs server (London = 0)

  • Adjusts session timing relative to server timezone.

  • Ensures AI evaluates session power accurately for London, New York, Tokyo, etc.

Example:

LondonOpen = 8 - AI_TIMEZONE LondonClose = 16 - AI_TIMEZONE

Summary Table:

Input Purpose Example/Tip
Use_AI Enable AI Module true = AI active, false = AI off
AI_SCORE_PLACE Minimum score to place pending 3.4 = default
AI_SCORE_CANCEL Cancel pending orders below this score 2.5 = default
AI_TIMEZONE Timezone offset for session calculations 0 = London, -5 = New York, +9 = Tokyo

Proper configuration ensures VEGA BOT places intelligent pending orders, cancels weak setups, and respects session liquidity.


1.7 COMPARE AI RESULT  VS NO AI RESULT


AI vs. Non-AI: Performance Comparison


Activating the AI Module has a clear impact on trade quality and overall results:

Feature Without AI With AI Module
Number of trades High Lower (fewer, higher-probability trades)
Profit Moderate Higher (better risk-reward)
Drawdown Higher Lower (less exposure to weak setups)
Trade accuracy Moderate Higher (filtered by AI Score)

Key Observations:

  1. Fewer trades, higher quality – The AI Module filters out low-probability breakout setups.

  2. Profit increases – By focusing on high-score trades, overall profitability improves.

  3. Reduced drawdown – Poor trades are avoided, reducing risk and smoothing equity curve.

  4. Consistency – AI ensures systematic decision-making rather than relying purely on indicators or manual thresholds.

In short, enabling the AI Module results in clearly better trading performance, with higher profit, lower drawdown, and smarter trade selection.




2. Step 2 – AI Trailing

Coming soon…

3. Step 3 – AI SL

Coming soon…

4. Step 4 – AI TP

Coming soon…

5. Step 5 – AI Learning

Coming soon…


Conclusion:
The VEGA BOT AI Module is a professional, rule-based system that manages breakout trading intelligently. By combining AI Score, Pending Offset, session awareness, and configurable inputs, it allows traders to automate entries, manage risk, and adapt dynamically to market conditions — all while keeping the system transparent and easy to control.