Quantum Robot
- Experts
- Chinthala Baji
- Versione: 1.17
- Attivazioni: 20
Expert Advisor · MQL5
Quantum Robot
A professional-grade Expert Advisor built on Dual Moving Average crossover signals, powered by full ATR-based dynamic risk management and a broker-validated order engine engineered to pass every MQL5 Market check.
Dual MA CrossoverATR Risk ManagementTrailing StopBar-level executionNetting & HedgingAll major pairs
1.17
Current version
H1+
Recommended timeframe
MT5
Platform
Strategy overview
Dual MA crossover entry
Fires one trade per confirmed crossover of a fast and slow Moving Average. Supports EMA, SMA, SMMA, and LWMA with any applied price type.
ATR-based stop loss & TP
Stop loss and take profit distances are calculated dynamically from ATR so they adapt to current volatility rather than fixed pip values.
ATR trailing stop
Optional trailing stop follows price using an ATR multiplier, locking in profits as the trade runs while fully respecting broker freeze and stops levels.
Risk-based position sizing
Lot size is calculated to risk an exact percentage of account balance per trade. Volume is always clamped to the broker's symbol-level volume limits.
Signal reversal logic
On a bearish cross the EA closes any open BUY and arms a SELL, and vice versa — keeping the EA aligned with market direction at all times.
Broker-validated engine
Fully compliant with the official MetaQuotes validation article. Auto-detects FOK/IOC/RETURN fill mode and handles stop level, freeze level, and margin checks.
How it works
1
Crossover detection
On each new completed bar the EA reads the previous and current values of the fast and slow MAs. A bullish cross (fast rises above slow) arms a BUY signal; a bearish cross arms a SELL. Only one trade fires per cross.
2
Dynamic SL & TP calculation
ATR is read on the confirmed bar. Stop loss is placed at ATR × SL multiplier from entry; take profit at ATR × TP multiplier. Both are validated against the broker's STOPS_LEVEL before the order is sent.
3
Risk-sized lot calculation
The EA calculates the lot size that risks exactly RiskPercent% of current balance given the SL distance, tick value, and tick size. Volume is clamped to SYMBOL_VOLUME_MAX and SYMBOL_VOLUME_LIMIT.
4
Trade execution
Market orders are sent with price = 0 to prevent Invalid Price errors. Free margin is checked before every order. Fill mode (FOK/IOC/RETURN) is auto-detected from broker symbol properties.
Trailing stop management
If enabled, the trailing stop moves the SL one direction only (following profit). Each bar it checks the current SL, current TP, and the new SL candidate against both STOPS_LEVEL and FREEZE_LEVEL before modifying.
Input parameters
| Parameter | Default | Description |
|---|---|---|
| MA Settings | ||
| FastMAPeriod | 20 | Period of the fast Moving Average |
| SlowMAPeriod | 50 | Period of the slow Moving Average |
| MAMethod | EMA | Smoothing method: EMA, SMA, SMMA, or LWMA |
| AppliedPrice | Close | Price type applied to both MAs |
| Risk Management | ||
| RiskPercent | 1.5% | Percentage of balance risked per trade |
| ATRMultiplierSL | 2.0 | Stop loss distance as ATR multiple |
| ATRMultiplierTP | 3.0 | Take profit distance as ATR multiple |
| ATRMultiplierSL | 2.0 | Stop loss distance as ATR multiple |
| ATRMultiplierTP | 3.0 | Take profit distance as ATR multiple |
| ATRPeriod | 14 | Lookback period for ATR calculation |
| UseTrailingStop | true | Enable or disable the ATR trailing stop |
| TrailingATRMult | 1.5 | Trailing stop distance as ATR multiple |
| Trade Settings | ||
| MagicNumber | 202511001 | Unique identifier for this EA's orders |
| TradeComment | Quantum_Robot | Comment attached to opened positions |
| MaxOpenTrades | 1 | Maximum simultaneous open positions |
| Slippage | 3 pts | Maximum allowed entry slippage |
Compatibility
MetaTrader 5
All Forex pairs
Metals (XAUUSD, XAGUSD)
Indices & CFDs
Netting accounts
Hedging accounts
H1 – D1 timeframes
ECN & STP brokers

