IC Markets

New XAGUSD Scalping Strategy: Riding the Silver Volatility 🚀

Share, develop, and backtest custom MQL4/MQL5 Expert Advisors, Python data-scraping scripts, trading bots, and automated market alert systems.
Post Reply
PTScalper
Site Admin
Posts: 340
Joined: Mon Jul 20, 2026 1:28 pm

New XAGUSD Scalping Strategy: Riding the Silver Volatility 🚀

Post by PTScalper »

Hi traders :-)

I’ve been refining a specific scalping setup for XAGUSD (Silver) over the last few months. As many of you know, Silver moves differently than Gold; it tends to have sharper "spikes" and higher volatility, which makes it a goldmine for scalpers—provided you have the right filters to avoid the noise.

I’ve developed the "Silver Momentum Scalp" specifically for traders using IC Markets (thanks to their tight spreads on metals).

The Strategy Logic: The goal is to capture "Trend Pullbacks." We aren't trying to catch the absolute bottom or top; we are looking for high-probability entries where the trend is confirmed by a 200 EMA, but the entry is triggered by a mean-reversion toward the 50 EMA.

The Setup:

Timeframes: M5 or M15 (best for capturing intra-day moves).
Indicators: EMA 50 (Yellow), EMA 200 (Red), and RSI (14).
The Buy Trigger: Price must be above the 200 EMA. We wait for a pullback to the 50 EMA. When the RSI shows strength (above 50) and a bullish candle closes near the 50 EMA, we enter.
The Sell Trigger: Price must be below the 200 EMA. We wait for a rally toward the 50 EMA. When the RSI shows weakness (below 50) and a bearish candle confirms, we entry.
Why this works for XAG: Silver often "fake-outs" on lower timeframes. By using the 200 EMA as a filter, we stay on the right side of the macro trend. The RSI ensures we have enough momentum to move the price quickly toward our target.

Risk Management: Since Silver can be volatile, I recommend a fixed 1:2 Risk/Reward ratio. Because of IC Markets' high liquidity, I suggest setting your Stop Loss based on the recent swing high/low or 1.5x the ATR.

I’ve attached a Pine Script for TradingView below so you can backtest the signals visually. I’d love to hear your thoughts on how this performs during the London/New York crossover!

Let’s get those pips! 🚀

#XAGUSD #Scalping #SilverTrading #ICMarkets #TechnicalAnalysis
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
PTScalper
Site Admin
Posts: 340
Joined: Mon Jul 20, 2026 1:28 pm

Re: New XAGUSD Scalping Strategy: Riding the Silver Volatility 🚀

Post by PTScalper »

Here is prepared Pine script for TradingView traders:

Code: Select all

// @version=5
indicator("Silver Momentum Scalp - XAGUSD", overlay=true)

// Inputs
emaFastLen = input.int(50, "Fast EMA")
emaSlowLen = input.int(200, "Slow EMA")
rsiLen = input.int(14, "RSI Length")

// Calculations
ema50 = ta.ema(close, emaFastLen)
ema200 = ta.ema(close, emaSlowLen)
rsi = ta.rsi(close, rsiLen)

// Plotting
plot(ema50, color=color.yellow, title="EMA 50")
plot(ema200, color=color.red, title="EMA 200")

// Logic
longCondition = close > ema200 and ta.crossover(close, ema50) and rsi > 50
shortCondition = close < ema200 and ta.crossunder(close, ema50) and rsi < 50

// Plot Signals
plotshape(series=longCondition, title="Buy Signal", location=location.belowbar, color=color.green, style=shape.triangleup, size=size.small, text="BUY")
plotshape(series=shortCondition, title="Sell Signal", location=location.abovebar, color=color.red, style=shape.triangledown, size=size.small, text="SELL")

// Alerts
alertcondition(longCondition, title="Silver Buy Alert", message="Long entry for XAGUSD")
alertcondition(shortCondition, title="Silver Sell Alert", message="Short entry for XAGUSD")
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
PTScalper
Site Admin
Posts: 340
Joined: Mon Jul 20, 2026 1:28 pm

Re: New XAGUSD Scalping Strategy: Riding the Silver Volatility 🚀

Post by PTScalper »

To clarify a technical point before providing the code: IC Markets is a broker, not a separate trading platform. They provide their own servers for MT4 and MT5. Therefore, the code for MT4 and MT5 will work perfectly on your IC Markets account.

Below are the two versions of the Expert Advisor (EA). These are designed to automatically place trades based on the "Silver Momentum Scalp" rules.

Important Notes for IC Markets:
Suffixes: IC Markets often uses suffixes for symbols (e.g., XAGUSD.m instead of XAGUSD). The code below is written to detect the symbol automatically, but ensure your chart is on the correct pair.
Execution: These are "Expert Advisors." You must enable "Auto Trading" in your MT4/MT5 terminal.

1. MetaTrader 4 (MQL4) Expert Advisor

This script will scan the market and open a trade when the EMA and RSI conditions are met.

Code: Select all

//+------------------------------------------------------------------+
//|                                         SilverMomentumScalp.mq4 |
//|                                  Copyright 2024, Trading_Bot   |
//|                                          Designed for XAGUSD      |
//+------------------------------------------------------------------+
#property strict

// Input Parameters
input int      FastEMA = 50;
input int      SlowEMA = 200;
input int      RSIPeriod = 14;
input double   LotSize = 0.1;
input int      StopLossPips = 100; // Adjust based on Silver volatility
input int      TakeProfitPips = 200;
input int      MagicNumber = 123456;

// Global variables
int Ticket;

void OnTick()
{
   // Check if we already have an open position for this pair
   if(OrdersTotal() > 0) {
       for(int i=0; i<OrdersTotal(); i++) {
           if(OrderSelect(i, SELECT_BY_POS) && OrderMagicNumber() == MagicNumber) return;
       }
   }

   double ema50 = iMA(Symbol(), 0, FastEMA, 0, MODE_EMA, PRICE_CLOSE, 0);
   double ema200 = iMA(Symbol(), 0, SlowEMA, 0, MODE_EMA, PRICE_CLOSE, 0);
   double rsi = iRSI(Symbol(), 0, RSIPeriod, PRICE_CLOSE, 0);
   
   double Ask = MarketInfo(Symbol(), MODE_ASK);
   double Bid = MarketInfo(Symbol(), MODE_BID);
   double Point = MarketInfo(Symbol(), MODE_POINT);

   // Buy Condition: Price > 200 EMA, Price > 50 EMA, RSI > 50
   if(Ask > ema200 && Ask > ema50 && rsi > 50 && rsi < 70)
   {
      Ticket = OrderSend(Symbol(), OP_BUY, LotSize, Ask, 3, Ask - (StopLossPips * Point), Ask + (TakeProfitPips * Point), "Silver Scalp", MagicNumber, 0, clrGreen);
   }

   // Sell Condition: Price < 200 EMA, Price < 50 EMA, RSI < 50
   if(Bid < ema200 && Bid < ema50 && rsi < 50 && rsi > 30)
   {
      Ticket = OrderSend(Symbol(), OP_SELL, LotSize, Bid, 3, Bid + (StopLossPips * Point), Bid - (TakeProfitPips * Point), "Silver Scalp", MagicNumber, 0, clrRed);
   }
}
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
PTScalper
Site Admin
Posts: 340
Joined: Mon Jul 20, 2026 1:28 pm

Re: New XAGUSD Scalping Strategy: Riding the Silver Volatility 🚀

Post by PTScalper »

2. MetaTrader 5 (MQL5) Expert Advisor

MT5 handles indicators and trading slightly differently. This code uses the standard Trade library for better reliability on IC Markets.

Code: Select all

//+------------------------------------------------------------------+
//|                                          SilverMomentumScalp.mq5 |
//|                                  Copyright 2024, Trading_Bot    |
//|                                          Designed for XAGUSD      |
//+------------------------------------------------------------------+
#property strict

#include <Trade\Trade.mqh>

// Input Parameters
input int      FastEMA = 50;
input int      SlowEMA = 200;
input int      RSIPeriod = 14;
input double   LotSize = 0.1;
input int      StopLossPips = 100;
input int      TakeProfitPips = 200;
input int      MagicNumber = 123456;

// Handles
int handleEMA50;
int handleEMA200;
int handleRSI;

CTrade trade;

int OnInit()
{
   trade.SetExpertMagicNumber(MagicNumber);
   handleEMA50 = iMA(_Symbol, _Period, FastEMA, 0, MODE_EMA, PRICE_CLOSE);
   handleEMA200 = iMA(_Symbol, _Period, SlowEMA, 0, MODE_EMA, PRICE_CLOSE);
   handleRSI = iRSI(_Symbol, _Period, RSIPeriod, PRICE_CLOSE);
   
   return(INIT_SUCCEEDED);
}

void OnTick()
{
   double ema50[], ema200[], rsiVal[];
   ArraySetAsSeries(ema50, true);
   ArraySetAsSeries(ema200, true);
   ArraySetAsSeries(rsiVal, true);

   if(CopyBuffer(handleEMA50, 0, 0, 3, ema50) < 3) return;
   if(CopyBuffer(handleEMA200, 0, 0, 3, ema200) < 3) return;
   if(CopyBuffer(handleRSI, 0, 0, 3, rsiVal) < 3) return;

   double Ask = SymbolInfoDouble(_Symbol, SYMBOL_ASK);
   double Bid = SymbolInfoDouble(_Symbol, SYMBOL_BID);
   double point = SymbolInfoDouble(_Symbol, SYMBOL_POINT);

   // Check if position exists
   bool positionOpen = false;
   for(int i=PositionsTotal()-1; i>=0; i--)
   {
      if(PositionGetSymbol(i) == _Symbol) positionOpen = true;
   }

   if(!positionOpen)
   {
      // Buy Condition
      if(Ask > ema200[0] && Ask > ema50[0] && rsiVal[0] > 50 && rsiVal[0] < 70)
      {
         trade.Buy(LotSize, _Symbol, Ask, Ask - (StopLossPips * point), Ask + (TakeProfitPips * point), "Silver Scalp");
      }
      // Sell Condition
      else if(Bid < ema200[0] && Bid < ema50[0] && rsiVal[0] < 50 && rsiVal[0] > 30)
      {
         trade.Sell(LotSize, _Symbol, Bid, Bid + (StopLossPips * point), Bid - (TakeProfitPips * point), "Silver Scalp");
      }
   }
}
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
PTScalper
Site Admin
Posts: 340
Joined: Mon Jul 20, 2026 1:28 pm

Re: New XAGUSD Scalping Strategy: Riding the Silver Volatility 🚀

Post by PTScalper »

How to install these on IC Markets:

For MT4:

Open your MT4 terminal provided by IC Markets.
Go to File -> Open Data Folder.
Navigate to MQL4 -> Experts.
Create a new file named SilverScalp.mq4 and paste the code above into it.
Restart MT4 or right-click "Expert Advisors" in the Navigator window and click "Refresh."

For MT5:

Open your MT5 terminal.
Press F4 to open the MetaEditor.
Create a "New Expert Advisor" named SilverScalp.
Paste the MQL5 code provided above.
Click Compile at the top.
The EA will now appear in your MT5 Navigator window.
Final Step:

Drag the EA onto a XAGUSD chart (M5 or M15 timeframe).
Ensure the "Algo Trading" button at the top of the screen is Green.
Preserve your own money. Scale with the market's money. Exponential growth is the ultimate key.
Post Reply