Pine Library · 483 open-source scripts

Free Forex Pine Scripts for TradingView (page 3)

Open-source Pine scripts written for currency pairs: session ranges, currency strength, pip-based tools and forex strategies.

Pine scripts483
Code shown here245open licence
Updated in a year304
No repaint flag402

Forex: Indicators, Strategies and Libraries

9 stars

This indicator plots currency strength values for EUR, USD, JPY, GBP, CHF, AUD, CAD, NZD and optionally XAU or XAG on a separate pane. It computes strength by comparing current pair closes to daily closes using broker-specific data from OANDA, FX or FOREXCOM.

Indicator v4 Oscillators & momentumSupport & resistance Repaints
Updated 5 years ago · None stated GitHub repository of 4th Dimension Currency Strength
7 stars

This strategy combines Ichimoku Kinko Hyo components, a Stochastic oscillator, and specific candlestick patterns to generate trade signals. It identifies Kumo twists and range breakouts while evaluating candle body shapes using Fibonacci threshold filters. Tra

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · MIT GitHub repository of Soulevement / Ressaut Strategy

FX Market Sessions

by itmakesyousick
7 stars

This indicator highlights key trading sessions directly on the price chart using colored boxes and text labels. It tracks up to three customizable sessions, defaulting to London, New York, and Tokyo, and can display opening ranges, session extensions, and Fibo

Indicator v5 Sessions & timeSupport & resistance
Updated 3 years ago · None stated GitHub repository of FX Market Sessions
6 stars

This indicator detects and visualizes Candle Range Theory (CRT) setups directly on the price chart across defined session windows. It tracks 1-hour and 4-hour key ranges for Asian, London, and New York sessions using higher-timeframe data. The script draws hor

Indicator v6 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of CRT All-Models Visual Suite v6
5 stars

This strategy executes long trades when price retests the prior week's low level within a specified tolerance and closes above it. Entries are restricted to configurable UTC trading hours, excluding Mondays and late Friday sessions. Stop loss and take profit t

Strategy v5 Support & resistanceSessions & time Repaints
Updated 5 months ago · MIT GitHub repository of WKL v2 — Prior Week Low Retest (Fixed)
4 stars

This indicator calculates and plots predicted future Bollinger Bands mid, upper, and lower lines for 300 bars ahead using linear extrapolation. It draws these prediction lines in a separate pane below the price chart. Users can adjust the prediction horizon in

Indicator v6 Volatility & bandsMoving averages Repaints
Updated 2 weeks ago · MIT GitHub repository of GOM BB Prediction (300 bars)
4 stars

JoppanFX | Forex Sessions highlights four major global trading sessions—Sydney, Tokyo, London, and New York—directly on the price chart. The indicator calculates active market hours by converting time into each region's specific IANA timezone, ensuring automat

Indicator v6 Sessions & time
Updated 3 weeks ago · None stated GitHub repository of JoppanFX | Forex Sessions
4 stars

This strategy executes trend-following trades based on exponential moving average crossovers filtered by a daily trend baseline. It calculates a fast EMA and a slow EMA alongside a daily 200 EMA fetched from a daily timeframe. When the fast EMA crosses above t

Strategy v5 TrendMoving averages
Updated 6 months ago · MIT GitHub repository of EMA Crossover 21/50 + Daily Filter

RSI Mean Reversion

by GifariKemal
3 stars

This strategy plots entry signals, stop loss, take profit levels, and an information panel directly on the price chart. It combines a relative strength index mean reversion model with ATR percentile thresholds to filter trades based on volatility conditions. T

Strategy v5 Oscillators & momentumVolatility & bands
Updated 4 days ago · MIT GitHub repository of RSI Mean Reversion

BTMM Asian Range

by jcortes254
3 stars

This indicator tracks and visualizes session ranges based on the Beat The Market Maker (BTMM) trading methodology directly on the price chart. It defines and draws session boxes for Asian accumulation, London manipulation, and New York distribution phases. It

Indicator v5 Sessions & timeSupport & resistance
Updated 1 year ago · None stated GitHub repository of BTMM Asian Range

This strategy plots Fibonacci retracement levels from a rolling high-low range and trades long only on the price chart. It enters when price is above the first Fibonacci level, volume exceeds its moving average, and price is above a simple moving average. It c

Strategy v5 TrendVolatility & bands
Updated 1 year ago · MIT GitHub repository of Volume + Fibonacci + Trend + ATR Strategy with 1% TP

Stochastic RSI Screener

by Abbas-Borji
3 stars

The Stochastic RSI Screener calculates the Relative Strength Index and Stochastic RSI values (K and D lines) for up to five user-defined symbols. It retrieves the current price, RSI, K-value, and D-value for each selected asset using security calls and display

Indicator v5 Oscillators & momentumScreeners & dashboards
Updated 3 years ago · None stated GitHub repository of Stochastic RSI Screener

Currency Strength Chart

by itmakesyousick
3 stars

Calculates and plots relative strength metrics for major currencies in a separate pane. It evaluates cross-pair price action or technical indicators like RSI, CCI, and Stochastics across data feeds from chosen forex brokers. Inputs allow users to select displa

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

This multi-timeframe indicator combines higher-timeframe trend analysis, MACD divergence detection, and short-term oscillator timing to identify trading opportunities on GBPJPY. It evaluates trend direction using a 4-hour EMA, locates MACD divergences with Zig

Indicator v6 DivergenceOscillators & momentum

SMC Major Pairs Strategy

by middlechild0
2 stars

This strategy identifies trend alignments and Smart Money Concept (SMC) setups across major currency pairs and gold. It calculates a customized Q-Trend filter combined with higher-timeframe trend confirmation, liquidity sweep detection, swing points, and fair

Strategy v6 SMC / ICT / price actionTrend
Updated 5 months ago · None stated GitHub repository of SMC Major Pairs Strategy

Market Structure - Clean & Objective

by ifreddyman2014-tech
2 stars

The script identifies and plots market structure components directly on the price chart using confirmed pivot highs and lows. It classifies swing points into Higher Highs, Higher Lows, Lower Highs, and Lower Lows while detecting Break of Structure (BOS) and Ch

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 8 months ago · None stated GitHub repository of Market Structure - Clean & Objective
2 stars

Parabolic SAR Strategy executes buy and sell orders based on Parabolic SAR trend flips, filtered by customizable technical indicators. Traders can enable an RSI momentum filter, a configurable moving average trend baseline, and an ADX strength threshold. Posit

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · MIT GitHub repository of Parabolic SAR Strategy

Mini-Project

by Core-Four
2 stars

Mini-Project is a multi-indicator trading strategy that overlays technical indicators directly on the price chart. It provides modular components including Linear Regression, the Relative Strength Index (RSI), MACD, Parabolic SAR, and Supertrend. Users can tog

Strategy v5 TrendOscillators & momentum
Updated 3 years ago · None stated GitHub repository of Mini-Project

ORB + ICT Backtest Strategy v2

by mccallister-dev
1 stars

This strategy defines opening range breakouts within Asian, London and New York sessions using ATR-based width and buffer filters. It identifies potential entries on breakout after a retest followed by continuation, applying ICT-style context and SMC proxies f

Strategy v6 BreakoutSMC / ICT / price action
Updated 5 weeks ago · None stated GitHub repository of ORB + ICT Backtest Strategy v2
1 stars

This strategy plots the Donchian Channel bands on the price chart to identify breakouts. It enters a long position by placing a buy stop order when price breaks above the upper band during a target execution hour. The order remains open until filled or cancele

Strategy v6 BreakoutVolatility & bands
Updated 2 months ago · None stated GitHub repository of Tn Sovereign Donchian Breakout

LTF FractalsSweep + IFVG

by riegodavid-git
1 stars

An overlay indicator for lower timeframes that tracks the latest fractal highs and lows and draws a dotted line when price sweeps one, with an alert on bar close. It also detects fair value gaps, with optional filters for volume, ATR gap size and short-term tr

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 4 months ago · None stated GitHub repository of LTF FractalsSweep + IFVG

RTE Overlay GBPUSD 5M

by Jagadeesh963
1 stars

This overlay indicator draws a fixed visual snapshot on the GBPUSD price chart only when the last bar is forming. It places a translucent box labeled FVG, a horizontal line and label marked MSS, and a text label reading GBPUSD bullish, all using hardcoded pric

Indicator v5 SMC / ICT / price action
Updated 4 months ago · None stated GitHub repository of RTE Overlay GBPUSD 5M

Fresh Supply & Demand Zones

by kvmafthab-pixel
1 stars

Fresh Supply & Demand Zones is a Pine Script v6 indicator that detects and plots fresh supply and demand zones on the price chart. It identifies momentum candles based on ATR period and body size threshold, then scans back for base candles to form zones. Zones

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 5 months ago · Custom licence GitHub repository of Fresh Supply & Demand Zones

BVortex Multi

by Alberto082544
1 stars

The BVortex Multi strategy combines a Vortex indicator with an ADX filter to detect trend changes. It calculates Vortex values scaled for stronger signals and confirms trend direction using swing pivots on high and low prices. Buy triggers occur when Vortex cr

Strategy v6 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of BVortex Multi

Kill Zone Liquidity Sweeps tracks the Asian trading session high and low prices and monitors for liquidity sweeps during the London session. When price temporarily breaches the prior Asian high or low during the London kill zone but closes back within the rang

Indicator v5 SMC / ICT / price actionSessions & time
Updated 6 months ago · MIT GitHub repository of Kill Zone Liquidity Sweeps - Castle Trade

Risk & Lot Calculator

by Jony2176
1 stars

Risk & Lot Calculator is an overlay position-sizing tool for forex. The user sets an entry time, entry price and stop loss on the chart, plus account balance and risk percentage. The script draws the stop and two take-profit levels, from reward-to-risk ratios

Indicator v5
Updated 7 months ago · None stated GitHub repository of Risk & Lot Calculator
1 stars

A strategy for automated order routing that formats alert messages for a MetaTrader connector service. Inputs cover a license identifier field, symbol prefix, suffix and mapping, lot size, a magic number, a pip multiplier and a base risk percentage. Selected i

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

This strategy wraps a breakout candle system in a framework that handles position sizing, trade tracking and logging. Settings cover a gap zone block around midnight in the Prague time zone, the number of candles in an accumulation zone, a risk percentage per

Strategy v6 BreakoutSessions & time
Updated 10 months ago · None stated GitHub repository of Breakout Candle Strategy V24
1 stars

Advanced ICT Theory - A-ICT identifies institutional market structure patterns based on Smart Money Concepts directly on the price chart. It detects displacement candles, order blocks, fair value gaps, trap zones, and reversal zones, tracking their mitigation

Indicator v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 11 months ago · None stated GitHub repository of Advanced ICT Theory - A-ICT

TrendTwisterV1.5

by Axden27
1 stars

TrendTwisterV1.5 is a Pine Script strategy that uses a 12-period Hull Moving Average and a 5-period EMA shifted forward by 2 bars to identify trend changes. It plots the Hull MA in orange and the shifted EMA in blue on the price chart with buy and sell signal

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of TrendTwisterV1.5

COT Financial

by ivansoft
1 stars

An indicator in a separate pane that plots Commitment of Traders financial report metrics for the chart symbol, including open interest and dealer, asset manager, leveraged funds and other reportable positions. Settings pick the metric, the direction, a select

Indicator v6
Updated 1 year ago · None stated GitHub repository of COT Financial

Jinni v1

by Hurairahengg
1 stars

Jinni v1 is a Pine Script indicator that plots buy and sell signals on the price chart. It calculates two EMAs, one on close with length 34 and another on input source with length 65, to detect uptrend and downtrend. Additional checks include candle direction,

Indicator v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Jinni v1

Grail Only Shorts

by Wendigooor
1 stars

A short-only strategy that combines a slow SMA, medium and fast EMAs, a pin bar test, a stochastic filter, an MFI filter on a separate timeframe and a stochastic momentum index. Exits use a trailing stop plus a hard stop expressed in pips. Inputs include stop

Strategy v5 TrendCandlestick patterns Repaints
Updated 2 years ago · None stated GitHub repository of Grail Only Shorts

Daily Bias + FVG Strategy

by TradersPost
228 stars

This overlay strategy plots previous-day high and low, the daily open, and fair value gap zones on the price chart. It takes entries on a selectable timeframe when the FVG requirement and an optional session window allow them, then uses an ATR or fixed pip sto

Strategy v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 3 months ago · None stated GitHub repository of Daily Bias + FVG Strategy
104 stars

Candlestick Pattern Strategy 1 is a scalping strategy designed for short-term timeframes. It evaluates two-bar candlestick price action patterns to generate entry signals directly on the price chart. When a bullish or bearish setup is detected, the strategy ex

Strategy v5 Candlestick patternsScalping
Updated 3 years ago · MIT GitHub repository of Candlestick Pattern Strategy 1

Trading Sessions

by iamc1oud
56 stars

Trading Sessions is an overlay indicator that highlights major market trading sessions such as Tokyo, London, and New York directly on the price chart. It draws customizable session boxes along with optional open and close price lines, average session prices,

Indicator v6 Sessions & time
Updated 2 months ago · None stated GitHub repository of Trading Sessions

Estrategia EMA and BARS

by JoelPasapera
11 stars

This strategy generates long trade entries based on an exponential moving average crossover on the main price chart. It calculates two customizable EMAs and executes a buy order when the shorter moving average crosses above the longer moving average. Rather th

Strategy v6 TrendMoving averages
Updated 5 months ago · Apache-2.0 GitHub repository of Estrategia EMA and BARS

FX Market Sessions

by itmakesyousick
7 stars

This indicator plots colored session boxes on the price chart representing London, New York and Tokyo market sessions. Users customize session start and end times, colors, and labels for each session while enabling options for historical display, oscillator mo

Indicator v5 Sessions & time
Updated 3 years ago · None stated GitHub repository of FX Market Sessions

This indicator calculates daily 90-period Bollinger Bands and plots them directly on a lower timeframe chart, such as M15. It queries higher-timeframe daily data using request.security and updates the upper, middle, and lower band values at the start of each n

Indicator v6 Volatility & bandsMoving averages Repaints
Updated 1 year ago · MIT GitHub repository of D1 Bollinger Bands (Period 90) on M15 (Forward Shifted)

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

MACD 4H Rhythm

by LePotoRico2105
4 stars

MACD 4H Rhythm is a TradingView strategy that trades the price chart on a four-hour forex rhythm. It goes long when the MACD histogram crosses above zero while a 21-period EMA is above a 50-period EMA, and short on the opposite histogram turn in a bearish EMA

Strategy v5 Oscillators & momentumMoving averages
Updated 6 months ago · MIT GitHub repository of MACD 4H Rhythm

VolTargeting

by Robot-Wealth
4 stars

VolTargeting is a Pine Script v5 library of functions for volatility-based position sizing. ewmaVol estimates exponentially weighted annualised volatility from squared simple returns and scales it by the square root of 365 days for crypto or 252 days otherwise

Library v5 Volatility & bands
Updated 2 years ago · None stated GitHub repository of VolTargeting

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