Pine Library · 483 open-source scripts

Free Forex Pine Scripts for TradingView (page 5)

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

NTouch Zones

by riegodavid-git
1 stars

An overlay indicator that builds support and resistance rectangles from pivots found inside a morning window in Philippine time, by default 06:00 to 07:30. Pivot highs and lows that cluster within a tolerance based on a fraction of the ATR become a zone once t

Indicator v6 Support & resistanceSessions & time
Updated 4 months ago · None stated GitHub repository of NTouch Zones
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

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
1 stars

A pivot based strategy intended for the USDTHB futures on a 30-minute chart. It detects swing highs and swing lows using a long left bar count and a one bar right count, tracks the latest levels, and trades breakouts of them with a fixed contract count and a p

Strategy v6 BreakoutSupport & resistance Repaints
Updated 1 year ago · None stated GitHub repository of USDTHB TFEX Strategy

COT Total

by ivansoft
1 stars

An indicator in a separate pane that plots total Commitment of Traders positions for the chart symbol. A display setting chooses long positions, short positions, their sum, their difference or the long share as a percentage of the sum. Other settings pick the

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

CM_EMA Trend Bars

by Hurairahengg
1 stars

CM_EMA Trend Bars is a trend-following indicator that plots buy and sell signal shapes on the price chart based on exponential moving average position. It calculates a single exponential moving average (EMA) using a customizable period, defaulting to 34 bars.

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of CM_EMA Trend Bars

Golden Bullet Strategy

by TradersPost
228 stars

The Golden Bullet Strategy is an overlay signal indicator based on Smart Money Concepts and time-based liquidity models. It identifies liquidity sweeps of a designated reference session range during a specified hunt window. It then confirms Market Structure Sh

Indicator v6 SMC / ICT / price actionSessions & time
Updated 3 months ago · None stated GitHub repository of Golden Bullet Strategy

This strategy plots the previous daily high and low on the price chart and calculates the Andean oscillator bull and bear components with an exponential moving average signal. It looks for a bull or bear cross of that signal, then confirms the setup against re

Strategy v5 Oscillators & momentumSupport & resistance Repaints
Updated 3 years ago · MIT GitHub repository of Daily High/Low and Andean Oscillator Strategy
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

FX Market Sessions

by itmakesyousick
7 stars

This indicator highlights up to three customizable market trading sessions, such as London, New York, and Tokyo, directly on the price chart using colored boxes and labels. Users can adjust time zones, session hours, colors, border styling, and fill transparen

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

Elton's Predictions Decision Engine synthesizes thirty selectable strategy algorithms or an auto-detect mode into unified buy, sell, or wait verdicts directly on the price chart. It calculates higher-timeframe trend alignment, confidence scores, and ATR-based

Indicator v6 TrendOscillators & momentum Repaints
Updated yesterday · None stated GitHub repository of Elton's Predictions Decision Engine
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

BTMM Enhanced Foundation

by jcortes254
3 stars

BTMM Enhanced Foundation is a Pine Script utility library designed for Beat The Market Maker (BTMM) system calculations. It provides core helper functions for multi-session detection across Asian, London, and New York trading sessions, three-day market cycle a

Library v5
Updated 1 year ago · None stated GitHub repository of BTMM Enhanced Foundation

Currency Strength Chart

by itmakesyousick
3 stars

The Currency Strength Chart calculates and plots the relative strength of major fiat currencies, including EUR, USD, JPY, GBP, CHF, AUD, CAD, and NZD, in a separate chart pane. It evaluates cross-pair exchange rates using configurable data sources like price,

Indicator v5 Screeners & dashboardsOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Currency Strength Chart
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

Swing Structure - Clean BOS

by ifreddyman2014-tech
2 stars

Swing Structure - Clean BOS identifies market structure by plotting swing high and low points, Break of Structure (BOS) lines, and Order Blocks directly on the price chart. It features an optional displacement filter requiring breakout candles to exceed an ave

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 8 months ago · None stated GitHub repository of Swing Structure - Clean BOS
1 stars

Compares a smoothed FX price trend with a smoothed government yield spread trend, z-scores both over a normalisation window and plots them in a separate pane along with their difference. Threshold bands mark when the two are aligned and when they diverge, usin

Indicator v6 Oscillators & momentumDivergence
Updated yesterday · None stated GitHub repository of FX Price vs Yield Spread

SMC Sessions

by mccallister-dev
1 stars

The SMC Sessions indicator plots higher-timeframe context labels, swing structure breaks, confirmed sweeps, order-block proxies and fair value gap zones directly on the price chart for forex SMC and ICT analysis. It draws HTF pullback-continuation and reversal

Indicator v6 SMC / ICT / price actionSessions & time Repaints
Updated 5 weeks ago · None stated GitHub repository of SMC Sessions
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

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
1 stars

This strategy builds the high and low of a configurable Asian session and locks that range when the session ends. During the London window it enters long when price closes above the range high plus a pip buffer, or short when it closes below the range low minu

Strategy v5 BreakoutSessions & time Repaints
Updated 7 months ago · None stated GitHub repository of London Breakout - Session Strategy

Forex Heatmap

by ivansoft
1 stars

An indicator that shows a table of currency pair data in a separate pane for a list of currency codes, such as EUR, USD, AUD and GBP. In cross rates mode it shows exchange rates between the currencies, coloured by the direction of the latest change. In heat ma

Indicator v6 Screeners & dashboards Repaints
Updated 1 year ago · None stated GitHub repository of Forex Heatmap

Moving Average Exponential

by Hurairahengg
1 stars

Calculates an Exponential Moving Average (EMA) and displays visual buy and sell trend signals directly on the price chart. The indicator calculates a 125-period EMA line by default and monitors crossover conditions between price and the EMA threshold. When pri

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Moving Average Exponential

This strategy combines Linear Regression Candles with UT Bot trailing stop signals to generate trading setups. It calculates smoothed linear regression open, high, low, and close values alongside a signal line, while computing an ATR-based trailing stop. Long

Strategy v5 TrendMoving averages
Updated 3 years ago · MIT GitHub repository of Linear Regression Candles and UT Bot Strategy

Day Trading

by iamc1oud
56 stars

This indicator plots global forex trading sessions, opening ranges, and opening channels for Sydney, Tokyo, Frankfurt, London, and New York markets. It calculates and draws daily reference levels based on Average True Range (ATR) multipliers from the day open

Indicator v5 Sessions & timeSupport & resistance Repaints
Updated 2 months ago · None stated GitHub repository of Day Trading

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

FX Market Sessions

by itmakesyousick
7 stars

This overlay indicator draws up to three named trading sessions, defaulting to London, New York, and Tokyo, as colored boxes on the price chart. It uses a selectable timezone and optional history, and each session can be extended, given Fibonacci levels, or gi

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

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)

BTMM Entry System

by jcortes254
3 stars

The BTMM Entry System is a price-chart overlay indicator based on the Beat the Market Maker methodology. It detects Optimal Trade Entry (OTE) second-leg patterns and Fibonacci zones, combined with multi-factor confluence analysis including EMA alignments, sess

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of BTMM Entry 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 script calculates short and medium-period Rank Correlation Index (RCI) values to identify potential reversal entry signals directly on the price chart. It checks whether the short-term RCI crosses oversold or overbought threshold levels and hooks back, co

Indicator v5 Oscillators & momentumScreeners & dashboards
Updated 2 weeks ago · None stated GitHub repository of GBPJPY Ver7 Phase2 - Entry Signal

Swing Structure - Exact Coordinates

by ifreddyman2014-tech
2 stars

This indicator identifies market structure by calculating pivot highs and lows, detecting breaks of structure (BOS), and highlighting order blocks directly on the price chart. It checks for displacement during breaks using candle body size relative to a simple

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 8 months ago · None stated GitHub repository of Swing Structure - Exact Coordinates

Box Scalper v4

by wynnforthework
2 stars

Box Scalper v4 is a strategy that plots buy and sell signals on the price chart using ADX trend filters, QQE momentum oscillator, and BOX channels. It signals entries based on crossovers and zone conditions, with trailing stop loss and take profit targets. Par

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Box Scalper v4

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
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

Fx Market Sessions

by munlit
1 stars

An overlay indicator that draws trading session boxes and labels for London, New York, Tokyo and optionally Sydney, using a chosen timezone. Each session has its own time range, colour, label and option to extend. Optional kill zone windows for open, rally and

Indicator v5 Sessions & time
Updated 1 year ago · None stated GitHub repository of Fx Market Sessions

LibraryCOT

by ivansoft
1 stars

A Pine Script v6 library that supports Commitment of Traders data requests. It holds the metric names and allowed directions (long, short, spreading) for the legacy, disaggregated and financial CFTC report types, so that other scripts can build the right data

Library v6
Updated 1 year ago · None stated GitHub repository of LibraryCOT

This indicator trains a single-neuron artificial neural network (perceptron) on each bar to classify price movement and plot an adaptive moving average on the main chart. It evaluates historical sample data to iteratively adjust weights using a step activation

Indicator v5 AI / machine learningMoving averages
Updated 1 year ago · None stated GitHub repository of Machine Learning: Perceptron-Based Strategy
104 stars

This overlay strategy combines a machine-learning distance model with a MACD oscillator to open trades on the price chart. It compares recent history using cosine similarity or Euclidean and Lorentzian distance, then filters direction with selectable moving-av

Strategy v5 AI / machine learningOscillators & momentum
Updated 3 years ago · MIT GitHub repository of MLCEL and MACD 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