The core of this strategy relies on the historical correlation between gold and silver. Instead of guessing market direction, you are trading the spread between the two metals [1].
The Gold/Silver ratio simply represents how many ounces of silver it takes to buy one ounce of gold [1]. When the ratio reaches historical extremes, it tends to snap back to its historical mean [1].
Hypothetical Setup & Rules:
Assuming standard retail broker conditions and a swing-trading approach.
Timeframe: Daily (D1) or 4-Hour (H4) charts [1].
The Indicator: A custom ratio indicator plotting XAUUSD divided by XAGUSD.
Shorting the Ratio (Gold is Overvalued):
Trigger: The ratio climbs above 80.0 [1].
Action: Sell XAUUSD and Buy XAGUSD [1]. You are betting that silver will catch up to gold, or gold will drop faster than silver.
Longing the Ratio (Silver is Overvalued):
Trigger: The ratio drops below 60.0 (or historically 50.0) [1].
Action: Buy XAUUSD and Sell XAGUSD [1].
Position Sizing (Crucial): You cannot simply trade 1 lot of gold and 1 lot of silver. Brokers have completely different contract sizes for these metals (e.g., 100 oz for Gold vs. 5000 oz for Silver) [2]. You must balance your lot sizes so that a 1% price move in gold yields the exact same dollar profit/loss as a 1% move in silver in your account currency.
Exit / Take Profit: Close both legs simultaneously when the ratio reverts back to the historical mean (typically around 65.0 - 70.0).
Stop Loss: Close both legs if the ratio continues to diverge past a structural extreme (e.g., the ratio hits 95.0), or use a fixed percentage stop (e.g., capping the total floating loss at 2% of your account equity).
MT4 Code (MQL4 Custom Indicator)
Because trading two different symbols simultaneously requires precise, broker-specific contract sizing, running a fully automated multi-currency Expert Advisor (EA) is highly risky for this strategy. If the EA miscalculates the contract size, you could accidentally over-leverage one side of the trade.
The most reliable way to trade this in MT4 is by using a Custom Indicator that plots the ratio, allowing you to manage the dual entries manually.
How to install:
Open MT4, and press F4 to open the MetaEditor.
Click New -> Custom Indicator -> Name it GoldSilverRatio.
Delete the default code, paste the script below, and click Compile.
Drag the indicator from your Navigator panel onto your Gold chart. (Note: Ensure the symbol names in the indicator settings exactly match what your broker uses, e.g., "GOLD" and "SILVER" if they don't use XAUUSD/XAGUSD).
Code: Select all
//+------------------------------------------------------------------+
//| GoldSilverRatio.mq4 |
//| |
//+------------------------------------------------------------------+
#property copyright "Educational Purposes"
#property link ""
#property version "1.00"
#property strict
// Plot settings
#property indicator_separate_window
#property indicator_buffers 1
#property indicator_color1 clrDodgerBlue
#property indicator_width1 2
// Key Strategy Levels
#property indicator_level1 80.0
#property indicator_level2 60.0
#property indicator_level3 70.0 // Mean reversion target
#property indicator_levelcolor clrDarkGray
#property indicator_levelstyle STYLE_DASHDOT
// User Inputs
input string GoldSymbol = "XAUUSD"; // Exact Gold Symbol on your broker
input string SilverSymbol = "XAGUSD"; // Exact Silver Symbol on your broker
double RatioBuffer[];
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
SetIndexBuffer(0, RatioBuffer);
SetIndexStyle(0, DRAW_LINE);
SetIndexLabel(0, "G/S Ratio");
IndicatorShortName("Gold/Silver Ratio (" + GoldSymbol + "/" + SilverSymbol + ")");
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
const int prev_calculated,
const datetime &time[],
const double &open[],
const double &high[],
const double &low[],
const double &close[],
const long &tick_volume[],
const long &volume[],
const int &spread[])
{
// Handle missing data or first load
int limit = rates_total - prev_calculated;
if(limit > 0)
{
limit = rates_total - 1;
}
// Calculate ratio for each candle
for(int i = limit; i >= 0; i--)
{
double goldPrice = iClose(GoldSymbol, 0, i);
double silverPrice = iClose(SilverSymbol, 0, i);
// Prevent division by zero if a symbol is missing data
if(silverPrice > 0 && goldPrice > 0)
{
RatioBuffer[i] = goldPrice / silverPrice;
}
else
{
RatioBuffer[i] = 0;
}
}
return(rates_total);
}
//+------------------------------------------------------------------+