Atomic Advanced EA
- Uzmanlar
- Lucas Bremer Moinhos Dos Santos
- Sürüm: 50.0
- Güncellendi: 23 Mart 2026
- Etkinleştirmeler: 5
Welcome to the Atomic EA Operational Manual. Atomic is a sophisticated algorithmic trading companion that blends multiple dynamic strategies, adaptive regime detection, rigid risk management, and multi-symbol scaling. This guide covers how to set up the EA, tune strategy engines, read visual elements, and manage .set configurations.
1. Installation and General Setup
1.1 Core Inputs
When attaching Atomic EA to a chart, begin with the General Settings:
- SymbolsToTrade : List the assets you are actively pursuing (e.g., XAUUSD , EURUSD ).
- TimeframeToTrade : Specify the anchor evaluation timeframe (e.g., M15 , H1 ). This is independent of the chart you attach the EA to.
- BaseMagicNumber : A unique digit (e.g., 54321 ) imperative for separating Atomic trades from manual executions or other EAs running simultaneously.
- MainStrategy : Select the core logic triggering trade signals. There are 32+ available strategies, ranging from Moving Average algorithms to Fair Value Gaps and Delta Volume Order Flow.
1.2 The "Regime Adaptive" Core Strategy
Unique to Atomic is the ability to select the STRATEGY_REGIME_ADAPTIVE . Rather than running one fixed strategy, the EA analyzes the current market (Overbought, Trending, Choppy, Volatile) and routes the signal generation to specialized child strategies tailored explicitly for those conditions.
2. Setting Up Risk & Lot Sizes
Risk rules in Atomic are strictly enforced logic loops designed to prevent capital ruin.
2.1 Lot Sizing Modalities
Under Lot Sizing , define how volume is constructed:
- LOT_SIZE_FIXED : Applies the exact volume specified.
- LOT_SIZE_ACCOUNT_BASED : Uses your current account equity combined with the RiskPerTradePercent field and the calculated Stop Loss point distance.
- LOT_SIZE_ATR_BASED : Aggressively alters lot exposure dependent on the current asset ATR. Highly volatile conditions yield smaller position sizes, smoothing capital swings.
2.2 Protecting Stop Losses & Take Profits
SL_Mode controls structural exit risk. You can set it to raw pips ( SL_MODE_POINTS ) or use the intelligent SL_MODE_ATR setting, which multiplies recent market volatility ( StopLoss_ATR_Multiplier ) to calculate a breathing-room stop suitable for that precise moment.
Atomic also supports Ratio-Based TP configurations, where you assign a base distance and a target RR (Risk-to-Reward) metric, autonomously dividing SL and TP distances to ensure mathematical expectancy.
3. Dynamic Trade Filters
While a Strategy dictates when to enter, Filters dictate when to abstain. The EA contains logic for over 20 confirmation filters. For example:
- Economic Events ( EnableNewsFilter ): Prohibits opening trades X minutes before or after designated High/Medium impact data releases.
- ADX Trend Filter ( UseADX_Filter ): Forces the system to reject signals if market momentum is below a specific ADX strength.
- Volatility Threshold ( UseVolatilityFilter ): Preempts signals in sluggish markets where ATR rests below safe liquidity limits.
- Regime Rejection: Configurable parameters ( BlockTradesInQuiet , BlockTradesInChoppy ) force the EA to flat-line activity during sideways or dangerous chop.
Use the UseSignalConfidence module to modify how strict filters apply. Instead of purely blocking a signal, confidence mode permits the trade if it passes a percentage of all activated filters, scaling your lot size up or down proportionately based on the final confidence score (between 0.0 and 1.0).
4. Position & Exit Management
4.1 Trailing Stops and Breakevens
Under Position Control, you'll define non-critical exit mechanics:
- Breakeven Engine: Automate shifting your Stop Loss to entry minus a configured buffer once the price has progressed safely in your favor.
- Trailing Variants: Options range from standard Pip-Steps to intelligent trails chasing Parabolic SAR markers, Moving Averages, or Ichimoku Kijun levels.
- Partial Take-Profit: Set multiple thresholds (PTP1, PTP2) to shave designated lot percentages off open trades upon reaching predefined distances.
4.2 Circuit Breakers (Account Emergency)
Activate EnableCircuitBreaker and provide a strict total loss percent or consecutive loss count per day. Upon breaching this limit, the EA closes positions immediately and rejects further activity until server rollover.
5. Dashboard and Visual Features
The EA actively displays state information via its interactive overlays.
- CDashboardPanel: A live chart metric box that breaks down open positions, Realized/Floating P&L, Total Margin utilized, the present System Regime, Strategy active, and the status of circuit breakers.
- Visual Mode Graphics: During backtesting, the EA renders execution arrows, Stop-Loss / Take-Profit projection fields, Partial TP dots, and suggested Trailing Stop indicators directly onto candle wicks.
6. Configuring and Utilizing .set Files
To manage and save complex setups, Atomic uses .set files. This lets you reload entire rule matrices in a few clicks.
Loading Sets:
If evaluating the EA, open the MT5 Strategy Tester, click the "Inputs" Tab -> Right Click the layout -> "Load", and open any provided .set file.
Optimization Principles:
A standard .set file configuration will contain fields marked for optimization limits (Step/Min/Max). Follow this process for optimal testing:
- Ensure SymbolsToTrade matches the tester asset target.
- Select variables for MT5 sweeping by checking the optimization box next to parameters like MainStrategy or the primary lookback periods.
- Observe the OnTester() pass validations logged by the internal GPU Monte Carlo Engine, predicting "Risk-of-Ruin" based on your provided parameters. Set files producing high Walk-Forward Analysis (WFA) fail rates should be discarded.
Technical Architecture Documentation
1. System Overview
Atomic EA is an advanced, multi-strategy, stateful Expert Advisor built for MetaTrader 5 (MQL5). It features a highly modular architecture where the main EA logic acts as an orchestrator for stateless procedural modules.
The system relies heavily on a central data structure, CSymbolManager , which acts as the unified state and data repository passed by reference to all functional modules. The architecture guarantees clean separation of concerns: signal generation, trade exclusion, execution, risk management, and chart visualization are discrete processes.
2. Core Execution Flow
The OnTick() execution pipeline ensures robust and predictable behavior across all modules:
- Heartbeat & Multi-EA Coordination: If enabled, updates Terminal Global Variables to signal instance liveliness to other EA instances.
- Data Refresh ( RefreshData ): Populates the CSymbolManager buffers with the latest bar and indicator data. Inline calculated buffers (e.g., Z-Score, Volume Profile) are processed here.
- Regime Detection: Evaluates multiple technical indicators (ADX, ATR, RSI, Stoch, CCI, Momentum, MACD, BB) to classify current market regime (e.g., Trending, Volatile, Chop, etc.).
- Signal Generation ( CheckTradeSignals ):
- GetMainStrategySignal() identifies initial entry opportunities using 32 unique sub-strategies.
- ApplyAllFilters() filters signals based on enabled indicators, volatility checks, and economic news.
- CalculateFilterConfidence() scores the resulting signal (0.0 to 1.0).
- Trade Execution ( ExecuteTrade ):
- Validates over 13 pre-trade conditions (limits, margins, correlation).
- Dynamically calculates Lot Size (using Risk %, ATR, and Confidence modulation).
- Generates and manages order requests with exponential backoff retry logic.
- Position Management ( ManagePositions_Tick ):
- Executes critical actions: SL enforcement, Breakeven application.
- Executes non-critical actions: Trailing Stops, Partial Take Profits.
- Evaluates Strategy-specific and Time-based Exits.
- Circuit Breaker Assessment: Aggregates realized and floating losses against daily threshold rules.
- UI & State Updates: Refreshes Chart Indicators, Dashboard, and persists state into binary format for restart recovery.
3. Module Breakdown
3.1. Main Entry Point: Atomic.mq5
Defines all generic configurations, constants, enums (e.g., ENUM_TRADING_STRATEGY , ENUM_MARKET_REGIME ), input parameters grouped by strategy/risk, and the CSymbolManager class. Maps global execution events ( OnInit , OnTick , OnDeinit , OnTester ) to module routines.
3.2. Signals & Strategy Core ( Signals.mqh )
Houses GetMainStrategySignal() , expanding into 32 selectable strategies. This ranges from generic Moving Average crossovers and candlestick patterns to advanced strategies like Order Flow Delta Volume, Z-Score Mean Reversion, Fair Value Gaps (FVG), Market Structure mapping, and Volume Profile Point of Control.
3.3. Filter Engine ( Filters.mqh )
Executes secondary confirmation validations. Filters overlap with strategies but act to nullify signals. ApplyAllFilters can work in standard Boolean Mode (reject on first failure) or Confidence Mode (tally total passed filters over required filters to derive a signal strength).
3.4. Risk Management ( RiskManager.mqh )
Centralized risk calculation logic handling SL/TP models (Fixed, ATR-based, Ratio-based splits) and position sizing. Contains advanced Lot Progression modes (Loss Recovery, Fibonacci, D'Alembert). Enforces account-level checks, tracking maximum drawdown, margin availability, and consecutive losses.
3.5. Position Lifecycle ( PositionManager.mqh )
Manages active positions and pending limit/stop orders. Controls multiple trailing stop modalities (MA-based, Points, Parabolic SAR, Kijun Sen) and multi-level partial closures (PTP1, PTP2, PTP3). Implements early exit rules based on logic inversions (Strategy Exits) and time degradation (Time-based Exits).
3.6. Persistence & State ( StatePersistence.mqh )
Since MQL globals reset strictly upon terminal closure or EA re-initialization, this module saves critical variables (Hedge Levels, Drawdown states, Daily P&L, Circuit Breaker flags) into a binary file under MT5's FILE_COMMON location. This ensures continuity across restarts.
3.7. Multi-EA Coordination ( MultiEACoordination.mqh )
Allows multiple instances of the EA across various charts/assets to communicate securely. Employs Terminal Global Variables (TGV) using atomic Compare-And-Swap ( GlobalVariableSetOnCondition() ) to reserve margin, implement account-wide circuit breakers, and track gross currency risk exposure to avoid correlated ruin.
3.8. Walk-Forward Analysis ( WalkForward.mqh / MonteCarloOpenCL.mqh )
Dedicated to the OnTester() lifecycle. Uses OpenCL GPU acceleration (with CPU fallback) to simulate thousands of equity curve permutations on backtest results. Enables Out-of-Sample randomization, slippage simulation, and Risk-of-Ruin (RoR) estimations, wrapped in a Walk-Forward partitioning scheme (In-Sample vs Out-Of-Sample rolling windows) for high-fidelity optimization validation.
4. Signal Confidence Implementation
The SignalConfidence.mqh module generates a fractional confidence multiplier used to scale initial lot sizes dynamically. The algorithm is driven by evaluating the weighted sum of passed criteria:
- Strategy Score: How robust the primary signal is.
- Filter Hit Rate: The ratio of passed confirmation filters against the total enabled soft filters.
- MTF Alignment: Bonus scoring if higher timeframes align with the signal.
- Market Regime: Weight multiplier based on how well the regime matches the strategy paradigm.
5. Development Guidelines
- Best encoding standards and practices for C++
- Data Encapsulation
- Stateless Execution
