Pine Library · 341 open-source scripts

Free Gold Pine Scripts for TradingView

Open-source Pine scripts written for gold (XAU/USD): session and range tools, breakout and scalping strategies, and indicators tuned to gold's volatility.

Pine scripts341
Code shown here93open licence
Updated in a year312
No repaint flag296

About Gold Scripts

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

Gold: Indicators, Strategies and Libraries

105 stars

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

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of Gold Scalping BOS & CHoCH

Codex 5m Webhook - GC Scalp

by WilliamYi951208
33 stars

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

Indicator v5 Moving averages
Updated 4 months ago · MIT GitHub repository of Codex 5m Webhook - GC Scalp
27 stars

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

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of LuxAlgo Hybrid Gold Scalper

ORB Multi-Model Indicator

by Mrshahidali420
16 stars

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,

Indicator v6 BreakoutSessions & time Repaints
Updated 3 months ago · None stated GitHub repository of ORB Multi-Model Indicator

XAUUSD SMC Bot

by GifariKemal
15 stars

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

Strategy v5 SMC / ICT / price actionOscillators & momentum
Updated 8 months ago · None stated GitHub repository of XAUUSD SMC Bot

Alert VOL Strong Candle CME

by codingfordummies911
13 stars

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

Indicator v5 Volume Repaints
Updated 10 months ago · None stated GitHub repository of Alert VOL Strong Candle CME
11 stars

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

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · Custom licence GitHub repository of Pro Trading V6 - ICT/SMC + MACRO

Breakout Strategy

by JoelPasapera
11 stars

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

Strategy v6 BreakoutTrend
Updated 5 months ago · Apache-2.0 GitHub repository of Breakout Strategy

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

Indicator v6 SMC / ICT / price actionSupport & resistance
9 stars

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

Indicator v4 Screeners & dashboards
Updated 5 years ago · None stated GitHub repository of 4th Dimension Currency Strength

1-Min Gold Taylor Technique

by eddiebelaval
7 stars

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

Strategy v6 Sessions & timeSupport & resistance
Updated 3 months ago · None stated GitHub repository of 1-Min Gold Taylor Technique
7 stars

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.

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Easy Trendline - XAUUSD 30m
5 stars

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

Strategy v5 Support & resistanceMean reversion Repaints
Updated 5 months ago · MIT GitHub repository of PDL — Prior Day Level Retest (Bull)
4 stars

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

Strategy v6 TrendMean reversion
Updated 2 days ago · None stated GitHub repository of Lucid 100K (MES/MGC/MNQ)
4 stars

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

Indicator v6 VolumeScreeners & dashboards
Updated 2 weeks ago · MIT GitHub repository of GHOST — OrderFlow Intelligence
4 stars

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

Strategy v6 TrendVolatility & bands
Updated 3 weeks ago · None stated GitHub repository of Breakout Follow Trend

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

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of XAUUSD High Probability Strategy

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

Indicator v6 TrendMoving averages
Updated 5 weeks ago · MIT GitHub repository of Quantum Queen X + Supertrend Signal

Cyber HUD XAU

by panzmoravylab
3 stars

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

Indicator v6 Volatility & bandsOscillators & momentum
Updated 4 months ago · None stated GitHub repository of Cyber HUD XAU

GainzAlgo EA

by saadkhan371
3 stars

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

Strategy v5 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of GainzAlgo EA

Supertrend Strategy

by dharaarpan7
3 stars

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

Strategy v6 TrendVolatility & bands
Updated 1 year ago · MIT GitHub repository of Supertrend Strategy

Currency Strength Chart

by itmakesyousick
3 stars

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

Indicator v5 Oscillators & momentum
Updated 4 years ago · None stated GitHub repository of Currency Strength Chart

Green Wave | Sathvik

by Gethubsathvik
2 stars

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

Indicator v5 Support & resistance
Updated yesterday · None stated GitHub repository of Green Wave | Sathvik

TRH Hunter AI

by davoodepb
2 stars

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

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 days ago · None stated GitHub repository of TRH Hunter AI

ORB Multi-Model Indicator

by BobLeeHacker
2 stars

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

Indicator v6 BreakoutSupport & resistance
Updated 2 weeks ago · None stated GitHub repository of ORB Multi-Model Indicator

Gamma Levels v3 Auto

by Timonkru
2 stars

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

Indicator v6 Support & resistanceVolatility & bands
Updated 6 weeks ago · MIT GitHub repository of Gamma Levels v3 Auto

TFX Gold Sniper - V26 Black-Gold

by vijayavardhanarajumahanandi-cell
2 stars

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

Indicator v6 Oscillators & momentumTrend
Updated 2 months ago · None stated GitHub repository of TFX Gold Sniper - V26 Black-Gold

XAUUSD Breakout Grid

by Young666YHF
2 stars

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

Strategy v6 BreakoutSupport & resistance
Updated 4 months ago · None stated GitHub repository of XAUUSD Breakout Grid

GEX Levels

by aoimiku
1 stars

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

Indicator v6 Support & resistance
Updated yesterday · None stated GitHub repository of GEX Levels

Session Sweep Model

by kxngHADES
1 stars

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

Indicator v6 SMC / ICT / price actionSessions & time
Updated 13 days ago · Custom licence GitHub repository of Session Sweep Model

GOD Conviction Engine

by Oluwacutyp
1 stars

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

Indicator v6 SMC / ICT / price actionTrend
Updated 2 weeks ago · Unlicense GitHub repository of GOD Conviction Engine
1 stars

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

Indicator v5 Support & resistance
Updated 6 weeks ago · None stated GitHub repository of Layer 1: Malaysian SNR Framework
1 stars

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

Strategy v6 Sessions & timeMean reversion
Updated 7 weeks ago · None stated GitHub repository of EMP Session Momentum v6

XAUUSD LiqSweep+MSS+VP System

by MuthuvelMukesh
1 stars

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

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 8 weeks ago · None stated GitHub repository of XAUUSD LiqSweep+MSS+VP System

Alpha Forge Core Elite

by vedkanani123
1 stars

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

Indicator v6 TrendSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of Alpha Forge Core Elite
1 stars

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

Indicator v5 SMC / ICT / price actionTrend
Updated 2 months ago · None stated GitHub repository of GoldX AI Trader Auto SMC Signals

KB# GOLD

by jayadevrana
1 stars

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

Strategy v5 TrendMoving averages
Updated 2 months ago · Custom licence GitHub repository of KB# GOLD

Gold Dominator Pro

by thanvish21
1 stars

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

Indicator v5 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Gold Dominator Pro
1 stars

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

Indicator v5 SMC / ICT / price actionSessions & time
Updated 2 months ago · None stated GitHub repository of HTC v0.1 Gold Research

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

Indicator v6 Oscillators & momentumDivergence

More Pine Script Categories

Browse the whole Pine Library

Related on ForexR

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.

  1. 1Using this librarySearch, filters, licences and what the badges mean.
  2. 2Add a script to TradingViewCopy, paste into the Pine Editor, save and add to chart.
  3. 3Indicators, strategies and librariesWhat each type does and how to tell them apart.
  4. 4Spot a script that repaintsWhy some signals change after the bar closes.
  5. 5Backtest a strategyStrategy Tester settings that keep results honest.
  6. 6Send alerts to MT4 or MT5From a TradingView alert to an order in MetaTrader.

Trade Your Charts With a Regulated Broker

Compare regulated brokers on platforms, spreads, minimum deposit and leverage.

Compare brokers