Pine Library · 341 open-source scripts

Free Gold Pine Scripts for TradingView (page 3)

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

Gold: Indicators, Strategies and Libraries

Hedge Exit Algo

by jerryinyang
5 stars

Hedge Exit Algo provides position sizing and lot calculations for forex and precious metals hedging strategies. It evaluates pip values, currency conversion rates, and profit targets relative to account balance. The script defines custom lot sizing routines al

Indicator v5 Moving averages Repaints
Updated 2 years ago · None stated GitHub repository of Hedge Exit Algo
4 stars

An all-in-one chart indicator combining Smart Money Concepts (SMC) and technical level analysis. It identifies Order Blocks, market structure shifts like CHoCH and BOS, KOLA support and resistance levels, SIDO chart patterns, and Fibonacci Optimal Trade Entry

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 weeks ago · MIT GitHub repository of GOM KOLA SIDO Full Integration
2 stars

Qtus SMC-Sniper System v2 is a comprehensive chart overlay indicator combining Smart Money Concepts (SMC), ICT elements, price action, and momentum filters. It identifies and plots Fair Value Gaps (FVG), Order Blocks, Breaker Blocks, Liquidity Zones, and Marke

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · Custom licence GitHub repository of Qtus SMC-Sniper System v2
2 stars

SMC Toolkit detects core Smart Money Concepts on the price chart, including market structure breaks (BoS and CHoCH), Order Blocks, Fair Value Gaps (FVGs), and liquidity levels such as equal highs and lows. Active zones project forward and freeze or stop extend

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 3 months ago · MPL-2.0 GitHub repository of SMC Toolkit [btankutt]
2 stars

This trend-following strategy for XAUUSD checks alignment across three Simple Moving Averages (20, 50, and 200) calculated on closed bars. It enters long when price and all three SMAs are stacked in ascending order, and enters short when stacked in descending

Strategy v6 TrendMoving averages
Updated 4 months ago · None stated GitHub repository of XAUUSD Dollar Trader Martingale

Draws weekly and monthly volatility forecast levels on the price chart from a text block pasted into a settings box. Lines show 75th percentile and median ranges for five-day and month high-low and open-close moves, together with week open, week high and low,

Indicator v6 Volatility & bandsSupport & resistance

Booming Bulls Sniper

by jayadevrana
1 stars

Implements liquidity sweep and prop firm breakout strategies inspired by the Booming Bulls methodology. The script monitors previous-day, previous-week, and current-day highs and lows for liquidity sweeps where price wicks beyond a level without closing past i

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 3 days ago · MPL-2.0 GitHub repository of Booming Bulls Sniper
1 stars

A strategy visualizer, with no real orders, that tracks a 200-bar moving average of lows on the 1-hour timeframe. When price touches the average it arms, then marks long or short entries on a wick rejection seen on 5 or 15 minute candles, or a run of three sam

Indicator v6 Mean reversionSupport & resistance Repaints
Updated 2 weeks ago · None stated GitHub repository of MA200 Wick Rejection
1 stars

A gold-oriented overlay that prints buy and sell signals on closed bars. It combines an EMA trend stack, an RSI band, MACD and stochastic RSI triggers, an optional volume filter and a weighted confidence score that must pass a minimum. Stop loss and two take-p

Indicator v5 Oscillators & momentumTrend
Updated 3 weeks ago · None stated GitHub repository of neXQan XAUUSD Gold Indicator

ORB + ICT Manual Signals v3

by mccallister-dev
1 stars

This overlay indicator marks opening-range breakouts inside configurable Asian, London, and New York session windows. It searches for a break, retest, and continuation after an optional delay, then shows confirmed-bar signals with estimated entry, stop, and ta

Indicator v6 BreakoutSMC / ICT / price action
Updated 5 weeks ago · None stated GitHub repository of ORB + ICT Manual Signals v3
1 stars

This Pine Script indicator plots daily support and resistance levels for XAUUSD gold at 08:00 SGT on weekdays. It finds resistance by backward searching 5-minute candles until the 07:55 candle close exceeds the 07:50 high, then repeats for support when the clo

Indicator v5 Support & resistanceVolatility & bands
Updated 2 months ago · None stated GitHub repository of Gold 08:00 SGT Support/Resistance

OB REACT

by Jitheandra98
1 stars

This indicator detects bullish and bearish order blocks on the price chart following swing pivot breaks of structure. It highlights unmitigated supply and demand zones, flagging broken zones as dead to prevent breaker re-entries. The script tracks first-touch

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 3 months ago · None stated GitHub repository of OB REACT
1 stars

A price-chart overlay for gold scalping that labels BUY WAIT, SELL WAIT, BUY CONFIRMED and SELL CONFIRMED states. It combines market structure from pivots, liquidity sweeps, candlestick confirmation, breakout and retest logic, an optional higher-timeframe filt

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 4 months ago · None stated GitHub repository of Abed XAUUSD SMC Scalping PRO v1
1 stars

The Institutional Levels Dashboard v7 indicator plots multi-timeframe key levels on the price chart including previous day, week, month and quarter highs and lows. It displays labeled lines for these levels plus round number grids, previous same-day high and l

Indicator v6 Support & resistanceScreeners & dashboards Repaints
Updated 5 months ago · Custom licence GitHub repository of Institutional Levels Dashboard v7
1 stars

A strategy with BTC, gold and custom presets that enters in the direction of the trend when a strong candle breaks the latest swing high or low. Filters include a higher-timeframe trend check, a volume surge, body and range thresholds, a prior consolidation, a

Strategy v6 BreakoutTrend
Updated 6 months ago · None stated GitHub repository of PA Trend Breakout Strategy

AlgoBot GC Mean-Reversion Strategy

by ghostnathan30-ops
1 stars

A gold futures strategy meant for the micro contract on the 30-minute chart. It records the first New York hour range from 9:30 to 10:30, then fades the first breakout between 10:30 and 13:00, taking the opposite direction of the break. ATR-based stop and targ

Strategy v6 Mean reversionSessions & time
Updated 6 months ago · None stated GitHub repository of AlgoBot GC Mean-Reversion Strategy

ICT v4-weinkya MTF v2

by tndg16-bot
1 stars

This multi-timeframe strategy identifies trading opportunities by combining higher-timeframe market structure shifts with optimal trade entry Fibonacci levels and lower-timeframe confirmations. It calculates swing pivots on higher timeframes to determine bias,

Strategy v5 SMC / ICT / price actionTrend
Updated 6 months ago · None stated GitHub repository of ICT v4-weinkya MTF v2

A strategy variant, described by its file name as optimized for long trades only, that sends orders to MetaTrader through a connector service via alert messages. Inputs cover symbol prefix, suffix and mapping, lot size, a magic number, a pip multiplier and a b

Strategy v6 Breakout
Updated 7 months ago · None stated GitHub repository of Energy Block V11 Auto Strategy Long Only

Strat1

by namdar-nejad
1 stars

This Pine v4 strategy looks for three-candle sequences, green-green-red or red-red-green, and uses a one-period Money Flow Index value and candle body sizes to decide long or short direction, drawing arrows on the price chart. Orders are fixed at 10000 units w

Strategy v4 Candlestick patterns
Updated 4 years ago · None stated GitHub repository of Strat1

Bandz Po3 Profiler

by samuelharting
18 stars

Bandz Po3 Profiler draws an ICT-style power-of-three profile on the price chart. It plots higher-timeframe candles, C1 through C4 sequence boxes, T-Spot zones, CISD marks, fair value gaps, STDV projections, sweeps, midpoints, opens, and liquidity. It also mark

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 weeks ago · MPL-2.0 GitHub repository of Bandz Po3 Profiler

Fibonacci strategy

by JoelPasapera
11 stars

This strategy plots a Fibonacci retracement of the previous day's high-low range on the price chart. It places a single long limit order at that level when the bar hour matches the chosen entry hour and the close is below the level. Position size follows the l

Strategy v6 Support & resistanceSessions & time
Updated 5 months ago · Apache-2.0 GitHub repository of Fibonacci strategy
5 stars

This strategy enters long positions when price tests and bounces off the prior week's low level within an allowed point tolerance during designated UTC trading hours. It requires the bar low to approach the prior week low and the close to rebound above it whil

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

This indicator plots support and resistance pivot levels, order blocks, market structure changes, and Fibonacci optimal trade entry zones directly on the price chart. It calculates touch counts across dynamic zones, detects chart patterns, and tracks pre-spike

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 2 weeks ago · MIT GitHub repository of GOM KOLA SIDO — Full Integration

SPX/Gold Ratio Bubble Detector

by EngineeredSuccess
3 stars

Calculates the price ratio between the S&P 500 (defaulting to SPY) and Gold (defaulting to GLD) to evaluate macro valuation extremes. It tracks the ratio alongside a simple moving average and evaluates market status across customizable warning, danger, and ext

Indicator v6 Moving averagesSupport & resistance
Updated 1 year ago · Custom licence GitHub repository of SPX/Gold Ratio Bubble Detector

Currency Strength Chart

by itmakesyousick
3 stars

Currency Strength Chart measures and compares relative strength across major fiat currencies and optional commodities. It aggregates price data for major Forex pairs from selected brokers and plots smoothed strength lines for each currency in a separate chart

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

SMC Flow System plots smart money concepts and market structure directly on the price chart. It identifies internal and external swings, marking Break of Structure (BOS), Change of Character (CHoCH), and swing highs or lows according to customizable sensitivit

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · Custom licence GitHub repository of SMC Flow System – by Fatich.id

Sessions

by teshmi9z-beep
1 stars

An overlay that shades trading session ranges on the chart, with three sessions preset to New York, London and Tokyo. Each session has its own name, time window, colour and on or off toggle. While a session is active, a box tracks its running high and low, and

Indicator v5 Sessions & time
Updated yesterday · MIT GitHub repository of Sessions

A gold-oriented overlay that combines 21, 50 and 200 EMAs, an RSI filter, MACD confirmation and stochastic RSI to draw buy and sell arrows on the price chart. Stop loss and two take-profit lines are placed from ATR multiples, and daily pivot levels can be show

Indicator v5 TrendOscillators & momentum
Updated 3 weeks ago · None stated GitHub repository of neXQan XAUUSD Gold Indicator Lines

MTF Confluence Engine

by mrme000m
1 stars

MTF Confluence Engine is a separate-pane indicator that evaluates trend, momentum, and volatility metrics across the current chart timeframe and two configurable higher timeframes. It combines EMA alignment, SuperTrend direction, RSI values, Bollinger and Kelt

Indicator v5 TrendOscillators & momentum Repaints
Updated 7 weeks ago · None stated GitHub repository of MTF Confluence Engine
1 stars

The Gold Trend indicator identifies market structure using swing highs and lows to categorize trends into uptrends, downtrends, or ranges directly on the price chart. It plots HH, HL, LH, and LL labels alongside optional zig-zag lines, background trend tinting

Indicator v5 TrendSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of Gold Trend (Market Structure)

Fusion Cipher SR Scalper

by shahzaib-574
1 stars

This indicator plots intraday support and resistance tools on the main price chart. It calculates a daily-reset VWAP with ATR bands, daily high/low/mid levels, previous day extremes, and pivot-based support/resistance zones. It also identifies long or short da

Indicator v6 Support & resistanceScalping
Updated 3 months ago · None stated GitHub repository of Fusion Cipher SR Scalper

A price-chart overlay for gold that extends the earlier version of this scalping tool with stricter confirmation rules. It combines pivot market structure, liquidity sweeps, candlestick confirmation, breakout and retest logic, a higher-timeframe filter and a q

Indicator v5 SMC / ICT / price actionSupport & resistance
1 stars

An all-in-one Smart Money Concepts indicator that identifies market structure breaks and higher-timeframe bias. It calculates Break of Structure (BOS) and Change of Character (CHoCH) using pivot swing detection, auto-draws Supply and Demand zones based on ATR

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 5 months ago · Custom licence GitHub repository of Market Structure & Daily Bias SD Pro v2

Trend Break Indicator

by Chovy-King
1 stars

An indicator version of a trend breakout strategy with BTC, gold and custom presets. It plots 20 and 60 EMAs and marks a triangle when a strong candle breaks the latest swing in the direction of the trend, after filters for higher-timeframe agreement, volume,

Indicator v6 BreakoutTrend
Updated 6 months ago · None stated GitHub repository of Trend Break Indicator

ICT v4-weinkya Strategy

by tndg16-bot
1 stars

This strategy implements an Inner Circle Trader (ICT) framework by identifying order blocks, fair value gaps, liquidity pools, and optimal trade entry (OTE) zones. It computes a confluence score requiring a user-defined minimum threshold alongside 200 EMA and

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 6 months ago · None stated GitHub repository of ICT v4-weinkya Strategy

A strategy variant, labeled in its file name as a time-filtered version, that sends orders to MetaTrader through a connector service via alert messages. Inputs cover symbol prefix, suffix and mapping, lot size, a magic number, a pip multiplier and a base risk

Strategy v6 Sessions & time
Updated 7 months ago · None stated GitHub repository of Energy Block V11 Auto Strategy Time Filter
24 stars

This indicator maps Smart Money Concepts (SMC) market structure directly onto the price chart. It detects internal and swing structure breaks (BOS and CHoCH), tracks bullish and bearish order blocks, identifies fair value gaps (FVG), highlights equal highs and

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 11 days ago · Custom licence GitHub repository of Smart Money Concepts [LuxAlgo] Test B
11 stars

The Stochastic Divergence Strategy calculates the Stochastic oscillator (%K and %D) to identify regular bullish and bearish divergence patterns against price pivots. It plots the oscillator and divergence lines in a separate indicator pane. Entries trigger on

Strategy v6 Oscillators & momentumDivergence
Updated 5 months ago · Apache-2.0 GitHub repository of Stochastic Divergence Strategy
4 stars

This overlay indicator draws KOLA pivot support and resistance, order blocks, optional change-of-character and break-of-structure marks, SIDO swing chart patterns, and Fibonacci or OTE levels on the price chart. Touch counts use an ATR percentage zone. Spike s

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 2 weeks ago · MIT GitHub repository of GOM KOLA SIDO — Full Integration

SMC Order Block + FVG

by LePotoRico2105
4 stars

SMC Order Block + FVG is an intraday strategy combining market structure breaks, order blocks, and fair value gaps. It identifies breaks of structure using pivot points, isolates order blocks following strong ATR-based impulses, and tracks fair value gaps. Lon

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 6 months ago · MIT GitHub repository of SMC Order Block + FVG
2 stars

Calculates entry signals, stop loss levels, and five take-profit targets based on a 7-factor dual scoring engine. The system evaluates short-term market bias using EMA 9 and 21 crossovers, VWAP, RSI, MACD, ADX, relative volume, and multi-timeframe 5-minute RSI

Indicator v6 TrendOscillators & momentum Repaints
Updated 2 months ago · Custom licence GitHub repository of Sniper Entry/Exit with SL&TP
2 stars

This mean-reversion trading strategy targets XAUUSD during the Asian trading session. It generates buy signals when price touches the lower Bollinger Band and RSI is oversold, and sell signals when price reaches the upper band and RSI is overbought. Trades are

Strategy v6 Mean reversionSessions & time
Updated 4 months ago · None stated GitHub repository of XAUUSD Mean Reversion Strategy

More Pine Script Categories

Browse the whole Pine Library

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.
  7. 7What Pine Script isThe language, what it can and cannot do, and where to start.
  8. 8Write your first indicatorA complete script, line by line, in the Pine Editor.
  9. 9Read a script before you trust itA routine for checking inputs, logic and red flags.
  10. 10Edit a script safelyChange colours and lengths, add a filter or an alert.
  11. 11Pine Script alertsalertcondition(), alert(), placeholders and webhooks.
  12. 12Build a crossover strategyAn EMA cross strategy with an ATR stop, ready to test.

Trade Your Charts With a Regulated Broker

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

Compare brokers