Page 1 of 2

AUDUSD commodity mood and short gold scalp hedges discussion

Posted: Mon Sep 14, 2026 10:39 pm
by LondonScalper
AUDUSD commodity mood and short gold -- hedge discussion, not a system.

Sometimes AUD and gold move together on risk/commodity tone; sometimes they diverge hard. I have experimented with tiny gold hedges against an AUD scalp when the story was clearly commodity-driven. Mostly I concluded retail hedging of this sort adds cost and complexity for little benefit at my hold times.

Current stance
Pick one expression of the theme. If the idea is risk-on commodity, trade AUD or gold -- not both full size. Correlation hedges for a three-minute scalp are usually theatre.

Still curious whether anyone here runs a disciplined micro-hedge between AUD and XAU that survives costs, or whether single-instrument clarity wins.

What is your rule when AUD and gold disagree mid-London?

For teaching/journal purposes I still note AUD-gold agreement as a day-type tag. It helps explain regimes. It rarely justifies a second ticket. Clarity over cleverness -- especially when both instruments can gap on the same headline.

Re: AUDUSD commodity mood and short gold scalp hedges discussion

Posted: Sun Sep 27, 2026 11:34 am
by PropScalpDesk
When they disagree mid-London, I take it as a reason to leave AUD alone rather than to pick a side. AUD's short-term moves have more to do with China data, iron ore and copper than with gold, while gold intraday is mostly real yields and the dollar. So a split usually means two different stories are running, and my AUD scalp has no clear driver.

Agree on hedging. Over a three-minute hold, paying two spreads so that one leg can offset the other is almost always a cost with no benefit. The agreement tag as a day-type note sounds more useful than the hedge ever was.

Re: AUDUSD commodity mood and short gold scalp hedges discussion

Posted: Sun Sep 27, 2026 3:31 pm
by PTScalper
LondonScalper wrote: Mon Sep 14, 2026 10:39 pm AUDUSD commodity mood and short gold -- hedge discussion, not a system.

Sometimes AUD and gold move together on risk/commodity tone; sometimes they diverge hard. I have experimented with tiny gold hedges against an AUD scalp when the story was clearly commodity-driven. Mostly I concluded retail hedging of this sort adds cost and complexity for little benefit at my hold times.

Current stance
Pick one expression of the theme. If the idea is risk-on commodity, trade AUD or gold -- not both full size. Correlation hedges for a three-minute scalp are usually theatre.

Still curious whether anyone here runs a disciplined micro-hedge between AUD and XAU that survives costs, or whether single-instrument clarity wins.

What is your rule when AUD and gold disagree mid-London?

For teaching/journal purposes I still note AUD-gold agreement as a day-type tag. It helps explain regimes. It rarely justifies a second ticket. Clarity over cleverness -- especially when both instruments can gap on the same headline.
Hi LondonScalper,

Micro-hedging a three-minute scalp across two different asset classes in the retail environment is a statistical trap. You are crossing the spread twice, paying two sets of commissions, and enduring dual-leg slippage just to isolate a macro beta that might only yield a few pips of net edge. While institutional stat-arb desks run this exact dispersion trade, they do it with sub-millisecond colocation and fraction-of-a-pip execution costs. At retail hold times and costs, your conclusion is spot on: single-instrument clarity wins every time. Clarity over cleverness.

When AUD and Gold decouple mid-London, it signals that the broad "commodity/dollar" theme is dead for the session and idiosyncratic flows have taken over. Gold might be catching a localized European safe-haven bid as real yields shift, while AUD is getting dragged down by a weak copper print or poor Chinese equity data overnight.

My rule for mid-London divergence: Drop the macro narrative entirely and trade pure market microstructure.

Re: AUDUSD commodity mood and short gold scalp hedges discussion

Posted: Sun Sep 27, 2026 3:31 pm
by PTScalper
If the pair you are watching (e.g., AUD/USD) is sweeping a clear 15-minute liquidity pool and printing a valid 1-minute entry trigger, you take the trade based strictly on the local price action and order flow. You do not look at Gold for confirmation, because the cross-asset correlation is temporarily broken. If the divergence causes both tapes to look fragmented and sloppy, the rule is to sit on your hands. Divergence is a fantastic filter to keep you out of low-probability, choppy chop.

For your journaling and teaching, tagging these environments visually is a highly effective way to review regimes later. Below is a Pine Script v5 indicator built specifically to run in a bottom pane. It calculates a rolling Pearson correlation and measures short-term directional momentum to tag the current "commodity mood."

Re: AUDUSD commodity mood and short gold scalp hedges discussion

Posted: Sun Sep 27, 2026 3:31 pm
by PTScalper
AUD/XAU Commodity Mood & Regime Tag (Pine Script v5)

This script plots the rolling correlation and shades the background to identify the regime:

Green Background: High correlation + both trending up (Clean Risk-On / Weak USD).

Red Background: High correlation + both trending down (Clean Risk-Off / Strong USD).

Gray Background: Divergence or broken correlation (Idiosyncratic drivers / Proceed with caution).

Re: AUDUSD commodity mood and short gold scalp hedges discussion

Posted: Sun Sep 27, 2026 3:32 pm
by PTScalper
Pine script version 1.0

Code: Select all

//@version=5
indicator("AUD & Gold Regime Tag [Journal]", shorttitle="Commodity Mood", overlay=false)

// --- Inputs ---
sym1 = input.symbol("OANDA:AUDUSD", "Primary Asset (AUD)")
sym2 = input.symbol("OANDA:XAUUSD", "Compare Asset (Gold)")
corrLen = input.int(20, "Correlation Length", minval=5)
momLen = input.int(10, "Momentum Length (ROC)", minval=2)

// --- Data Fetching ---
aud_close = request.security(sym1, timeframe.period, close)
xau_close = request.security(sym2, timeframe.period, close)

// --- Calculations ---
// 1. Momentum (Rate of Change) to determine directional agreement
aud_roc = ta.roc(aud_close, momLen)
xau_roc = ta.roc(xau_close, momLen)

// 2. Pearson Correlation
rolling_corr = ta.correlation(aud_close, xau_close, corrLen)

// 3. Directional Agreement
// 1 = Bullish Agreement, -1 = Bearish Agreement, 0 = Divergence
agreement = (aud_roc > 0 and xau_roc > 0) ? 1 : (aud_roc < 0 and xau_roc < 0) ? -1 : 0

// --- Plotting ---
// Correlation Line
plot(rolling_corr, title="Rolling Correlation", color=color.rgb(41, 98, 255), linewidth=2)

// Threshold Levels
hline(0.7, "High Positive Correlation", color=color.new(color.green, 50), linestyle=hline.style_dashed)
hline(-0.7, "High Negative Correlation", color=color.new(color.red, 50), linestyle=hline.style_dashed)
hline(0, "Zero Line", color=color.new(color.gray, 50))

// --- Regime Tagging (Background) ---
// Green: High positive correlation + Both moving up
// Red: High positive correlation + Both moving down
// Gray: Correlation broken or directional disagreement
bullish_regime = rolling_corr > 0.6 and agreement == 1
bearish_regime = rolling_corr > 0.6 and agreement == -1
divergent_regime = rolling_corr < 0.3 and agreement == 0

bgcolor(bullish_regime ? color.new(color.green, 85) : na, title="Bullish Theme")
bgcolor(bearish_regime ? color.new(color.red, 85) : na, title="Bearish Theme")
bgcolor(divergent_regime ? color.new(color.gray, 90) : na, title="Divergent Theme")
By keeping this running during the session, you can instantly see if a sudden move is an isolated structural sweep (no background color) or part of a broader macro regime shift (solid green/red background).

Re: AUDUSD commodity mood and short gold scalp hedges discussion

Posted: Sun Sep 27, 2026 3:33 pm
by PTScalper
MetaTrader handles cross-asset analysis inherently differently than TradingView. We don't have a native bgcolor() function that easily spans from a subwindow to the main chart background without creating hundreds of clunky graphical rectangle objects that lag the terminal.

To keep the terminal fast and the visuals clean, these conversions express the regimes directly inside the oscillator subwindow:

MT4: Uses a standard blue correlation line, with colored histograms (Green/Red/Gray) filling the space underneath during active regimes.

MT5: Uses the modern DRAW_COLOR_LINE feature, rendering a single continuous line that automatically changes colors segment-by-segment as the regime shifts.

Re: AUDUSD commodity mood and short gold scalp hedges discussion

Posted: Sun Sep 27, 2026 3:34 pm
by PTScalper
MQL4 (MetaTrader 4)

Save this as Commodity_Mood.mq4 in your MQL4\Indicators folder.

Code: Select all

//+------------------------------------------------------------------+
//|                                             Commodity_Mood.mq4   |
//+------------------------------------------------------------------+
#property strict
#property indicator_separate_window
#property indicator_minimum -1.0
#property indicator_maximum 1.0
#property indicator_buffers 4

#property indicator_color1 clrDodgerBlue
#property indicator_color2 clrMediumSeaGreen
#property indicator_color3 clrCrimson
#property indicator_color4 clrGray

//--- Inputs
input string   InpSymbol2  = "XAUUSD"; // Compare Asset
input int      InpCorrLen  = 20;       // Correlation Length
input int      InpMomLen   = 10;       // Momentum Length (ROC)

//--- Buffers
double         CorrBuffer[];
double         BullBuffer[];
double         BearBuffer[];
double         DivBuffer[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
   IndicatorShortName("Commodity Mood (" + Symbol() + " / " + InpSymbol2 + ")");

   SetIndexBuffer(0, CorrBuffer);
   SetIndexStyle(0, DRAW_LINE, STYLE_SOLID, 2);
   SetIndexLabel(0, "Correlation");

   SetIndexBuffer(1, BullBuffer);
   SetIndexStyle(1, DRAW_HISTOGRAM, STYLE_SOLID, 2);
   SetIndexLabel(1, "Bullish Theme");

   SetIndexBuffer(2, BearBuffer);
   SetIndexStyle(2, DRAW_HISTOGRAM, STYLE_SOLID, 2);
   SetIndexLabel(2, "Bearish Theme");

   SetIndexBuffer(3, DivBuffer);
   SetIndexStyle(3, DRAW_HISTOGRAM, STYLE_SOLID, 2);
   SetIndexLabel(3, "Divergent Theme");
   
   IndicatorSetDouble(INDICATOR_LEVELVALUE, 0, 0.7);
   IndicatorSetDouble(INDICATOR_LEVELVALUE, 1, -0.7);
   IndicatorSetDouble(INDICATOR_LEVELVALUE, 2, 0.0);

   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[])
  {
   if(rates_total < InpCorrLen || rates_total < InpMomLen)
      return(0);

   int limit = rates_total - prev_calculated;
   if(limit > 0)
     {
      limit = rates_total - MathMax(InpCorrLen, InpMomLen) - 1;
      if(prev_calculated > 0)
         limit = rates_total - prev_calculated + 1;
     }

   for(int i = limit; i >= 0; i--)
     {
      // 1. Momentum (Rate of Change)
      double roc1 = 0, roc2 = 0;
      double c1_now = close[i];
      double c1_past = close[i + InpMomLen];
      if(c1_past != 0) roc1 = (c1_now - c1_past) / c1_past * 100.0;

      double c2_now = iClose(InpSymbol2, 0, i);
      double c2_past = iClose(InpSymbol2, 0, i + InpMomLen);
      if(c2_now == 0 || c2_past == 0) continue; // Skip if secondary asset data is missing
      roc2 = (c2_now - c2_past) / c2_past * 100.0;

      // 2. Pearson Correlation
      double sumX = 0, sumY = 0;
      for(int k = 0; k < InpCorrLen; k++)
        {
         sumX += close[i + k];
         sumY += iClose(InpSymbol2, 0, i + k);
        }
      double meanX = sumX / InpCorrLen;
      double meanY = sumY / InpCorrLen;

      double cov = 0, varX = 0, varY = 0;
      for(int k = 0; k < InpCorrLen; k++)
        {
         double dx = close[i + k] - meanX;
         double dy = iClose(InpSymbol2, 0, i + k) - meanY;
         cov += dx * dy;
         varX += dx * dx;
         varY += dy * dy;
        }

      double r = 0;
      if(varX > 0 && varY > 0)
         r = cov / MathSqrt(varX * varY);

      CorrBuffer[i] = r;

      // 3. Directional Agreement
      int agreement = 0;
      if(roc1 > 0 && roc2 > 0) agreement = 1;
      else if(roc1 < 0 && roc2 < 0) agreement = -1;

      // 4. Regime Tagging
      BullBuffer[i] = EMPTY_VALUE;
      BearBuffer[i] = EMPTY_VALUE;
      DivBuffer[i] = EMPTY_VALUE;

      if(r > 0.6 && agreement == 1)      BullBuffer[i] = r;
      else if(r > 0.6 && agreement == -1) BearBuffer[i] = r;
      else if(r < 0.3 && agreement == 0)  DivBuffer[i] = r;
     }

   return(rates_total);
  }

Re: AUDUSD commodity mood and short gold scalp hedges discussion

Posted: Sun Sep 27, 2026 3:34 pm
by PTScalper
MQL5 (MetaTrader 5)

Save this as Commodity_Mood.mq5 in your MQL5\Indicators folder.

Code: Select all

//+------------------------------------------------------------------+
//|                                             Commodity_Mood.mq5   |
//+------------------------------------------------------------------+
#property strict
#property indicator_separate_window
#property indicator_minimum -1.0
#property indicator_maximum 1.0
#property indicator_buffers 2
#property indicator_plots   1

// We use DRAW_COLOR_LINE for a seamless single line that changes colors
#property indicator_label1  "Correlation"
#property indicator_type1   DRAW_COLOR_LINE
#property indicator_color1  clrDodgerBlue, clrMediumSeaGreen, clrCrimson, clrGray
#property indicator_style1  STYLE_SOLID
#property indicator_width1  2

//--- Inputs
input string   InpSymbol2  = "XAUUSD"; // Compare Asset
input int      InpCorrLen  = 20;       // Correlation Length
input int      InpMomLen   = 10;       // Momentum Length (ROC)

//--- Buffers
double         CorrBuffer[];
double         ColorBuffer[];

//+------------------------------------------------------------------+
//| Custom indicator initialization function                         |
//+------------------------------------------------------------------+
int OnInit()
  {
   IndicatorSetString(INDICATOR_SHORTNAME, "Commodity Mood (" + _Symbol + " / " + InpSymbol2 + ")");

   SetIndexBuffer(0, CorrBuffer, INDICATOR_DATA);
   SetIndexBuffer(1, ColorBuffer, INDICATOR_COLOR_INDEX);
   
   IndicatorSetInteger(INDICATOR_LEVELS, 3);
   IndicatorSetDouble(INDICATOR_LEVELVALUE, 0, 0.7);
   IndicatorSetDouble(INDICATOR_LEVELVALUE, 1, -0.7);
   IndicatorSetDouble(INDICATOR_LEVELVALUE, 2, 0.0);

   return(INIT_SUCCEEDED);
  }

//+------------------------------------------------------------------+
//| Custom indicator iteration function                              |
//+------------------------------------------------------------------+
int OnCalculate(const int rates_total,
                const int prev_calculated,
                const int begin,
                const double &price[])
  {
   int lookback = MathMax(InpCorrLen, InpMomLen) + 1;
   if(rates_total < lookback)
      return(0);
      
   // Setup data arrays for Series alignment (Index 0 = current bar)
   double c1[], c2[];
   ArraySetAsSeries(c1, true);
   ArraySetAsSeries(c2, true);
   
   int count = rates_total - prev_calculated;
   if (prev_calculated == 0) count = rates_total;
   
   // Copy slightly more data to account for the lookback period
   int copy_count = count + lookback;
   if(copy_count > rates_total) copy_count = rates_total;
   
   if(CopyClose(_Symbol, _Period, 0, copy_count, c1) < copy_count) return(0);
   if(CopyClose(InpSymbol2, _Period, 0, copy_count, c2) < copy_count) return(0);
   
   ArraySetAsSeries(CorrBuffer, true);
   ArraySetAsSeries(ColorBuffer, true);
   
   int start = count - 1;
   if(prev_calculated == 0) start = copy_count - lookback - 1;
   
   for(int i = start; i >= 0; i--)
     {
      // 1. Momentum (Rate of Change)
      double c1_now = c1[i];
      double c1_past = c1[i + InpMomLen];
      double roc1 = 0;
      if(c1_past != 0) roc1 = (c1_now - c1_past) / c1_past * 100.0;
      
      double c2_now = c2[i];
      double c2_past = c2[i + InpMomLen];
      double roc2 = 0;
      if(c2_past != 0) roc2 = (c2_now - c2_past) / c2_past * 100.0;
      
      // 2. Pearson Correlation
      double sumX = 0, sumY = 0;
      for(int k = 0; k < InpCorrLen; k++)
        {
         sumX += c1[i + k];
         sumY += c2[i + k];
        }
      double meanX = sumX / InpCorrLen;
      double meanY = sumY / InpCorrLen;
      
      double cov = 0, varX = 0, varY = 0;
      for(int k = 0; k < InpCorrLen; k++)
        {
         double dx = c1[i + k] - meanX;
         double dy = c2[i + k] - meanY;
         cov += dx * dy;
         varX += dx * dx;
         varY += dy * dy;
        }
        
      double r = 0;
      if(varX > 0 && varY > 0) r = cov / MathSqrt(varX * varY);
      
      CorrBuffer[i] = r;
      
      // 3. Directional Agreement
      int agreement = 0;
      if(roc1 > 0 && roc2 > 0) agreement = 1;
      else if(roc1 < 0 && roc2 < 0) agreement = -1;
      
      // 4. Regime Tagging (Colors map to indicator_color1 property indexes)
      // 0 = DodgerBlue, 1 = MediumSeaGreen (Bull), 2 = Crimson (Bear), 3 = Gray (Div)
      if(r > 0.6 && agreement == 1)       ColorBuffer[i] = 1;
      else if(r > 0.6 && agreement == -1) ColorBuffer[i] = 2;
      else if(r < 0.3 && agreement == 0)  ColorBuffer[i] = 3;
      else                                ColorBuffer[i] = 0;
     }
     
   return(rates_total);
  }

Re: AUDUSD commodity mood and short gold scalp hedges discussion

Posted: Sun Sep 27, 2026 3:34 pm
by PTScalper
Note on backtesting/real-time: MetaTrader must have historical data downloaded for the secondary symbol (XAUUSD) for this indicator to populate historically. If you apply it and see a flat line initially, jump to the XAUUSD chart, scroll back a bit to force the terminal to fetch the history, and then return to AUDUSD.