AI-Powered XAUUSD H1 Trading System - Documentation
1. Overview
Thank you for choosing AlphaNet AI GOLD Pro. This EA is an AI-powered trading system designed for XAUUSD H1.
What This EA Does:
- Uses LSTM neural network for market analysis with 13 input features
- Adapts Stop Loss and Take Profit based on volatility (ATR)
- Trades only during high-liquidity sessions (London/NY)
- Selective trade execution based on AI confidence threshold
AlphaNet AI GOLD Pro is optimized for XAUUSD H1 trading conditions.
AlphaNet AI GOLD ProSpecifications:
- Symbol: XAUUSD
- Timeframe: H1
- Optimized for XAUUSD H1 conditions
Minimum Requirements:
- Account Balance: $1,000 USD minimum (for 0.01 lot)
- Leverage: 1:100 or higher
- Any MT5 broker with XAUUSD
- VPS recommended for 24/7 operation
Installation & Setup
Installation from MQL5.com Market
- Purchase from MQL5.com Market
- Open MetaTrader 5 and log in to your MQL5.com account in MT5
- Select AlphaNet AI GOLD Pro from the market and press the download button.
(If you haven't purchased it yet, please purchase it first.) - The EA will automatically download and install
- Find it in: Navigator → Expert Advisors → Market → AlphaNet AI GOLD Pro
Attaching to Chart
- Open XAUUSD H1 chart
- Drag AlphaNet AI GOLD Pro from Navigator to chart
- Check "Allow Algo Trading" in Common
- Verify parameters (use defaults for recommended configuration)
- Click OK
- Please check this as well. Check "Allow algorithmic trading" in Tools → Options → Expert Advisors
Understanding the Strategy
AI Neural Network (LSTM)
The EA uses a Long Short-Term Memory neural network designed for XAUUSD H1 analysis.
Analyzes (13 features):
- Price patterns (OHLC)
- Volume
- RSI (14 period)
- MACD
- ATR (Average True Range)
- Bollinger Bands
- EMA (100 period)
- Trend strength (price deviation from EMA50)
- Volatility (price standard deviation ratio)
Output: BUY, SELL, or HOLD signals with confidence levels
Dynamic Risk Management
Stop Loss and Take Profit are calculated dynamically based on market volatility:
- SL = ATR × 1.50 (recommended multiplier)
- TP = SL × 2.00 (recommended ratio)
- Range: 100-250 pips for SL
Design Note:
Dynamic SL/TP adapts to market volatility using ATR. This approach is recommended over fixed SL/TP for XAUUSD H1 trading. XAUUSD exhibits larger price movements than forex pairs, so the SL range is wider accordingly.
Time Filter
Trades only during high-liquidity sessions:
- London: 8:00-17:00 GMT
- New York: 13:00-22:00 GMT
- Overlap period: Maximum liquidity
Design Rationale:
Time filtering focuses trading on high-liquidity sessions (London/NY). This approach targets periods with better execution conditions and avoids low-liquidity periods.
Selective Trade Execution
The EA is designed to be selective in its trade execution based on AI confidence threshold rather than high frequency trading.
Recommended Settings
These are the recommended settings for XAUUSD H1 trading.
Recommended Configuration for XAUUSD H1
| Parameter | Value | Why This Value |
|---|---|---|
| AI_MinConfidence | 0.42 | Balance between signal quality and frequency for XAUUSD H1 |
| Use_Dynamic_SLTP | true | Adaptive risk management |
| ATR_SL_Multiplier | 1.50 | Recommended multiplier for XAUUSD H1 |
| TP_SL_Ratio | 2.00 | Recommended ratio for XAUUSD H1 |
| Enable_Time_Filter | true | High-liquidity session focus |
| Lot_Size | 0.01 | For $1,000 account |
| Max_Daily_Trades | 8 | Risk control |
Parameter Reference
AI Core Parameters
AI_MinConfidence (Default: 0.42)
- Range: 0.0 to 1.0
- Minimum confidence level for AI signals
- Higher = fewer but higher quality trades
- Lower = more trades but lower quality
- 0.42 is recommended for XAUUSD H1
AI_MaxHoldConfidence (Default: 0.55)
- Range: 0.0 to 1.0
- Maximum threshold for HOLD signals
- If HOLD confidence exceeds this, no trade taken
- Prevents trading in uncertain markets
Technical Filter Parameters
EMA_Period (Default: 100)
- Exponential Moving Average for trend confirmation
- 100 period balances responsiveness and stability
- BUY signals only when price above EMA
- SELL signals only when price below EMA
RSI_Period (Default: 14)
- Standard RSI period
- Used to avoid overbought/oversold extremes
RSI_Overbought (Default: 70)
- BUY signals ignored when RSI > 70
- Prevents buying at market tops
RSI_Oversold (Default: 30)
- SELL signals ignored when RSI < 30
- Prevents selling at market bottoms
Max_Spread_Points (Default: 80)
- Maximum allowed spread in points
- No trades if spread exceeds this value
- Protects against high spread costs
- 80 points is recommended for XAUUSD, which typically has wider spreads than forex pairs
Trade Settings
Lot_Size (Default: 0.01)
- Fixed lot size for all trades
- 0.01 lot recommended for $1,000 account
- Scale proportionally with account size
Magic_Number (Default: 147242)
- Unique identifier for this EA's trades
- Change if running multiple EAs on same account
Dynamic Stop Loss / Take Profit
Use_Dynamic_SLTP (Default: true)
- When true: Enables adaptive SL/TP based on ATR volatility
- When false: Uses fixed SL/TP
- Dynamic approach is recommended for XAUUSD H1
Fixed_StopLoss (Default: 150 pips)
- Only used if Use_Dynamic_SLTP = false
Fixed_TakeProfit (Default: 300 pips)
- Only used if Use_Dynamic_SLTP = false
ATR_SL_Multiplier (Default: 1.50)
- Range: 1.0 to 3.0
- Stop Loss = ATR × this multiplier
- 1.50 is recommended for XAUUSD H1
- Changes may affect risk and trade outcomes
- Lower values = tighter SL, more stop-outs
- Higher values = wider SL, larger losses per trade
TP_SL_Ratio (Default: 2.00)
- Range: 1.0 to 3.0
- Take Profit = Stop Loss × this ratio
- 2.00 is recommended for XAUUSD H1
- Changes may affect trade outcomes
Min_StopLoss_Pips (Default: 100)
- Minimum SL distance regardless of ATR
- Prevents too-tight stops in low volatility
Max_StopLoss_Pips (Default: 250)
- Maximum SL distance regardless of ATR
- Caps risk in extreme volatility
Trailing Stop
Enable_Trailing (Default: true)
- Activates trailing stop functionality
- Locks in gains as trade moves favorably
Trailing_Start (Default: 20 pips)
- Trailing begins after this much unrealized gain
- Conservative: 30 pips (let positions run)
- Aggressive: 15 pips (lock in quickly)
Trailing_Stop (Default: 10 pips)
- Distance of trailing stop behind current price
- Tighter = more protection, earlier exits
- Wider = more breathing room, larger gains
Trailing_Step (Default: 3 pips)
- Minimum price movement to adjust trailing stop
- Smaller = more frequent adjustments
- Larger = fewer broker requests
Risk Management
Min_Bars_Between_Trades (Default: 6)
- Minimum bars (hours on H1) between consecutive trades
- Prevents overtrading
- 6 hours = reasonable spacing for XAUUSD H1
Max_Daily_Trades (Default: 8)
- Maximum trades allowed per calendar day
- Daily risk control
- Once limit reached, no more trades until next day
Trading Hours Filter
Enable_Time_Filter (Default: true)
- When true: Trades only London/NY sessions
- When false: Trades 24/7
- Time filtering focuses on high-liquidity periods
Server_GMT_Offset (Default: 2)
- Your broker's server time offset from GMT
- DST (Summer): Usually GMT+2 or GMT+3
- Winter: Usually GMT+2 or GMT+3
- Check your broker's server time specification
- Critical for accurate time filtering
Advanced Settings
Debug_Mode (Default: false)
- Enables detailed logging to Experts tab
- True = verbose logging (useful for troubleshooting)
- False = minimal logging (recommended for live)
- Note: Excessive logging can create large log files
Trading Strategy Details
Entry Conditions
BUY Signal Requirements:
- AI predicts BUY with confidence > AI_MinConfidence
- HOLD confidence < AI_MaxHoldConfidence
- Current price > EMA(100)
- RSI < RSI_Overbought (70)
- Spread ≤ Max_Spread_Points
- Within trading hours (if time filter enabled)
- Daily trade limit not reached
- Minimum bars between trades satisfied
SELL Signal Requirements:
- AI predicts SELL with confidence > AI_MinConfidence
- HOLD confidence < AI_MaxHoldConfidence
- Current price < EMA(100)
- RSI > RSI_Oversold (30)
- Spread ≤ Max_Spread_Points
- Within trading hours (if time filter enabled)
- Daily trade limit not reached
- Minimum bars between trades satisfied
Exit Conditions
Trades exit when:
- Stop Loss is hit
- Take Profit is hit
- Trailing Stop is triggered
- Opposite signal occurs (close existing, open new)
Trading Hours (GMT)
When Enable_Time_Filter = true:
- London Session: 08:00 to 17:00 GMT
- New York Session: 13:00 to 22:00 GMT
- Overlap Period: 13:00 to 17:00 GMT (highest liquidity)
- No trading: 22:00 to 08:00 GMT (low liquidity Asian session)
Risk Management
Position Sizing
Recommended Lot Size by Account Balance:
| Account Balance | Recommended Lot Size | Risk per Trade (approx) |
|---|---|---|
| $1,000 | 0.01 | 1.0 - 2.0% |
| $2,000 | 0.02 | 1.0 - 2.0% |
| $5,000 | 0.05 | 1.0 - 2.0% |
| $10,000 | 0.10 | 1.0 - 2.0% |
Daily Limits
- Max_Daily_Trades = 8 (recommended)
- Resets at midnight server time
Stop Loss Protection
- Every trade has automatic Stop Loss
- Dynamic range: 100-250 pips based on ATR
Troubleshooting
EA Not Taking Any Trades
Check the following:
- This EA is selective in its trading, so it may not trade for extended periods depending on market conditions.
- Is Algo Trading enabled? (Tools → Options → Expert Advisors)
- Correct symbol? (XAUUSD only)
- Correct timeframe? (H1 only)
- Within trading hours? (Check Enable_Time_Filter and Server_GMT_Offset)
- Daily limit reached? (Check Max_Daily_Trades)
- Spread too high? (Check Max_Spread_Points - XAUUSD spreads can be wide)
- Too soon after last trade? (Check Min_Bars_Between_Trades)
Trades Closing Too Early
Possible Causes:
- Trailing Stop too tight (increase Trailing_Stop)
- Take Profit too close (check TP_SL_Ratio)
- Stop Loss too tight (check ATR_SL_Multiplier)
Loss Range Differs from Expected
Verify Settings:
- Is Use_Dynamic_SLTP = true?
- Is Enable_Time_Filter = true?
- Is ATR_SL_Multiplier = 1.50?
- Using XAUUSD H1?
Insufficient Money Error
Solution:
- Reduce Lot_Size
- Increase account balance
- Minimum $1,000 recommended for 0.01 lot
Invalid Volume Error
Solution:
- Check broker's minimum lot size
- Ensure Lot_Size meets broker requirements
- Some brokers require 0.01 minimum, others allow smaller


