Open-source Pine scripts written for gold (XAU/USD): session and range tools, breakout and scalping strategies, and indicators tuned to gold's volatility.
Gold moves in larger steps than most currency pairs and reacts sharply to US data such as payrolls and inflation. Scripts in this category were written for XAU/USD or say so in their description.
Price and point values differ between data feeds and brokers, so check any fixed distances in a script's settings, such as stops or zone widths, against the gold chart you trade on.
45 of these 341 scripts are marked Repaints, or read higher-timeframe data with lookahead on.
Before You Use One
Check fixed distances in the settings against your gold chart's price scale.
Look at how it behaves around US data releases.
Backtest a strategy with gold's real spread as slippage.
Gold Scalping BOS & CHoCH is an overlay strategy designed for detecting market structure shifts. It calculates rolling swing highs and lows to identify Break of Structure (BOS) and Change of Character (CHoCH) events. Long signals trigger when bullish BOS and C
Gold Scalping BOS & CHoCH with MA Filter is a strategy that identifies market structure shifts using Break of Structure (BOS) and Change of Character (CHoCH) signals alongside exponential moving average trend filters. Long trades enter when bullish BOS, bullis
This indicator plots an exponential moving average on the price chart and formats structured JSON alert payloads on confirmed bar closes. It is designed to export real-time market data to external webhook receivers or AI assistant backends. Inputs allow users
LuxAlgo Hybrid Gold Scalper is a price-chart strategy aimed at gold. It stacks a fast, slow, trend and 200-period bias EMA to mark trend direction, then filters strength with RSI, ADX and an intraday VWAP. Swing highs and lows are marked from pivot length. Set
This indicator plots several New York opening-range breakout models on the price chart and can also show a combined confidence-scored signal. Enabled models include classic Crabel, a five-minute scalper, a standard fifteen-minute breakout, and a gold variant,
This strategy plots on the XAUUSD price chart and looks for Smart Money Concepts entries on the fifteen-minute timeframe. It scores fair value gaps, order blocks, liquidity sweeps, break of structure, and change of character, plus EMA, RSI, MACD, and higher-ti
This overlay indicator classifies candle volume against a Wilder moving average and highlights unusually strong volume on the price chart. In automatic mode it requests matching CME or COMEX futures volume for mapped forex, gold, silver, crypto, and index symb
This overlay indicator identifies Smart Money Concepts (SMC) and Inner Circle Trader (ICT) market structure elements directly on the price chart. It detects higher highs, lower lows, Break of Structure (BOS), and Change of Character (CHoCH) labels alongside st
This strategy implements a channel breakout system directly on the main price chart. It calculates highest highs and lowest lows over configurable entry and exit periods using historical candles. A long entry triggers when the close breaks above the entry chan
This indicator detects and visualizes Smart Money Concepts (SMC) and Inner Circle Trader (ICT) structures directly on the price chart. It performs multi-timeframe analysis across customizable trend (H1), entry (M15), and micro (M5) timeframes to identify bulli
This indicator calculates relative currency strength across major foreign exchange currencies and gold by pulling multi-symbol price data via security calls. Users can select specific currency pair sets (such as GBP, EUR, USD, or XAU) or a global strength over
This intraday strategy implements session-based trading rules tailored for gold on short timeframes. It tracks the Asian session price range, VWAP, 20-period EMA, and previous day high and low levels to identify liquidity sweeps during London and New York trad
This strategy plots dynamic pivot-based support and resistance trendlines on the price chart and trades breakouts beyond those lines. By default it allows longs only when EMA 50 is above EMA 200 and an RSI-SMA momentum filter is met, with an ATR entry buffer.
This strategy enters one long trade when the bar low comes within a set point tolerance of the prior day's low and the close finishes above that level. Entries are allowed only inside a UTC session and are blocked after a Friday cutoff hour. It stays flat unti
Lucid 100K is an automated evaluation strategy tailored for micro futures contracts such as MES, MGC, and MNQ on lower timeframes. It operates a two-phase state machine that moves from an initial risk-averse lock-in phase to an expanded payout phase once targe
This indicator overlays an order flow intelligence suite directly on the price chart. It renders a liquidity heatmap across configured price zones, alongside an on-chart information panel displaying volume delta, cumulative volume delta, a momentum compass bas
Breakout Follow Trend is a quantitative trend-following strategy designed to capture volatility expansion. It triggers entries when price breaks out of Bollinger Bands, filtered by an EMA trend filter, optional candle overlap rules, and a volume moving average
This strategy executes trades on gold based on a confluence of Supertrend, RSI, MACD, Bollinger Bands, and volume spikes. It enters long or short positions when trend direction aligns with momentum and price positioning relative to volatility bands, filtered b
This indicator plots buy and sell signals on the price chart overlay using Supertrend as the primary trend filter combined with multiple moving average crossover strategies. Users select from preset modes or enable custom combinations via toggles for 12 differ
Cyber HUD XAU is an overlay indicator designed for XAUUSD that combines trend, momentum, and volatility filters. It calculates fast and slow ATR ratios alongside local price ranges to detect consolidation and chop filter states. The script evaluates candle bod
GainzAlgo EA is a trend-following strategy designed for scalping and intraday trading, optimized for gold and liquid assets. It establishes trend direction using a three-EMA alignment alongside RSI momentum filters and an optional higher-timeframe trend confir
This strategy executes long trades based on the Supertrend indicator and candle color confirmation. It enters when a fresh bullish Supertrend flip occurs on a green candle and exits when the trend flips bearish on a red candle. It also places bracket orders wi
This indicator plots relative strength lines for major currencies and optional metals and oil in a separate pane. It builds each series from a chosen source, either raw price or RSI or stochastics, then applies a selected moving-average smoother. Resolution ca
Green Wave plots a Fibonacci golden zone between the latest swing high and swing low on the price chart. It finds the range high and low over a configurable swing length, stores recent pivots, and draws two retracement lines, by default at 0.5 and 0.618, with
This indicator identifies Smart Money Concepts and liquidity levels directly on the price chart. It detects equal highs, equal lows, liquidity sweeps, fair value gaps, order blocks, displacement moves, and market structure shifts such as break of structure and
This indicator plots Opening Range Breakout signals on the price chart for the New York session. It implements nine ORB models with varying conditions including volume filters, RSI thresholds, FVG detection, and compression requirements. Signals display entrie
Gamma Levels Auto plots daily options-derived dealer gamma levels directly on the price chart. It projects structural levels (7 to 45 DTE) and near-term 0DTE levels, including gamma flip zones, call and put walls, max pain, expected move, and Vanna or Charm st
This overlay indicator maps market structure on the price chart. It marks confirmed swing points and draws continuation breaks and reversal breaks, with optional higher-high and lower-low labels. A baseline and volatility envelope can sit on price, and an opti
This indicator calculates a derivative Relative Strength Index using polynomial curve fitting and linear algebra routines to identify market momentum shifts. It displays long, short, and exit signal labels directly on the main price chart alongside risk-to-rew
The XAUUSD Breakout Grid strategy executes market orders when price crosses defined dollar-denominated grid levels on the price chart. It tracks entries using array structures and dynamically adjusts position sizing to balance net exposure between long and sho
This indicator evaluates gold market conditions using a multi-factor confluence model on the price chart. It combines Stochastic, RSI, triple EMAs, Fibonacci retracements, automated support and resistance levels, wick reclaims, and volume spikes into an aggreg
This indicator analyzes price action on XAUUSD Gold using Smart Money Concepts and macro trend filters. It evaluates daily macro bias using a 200-period Exponential Moving Average and 20-day high and low breakout levels. Higher timeframe inputs detect hourly F
This indicator overlays technical analysis tools designed for gold scalping onto the main price chart. It plots configurable fast, medium, and slow simple moving averages alongside fast and slow exponential moving averages. Market session backgrounds identify
This strategy calculates the cross-market ratio between gold and EURUSD alongside an ATR volatility percentage and a higher-timeframe daily SMA trend filter. It executes session-tailored entries across the Asian, London, and New York sessions using RSI, ADX, a
GEX Levels is an overlay indicator that draws options gamma exposure levels on NAS100, XAUUSD and BTCUSD charts. A companion Python script calculates the levels, and the user pastes its one-line output into a text setting. The indicator picks the block matchin
A strategy that marks confirmed 4H and daily pivot highs and lows, draws Fibonacci levels with an optional golden zone shading, and plots EMA 50 and EMA 200. A Hardened MTF mode adds RSI confirmation, EMA alignment and candle checks, allowing one trade per con
Detects liquidity sweeps of the Asian or London session range, followed by a reclaim and a break of structure, on the 5-minute chart. It plots entry, stop and take-profit levels with a reward-to-risk target, skips setups whose stop exceeds a multiple of ATR, a
Indicatorv6SMC / ICT / price actionSessions & time
A large all-in-one overlay aimed at gold and Bitcoin charts. It combines trend EMAs, an HMA baseline, an elastic EMA, order blocks, fair value gaps, breaker blocks, liquidity sweeps, an Asian range box, key levels, VWAP, market structure and several tables inc
This indicator plots Malaysian support and resistance levels on the price chart. It finds swing highs and lows, then marks those prices as support or resistance and labels each level Fresh, Unfresh, or Flip after retests and breaks. Separate major swing settin
This overlay indicator draws gold round-number levels (00, 25, 50, 75, with optional minor levels) around price and displays pasted intraday and open interest option data as call and put bars beside them. The user pastes the data into text settings. A futures-
A strategy built around a session VWAP and ATR bands during the London window, 08:00 to 12:00 UTC by default. It looks for a pullback to an ATR band followed by a VWAP cross, filtered by an RSI threshold, and evaluates signals on confirmed bars. Stops and targ
This intraday strategy executes trades on gold (XAUUSD) 5-minute charts using 15-minute higher-timeframe bias. It identifies key liquidity levels—such as previous day highs and lows, session levels, swings, and equal highs or lows—and waits for confirmed liqui
A price-chart indicator that plots a basis line with volatility bands and graded buy and sell setups. Presets for Scalping, Day, Swing or Custom, plus an auto market profile that detects forex, gold, crypto, stocks or futures, set trend length, band width and
A price-chart indicator designed for gold that scores buy and sell setups from several smart money concepts. It finds swing pivots, detects breaks of structure and changes of character, flags simple fair value gap and liquidity sweep proxies, and adds a fast a
KB# GOLD is a trading strategy that identifies trend entries and exits using moving average crossovers and optional Tillson T3 breakout filtering. The script calculates fast and slow exponential moving averages alongside a T3 smoothing curve. When breakout mod
Gold Dominator Pro is a multi-indicator overlay designed primarily for gold trading. It combines higher-timeframe exponential moving averages with momentum oscillators like RSI, MACD, and StochRSI, alongside volatility tools such as ATR, Bollinger Bands, and A
A Pine v5 research overlay for gold on 15 or 5 minute charts. It shades a New York morning entry window, shows a bias dashboard from fast and slow EMAs, and draws 4 hour and 1 hour fair value gaps and order blocks as higher timeframe areas of interest. A break
Indicatorv5SMC / ICT / price actionSessions & time
This indicator plots an adaptive RSI on the price chart for gold. It calculates RSI with adaptive lookback and filters signals using EMA trend, higher timeframe bias, slope threshold, ATR volatility, and structure confirmation near swings. Signals appear as bu
Third-party code. ForexR lists open-source Pine scripts from GitHub; it did not write, test or endorse them, and their summaries are generated automatically from each script's code and README. Indicators describe the past, and a strategy's backtest can look better than live trading. Check a script on a demo account before you rely on it. CFDs and leveraged forex are complex instruments with a high risk of losing money rapidly.
Learn to Use Pine Scripts
Free, plain-English guides: add a script to TradingView, read what it does, test it and avoid the common traps.