Pine Library · 341 open-source scripts

Free Gold Pine Scripts for TradingView (page 4)

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

1 stars

This indicator implements an ICT and SMC decision engine directly on the price chart. It calculates Fair Value Gap consequent encroachment entry triggers alongside multi-tiered profit targets and structure-anchored stop losses. Trades are filtered through prem

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 3 months ago · None stated GitHub repository of Quantum Flow - FVG CE + TP Tiers

NFP Open Price Levels

by kvmafthab-pixel
1 stars

NFP Open Price Levels plots price levels associated with Non-Farm Payroll (NFP) news releases directly on the main price chart. The indicator draws horizontal lines and text labels at designated NFP open prices, allowing traders to track key macroeconomic even

Indicator v6 Support & resistanceSessions & time
Updated 5 months ago · Custom licence GitHub repository of NFP Open Price Levels

BVortex XAUUSD 1H

by Alberto082544
1 stars

This strategy trades XAUUSD on the one-hour chart. It builds a scaled Vortex oscillator from directional movement and flags bars that leave an upper or lower extreme with a matching candle. Entries also need ADX at or above a set minimum and a swing-pivot tren

Strategy v6 Oscillators & momentumTrend
Updated 5 months ago · None stated GitHub repository of BVortex XAUUSD 1H

Trend Pullback Indicator

by Chovy-King
1 stars

An overlay that looks for pullbacks within an established trend using three EMAs (20, 60 and 144) that must be stacked in order and spread apart by an ATR multiple, with a rising or falling fast EMA and no recent crossover between the fast and middle lines. A

Indicator v6 TrendMoving averages
Updated 6 months ago · None stated GitHub repository of Trend Pullback Indicator
1 stars

A futures strategy for 30-minute charts that fades extreme moves away from a daily-reset VWAP. It looks for price beyond a configurable number of standard deviations from VWAP, a short RSI in oversold or overbought territory, and an ADX reading below a maximum

Strategy v6 Mean reversionSupport & resistance
Updated 6 months ago · None stated GitHub repository of AlgoBot VWAP Mean Reversion Strategy

Energy Block V11 Balanced

by shawnwong84
1 stars

The balanced preset of a strategy that routes orders to MetaTrader through connector alert messages. Inputs cover symbol prefix, suffix and mapping, lot size, a magic number, a pip multiplier and a base risk percentage, with higher risk tiers for selected inde

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

Swing Strategy

by JoelPasapera
11 stars

This strategy executes trades based on specific days of the week. It opens a long position when the current day matches the primary day input and closes the position whenever the chart moves to a day other than the secondary day input. Settings allow traders t

Strategy v6 Sessions & time
Updated 5 months ago · Apache-2.0 GitHub repository of Swing Strategy

TF Bias Detector (SMC)

by Sidoine1991
4 stars

This indicator tracks multi-timeframe momentum and trend direction across M1, M15, H1, and H4 horizons. It plots four 14-period RSI curves in a separate pane alongside 30, 50, and 70 reference levels. Directional bias values are calculated by comparing price t

Indicator v6 Oscillators & momentumMoving averages
Updated 2 weeks ago · MIT GitHub repository of TF Bias Detector (SMC)

Ultimate Trading System

by EngineeredSuccess
3 stars

The Ultimate Trading System is an integrated indicator that combines multiple analysis methodologies—including Pi Cycle Top, SPX/Gold ratio, Elliott Wave, and multi-source market signals—into a composite oscillator scored from 0 to 100. Plotted in a separate p

Indicator v6 Screeners & dashboardsOscillators & momentum
Updated 1 year ago · Custom licence GitHub repository of Ultimate Trading System

Currency Strength Chart

by itmakesyousick
3 stars

Calculates and plots the relative strength lines for major currencies including EUR, USD, JPY, GBP, CHF, AUD, CAD, and NZD in a separate pane. It evaluates cross-rate movement using data from major Forex brokers like OANDA or FOREXCOM. Users can smooth the str

Indicator v5 Oscillators & momentumMoving averages
Updated 4 years ago · None stated GitHub repository of Currency Strength Chart
2 stars

This strategy captures momentum moves on gold by combining Bollinger Band breakouts with EMA trend confirmation. It restricts trade entry to active European and US trading sessions based on specified hours. Exits are managed dynamically through an ATR-based in

Strategy v6 BreakoutTrend
Updated 4 months ago · None stated GitHub repository of XAUUSD Momentum Breakout Strategy

Breakout Strategy

by Web3Degenerate
2 stars

This strategy detects price breakouts beyond the high or low of a higher timeframe (default Daily) on an intraday chart. When the close crosses above the higher-timeframe high or below its low, it enters long or short, limiting execution to one breakout per di

Strategy v5 BreakoutSupport & resistance
Updated 2 years ago · None stated GitHub repository of Breakout Strategy

Range Risk Lines v3

by jometa9
1 stars

A grid overlay that draws horizontal lines above and below the last price at a spacing set in points, with a configurable number of levels per side and an optional middle line. Each line is labelled with the lot size that would lose a chosen risk amount if pri

Indicator v5 Support & resistance
Updated 4 days ago · None stated GitHub repository of Range Risk Lines v3

Predicted Gold Signals

by XingHan98
1 stars

An overlay indicator for a five-minute gold chart that stops with an error on any other timeframe. At 08:00 and 19:00 Singapore time on weekdays it draws a buy and a sell entry line from the prior close with fixed offsets, a fixed dollar stop, and three take p

Indicator v5 Support & resistanceSessions & time
Updated 2 months ago · None stated GitHub repository of Predicted Gold Signals
1 stars

This indicator calculates smart money concepts and market microstructure data to filter trades based on premium and discount zones, order blocks, liquidity cascades, and session phases. It draws rejection markers and market structure elements directly on the p

Indicator v6 SMC / ICT / price actionSupport & resistance

EMA + Trend + Liquidity

by kvmafthab-pixel
1 stars

This overlay plots a four-length exponential moving average ribbon and classifies trend on the price chart. It marks strong bullish when the 21-period average is above the 50 and 200 with a positive short slope, strong bearish when that stack is reversed, and

Indicator v5 TrendMoving averages
Updated 5 months ago · Custom licence GitHub repository of EMA + Trend + Liquidity

An indicator for the price chart, written with gold on a three-minute chart in mind, that looks for long and short setups. It detects regular or hidden divergences on RSI, MACD, MACD histogram, stochastic and optionally CCI, momentum and MFI, and needs a minim

Indicator v6 DivergenceOscillators & momentum
Updated 6 months ago · None stated GitHub repository of Gold Strategy - Divergence + ATR + RSI
1 stars

The quality-first preset of a strategy that routes orders to MetaTrader through connector alert messages. Inputs cover symbol prefix, suffix and mapping, lot size, a magic number, a pip multiplier and a base risk percentage, with higher risk tiers for selected

Strategy v6 Breakout
Updated 7 months ago · None stated GitHub repository of Energy Block V11 Quality First

Time and schedule

by JoelPasapera
11 stars

This strategy opens a long or short position on a chosen weekday when the chart hour falls inside a user-defined start and end window. With the buy toggle on, it enters long near the window start and short near the window end; turning the toggle off reverses t

Strategy v6 Sessions & time Repaints
Updated 5 months ago · Apache-2.0 GitHub repository of Time and schedule

Golden Pocket Zones

by MeridianAlgo
9 stars

Golden Pocket Zones draws fixed-height Fibonacci zones on the price chart. It reads daily highs, lows, and a 10-day average range, then centers a band on the midpoint of the 50 percent and 61.8 percent retracement of each qualifying daily candle. Lookback leng

Indicator v6 Support & resistance
Updated 4 months ago · MIT GitHub repository of Golden Pocket Zones
6 stars

Institutional Bias Scanner draws a multi-symbol dashboard on the price chart together with optional session overlays. It watches sixteen user-selected symbols that default to major forex pairs, gold, the dollar index, equity indices, oil and crypto. Theme and

Indicator v6 Screeners & dashboardsSessions & time
Updated 7 months ago · None stated GitHub repository of Institutional Bias Scanner

This indicator overlays a visual order-flow dashboard on the price chart using left-aligned labels. It shows a buyer-versus-seller percentage gauge, a signed delta reading, a cumulative volume delta value, and an eight-direction momentum compass colored by bul

Indicator v5 Screeners & dashboardsVolume
Updated 2 weeks ago · MIT GitHub repository of GHOST OrderFlow Dashboard — DerivEAPro

XAUUSD Strategy V4.17 is a Pine Script strategy that plots buy and sell signals on the gold price chart using Stochastic oscillator, RSI, EMA trend filters, Fibonacci zones, and ATR-based risk management. It supports confirm-only, confirm+scalp, or scalp-only

Strategy v5 Oscillators & momentumMoving averages

Rebalanced Allocation

by nvolpe2007-cell
1 stars

Simulates a portfolio of ten crypto assets, a gold-backed token and cash that is rebalanced on a fixed schedule, and plots the resulting equity curve against buy and hold in a separate pane. Target weights are 50 percent crypto, 25 percent gold and the rest ca

Indicator v6 Screeners & dashboards
Updated yesterday · None stated GitHub repository of Rebalanced Allocation
1 stars

Overlay indicator for XAUUSD gold that draws predicted support and resistance levels at 08:00 and 19:00 SGT on the price chart along with buy and sell take-profit levels spaced by ATR multiples. It generates RSI reversal signals as triangles when the indicator

Indicator v5 Support & resistanceOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Predicted Signals + RSI trigger

Quantum Flow Lean

by Jitheandra98
1 stars

This indicator draws gold-oriented smart money concepts on the price chart: a higher-timeframe EMA bias, swing break of structure, order blocks, fair value gaps and sweeps of the previous day high and low. A signal needs bias, a sweep, a zone touch and a displ

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 3 months ago · None stated GitHub repository of Quantum Flow Lean

XAUUSD-Asia Reversion

by riegodavid-git
1 stars

An overlay indicator written for gold during a morning window in Philippine time. It combines a short-period RSI with fractal sweep detection, where price takes out recent fractal highs or lows, and fair value gap boxes with optional volume, ATR and trend filt

Indicator v6 SMC / ICT / price actionMean reversion
Updated 4 months ago · None stated GitHub repository of XAUUSD-Asia Reversion
1 stars

A strategy for range box breakouts whose header comments describe changes from an earlier version: a tighter ATR stop, a trailing profit exit that triggers later, an EMA 50 direction filter, a stricter volume filter and a higher box quality score. Orders are f

Strategy v6 BreakoutTrend
Updated 7 months ago · None stated GitHub repository of Energy Block V12 Optimized

HTF Statistical Zones

by samuelharting
18 stars

HTF Statistical Zones plots historical percentile bands around the 18:00 New York day open, plus session boxes, opening-range lines, and projected targets on the price chart. Upper and lower day zones use selectable inner and outer percentiles, with optional p

Indicator v6 Support & resistanceSessions & time Repaints
Updated 2 weeks ago · MPL-2.0 GitHub repository of HTF Statistical Zones

OI Bot Trades

by rellis3
1 stars

Draws trade zones from a text block pasted into a settings box, one box per zone, to the right of the last bar. Each zone shows an entry line coloured for buy or sell, a stop box, a take-profit box and a dashed second target, and zones can come from an options

Indicator v6 Support & resistance
Updated yesterday · None stated GitHub repository of OI Bot Trades

XAUUSD Hour Range Reference

by teshmi9z-beep
1 stars

An intraday indicator designed for gold that takes the high and low of one chosen hourly candle, set by an hour input, and extends them across the rest of the day as reference lines. A background tint and triangle markers show when price closes above the high

Indicator v5 Sessions & timeSupport & resistance
Updated yesterday · MIT GitHub repository of XAUUSD Hour Range Reference

TP 8 Lines

by XingHan98
1 stars

This TradingView indicator draws daily support and resistance lines for gold (XAU/USD) at 08:00 Singapore time on weekdays, based on the price action of the 5-minute candle closing at 08:00. It also plots three ATR-based take-profit levels per side, computed a

Indicator v5 Support & resistanceVolatility & bands
Updated 2 months ago · None stated GitHub repository of TP 8 Lines

An institutional decision engine based on Smart Money Concepts (SMC) that plots structure and zone reactions on the price chart. It automatically detects instrument profiles for Gold, FX, Indices, and Crypto to analyze order blocks, liquidity pools, sweeps, an

Indicator v6 SMC / ICT / price actionSupport & resistance

XAUUSD-Asia Reversion Strategy

by riegodavid-git
1 stars

A gold strategy built on fractal sweeps, fair value gaps and a short-period RSI. It fades extended moves, using RSI overbought and oversold gates and an overextension timer, and places limit orders that cancel after a set number of bars. The stop is ATR-based

Strategy v6 Mean reversionSMC / ICT / price action
Updated 4 months ago · None stated GitHub repository of XAUUSD-Asia Reversion Strategy

Energy Block V13

by shawnwong84
1 stars

A box breakout strategy whose header comments describe a focus on cutting losing trades. It uses a wider ATR stop, an extra early exit when floating loss exceeds a multiple of the box height, a strict EMA 50 trend filter, a volume filter and a trailing profit

Strategy v6 BreakoutTrend
Updated 7 months ago · None stated GitHub repository of Energy Block V13
7 stars

This indicator plots raw volume or dollar volume on a logarithmic or linear scale in a separate pane below the main chart. It calculates Bollinger Bands around the chosen volume series using standard deviation and selectable moving average smoothing types, inc

Indicator v5 VolumeVolatility & bands
Updated 4 months ago · None stated GitHub repository of Log Volume + Bollinger Band

This indicator plots a multi-asset correlation heatmap in a separate pane to measure statistical relationships between assets. It calculates Pearson correlation coefficients over a user-specified lookback period between a chosen primary symbol and up to twenty

Indicator v6 Screeners & dashboardsSessions & time
Updated 8 months ago · None stated GitHub repository of Correlation HeatMap Sessions Data Science Stats

OI Profile

by rellis3
1 stars

Shows an options book as a picture on the price chart, from an export pasted into a settings box. It draws reaction levels and optional zones, an expected-move box, and a set of profile columns in the empty space right of the last bar: dealer gamma by strike,

Indicator v6 Support & resistanceVolatility & bands
Updated yesterday · None stated GitHub repository of OI Profile

XAU Scalp v2

by mrme000m
1 stars

XAU Scalp v2 is an indicator that calculates a composite trading score using multiple components for XAUUSD gold. It stacks four EMAs to determine trend direction and strength, overlays SuperTrend signals derived from ATR(10), adds RSI(14) momentum, detects Bo

Indicator v5 ScalpingMoving averages
Updated 7 weeks ago · None stated GitHub repository of XAU Scalp v2

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