Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

Metatrader 4 Expert Advisor | GOLD vs USD Advanced Trading tool

Aprofessional multi-confirmation trading systemaligned signalsfilters out noise and only shows you the cleanest opportunities.

1.Dual RSI Analysis

  • Gold RSI

  • USD Strength RSI

    • Simple: Inverse of Gold RSI (quick analysis)

    • Advanced: 7-currency basket (EURUSD, GBPUSD, USDJPY, USDCHF, USDCAD, AUDUSD, USDNZD)

2.Strength Histogram

  • Green Bars: Gold stronger than USD

  • Red Bars: USD stronger than Gold

  • Bar Height: Magnitude of strength difference

  • Adjustable Width: Customizable visual thickness

3.Signal Detection

  • Cross Signals

  • Divergence Detection: Early reversal warnings

  • Visual Hierarchy: Lines on top of histogram for clear reading

Complete Alert System Added:

Alert Types:

  1. Cross Alerts: When RSI lines cross

  2. Divergence Alerts: Early reversal warnings

  3. Extreme Level Alerts: Overbought/oversold conditions

  4. Strength Change Alerts: Significant momentum shifts

Notification Channels:

  • Popup Alerts: On-screen notifications

  • Email Alerts: Direct to your email

  • Push Notifications: MT4 mobile app alerts

Smart Features:

  • Cooldown System: Prevents alert spam

  • Master Switch: Enable/disable all alerts

  • Individual Controls: Turn specific alerts on/off

  • Strength Thresholds: Only alert on significant moves

Alert Messages Examples:

  • "GOLD-USD BULLISH CROSS: Gold RSI crossed above USD RSI - Potential BUY GOLD/SELL USD"

  • "GOLD OVERBOUGHT: RSI 75.3 - Consider taking profits on LONG positions"

  • "BULLISH DIVERGENCE: Gold oversold while USD overbought - Potential reversal UP"

GOLD vs USD RSI Strength Same Indi dual functions


externbooltrue;
extern bool Alert_On_Cross = true;
extern bool Alert_On_Divergence = true;
extern bool Alert_On_Extremes = true;
extern bool Alert_On_Strength_Change = false;
extern int Alert_Min_Strength_Diff = 10;
extern bool Popup_Alerts = true;
extern bool Email_Alerts = false;
extern bool Push_Alerts = false;
Alert Notification
extern int RSI_Length = 14;           // RSI period
extern int Overbought_Level = 70;     // Sell zone
extern int Oversold_Level = 30;       // Buy zone  
extern int Smoothing_Period = 3;      // Signal smoothing
extern bool Use_Multi_Currency_USD = true; // Advanced USD calculation
extern bool Show_Strength_Histogram = true; // Histogram visibility
extern bool Show_RSI_Lines = true;    // RSI lines visibility
extern int Histogram_Width = 3;       // Bar thickness

Fully Optimized Settings

Trading Signals Interpretation

Bullish Gold (Sell USD)

  • ✅ Gold RSIabove

  • Green histogram

  • Bullish cross

  • ✅ Gold RSI rising from oversold

Bearish Gold (Buy USD)

  • ✅ USD RSIabove

  • Red histogram

  • Bearish cross

  • ✅ USD RSI rising from oversold

Avoid Trading

  • ❌ Mixed colors (green & red histogram)

  • ❌ Lines tangled near midline

  • ❌ No clear cross signals

  • ❌ Conflicting indications

Code Functions Overview

Core Calculations

  • CalculateAdvancedUSDStrength() : 7-currency USD strength

  • SmoothValue() : Reduces noise with moving average

  • DetectDivergence() : Finds early reversal patterns

Visual Management

  • DrawHorizontalLines() : Creates reference levels

  • Buffer ordering ensures proper visual hierarchy

  • Dynamic color assignment based on strength

Signal Processing

  • Cross detection with confirmation

  • Strength difference calculation

  • Multi-timeframe alignment checking

Usage Instructions

Basic Setup

  1. Apply toXAU/USD

  2. Start with default settings

  3. UseSimple USD

  4. Enable both lines and histogram

Advanced Usage

  1. Switch toMulti-Currency USD

  2. Adjust histogram width for preference

  3. Hide lines for pure momentum view

  4. Use on multiple timeframes for confirmation

Trading Rules

  • Enter: All signals aligned + clear direction

  • Exit: Signals start conflicting or reverse

  • Avoid: Mixed signals or neutral zone congestion

Professional Benefits

  • Multi-Confirmation: Eliminates false signals

  • Visual Clarity: Instant market assessment

  • Flexible Analysis: Switch between simple/advanced modes

  • Risk Management: Clear "no trade" zones identified

  • Institutional Grade: Hedge-fund level analysis

The "When to Trade" Edge

This indicator's power comes from requiringmultiple aligned confirmations:

  1. Histogram momentum

  2. RSI line direction

  3. Cross signals

  4. Level positioning

When all elements align, you gethigh-probability setups. When they conflict, you getclear "stand aside" signals.


Perfect for: Gold traders, USD strength analysis, multi-timeframe confirmation, and professional-grade technical analysis.



65287

Best MetaTrader Indicators + Profitable Expert Advisors