Pine Library · 483 open-source scripts

Free Forex Pine Scripts for TradingView (page 8)

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

4 stars

This strategy tracks the high and low range established during the Asian trading session and executes breakout trades during the London session. It draws directly on the price chart. When the price crosses above the Asian high or below the Asian low, it enters

Strategy v6 BreakoutSessions & time
Updated 2 months ago · MIT GitHub repository of EUR/USD London Breakout [trugurpala]

LeMan Trend Indicator

by capissimo
114 stars

LeMan Trend Indicator calculates buy and sell values using normalized differences between current and highest/lowest highs and lows over adjustable lookback periods. It plots a zero line signal in a separate pane and normalized buy and sell lines in colors. Ma

Indicator v4 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of LeMan Trend Indicator
6 stars

Wick Rejection S/R Strategy v3 identifies key support and resistance zones on the price chart using candle wick rejection percentages and liquidity sweeps. It evaluates market structure changes, zone retests, and sweeps to assign confidence scores to trading s

Strategy v5 Support & resistanceSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of Wick Rejection S/R Strategy v3

This indicator applies a k-nearest neighbours (kNN) classification algorithm using Aroon indicator lags and momentum as feature inputs to forecast market direction. It compares current values against historical feature sets to classify bars into buy, hold, or

Indicator v4 AI / machine learningTrend Repaints
Updated 1 year ago · None stated GitHub repository of Machine Learning: kNN-based Strategy (aroon)

Stochastic RSI Crossover

by Basant1Saini
1 stars

This strategy calculates Stochastic RSI crossovers occurring in extreme overbought or oversold zones, filtered by an optional Exponential Moving Average trend filter. Long positions enter when the %K line crosses above %D from below the oversold threshold whil

Strategy v5 Oscillators & momentumTrend
Updated 7 months ago · None stated GitHub repository of Stochastic RSI Crossover

This indicator uses a k-Nearest Neighbors (kNN) machine learning algorithm to classify current market conditions based on historical indicator pairs. It evaluates combinations of fast and slow periods of RSI, Rate of Change (ROC), and Commodity Channel Index (

Indicator v4 AI / machine learningTrend Repaints
Updated 1 year ago · None stated GitHub repository of Machine Learning: kNN-Based Strategy (MTF)
6 stars

This hybrid trading strategy combines wick rejection support and resistance levels with Smart Money Concepts. It calculates entry confidence scores based on multi-timeframe structure, Fair Value Gap taps, Order Block alignment, and recent Change of Character o

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 7 months ago · None stated GitHub repository of WR-SR + SMC Strategy ENHANCED
4 stars

This strategy trades GBP/USD on the price chart. It enters long when a fast EMA crosses above a slow EMA while price stays above a trend EMA, and enters short on the opposite cross below that EMA. Signals are allowed only in the London session, 07:00 to 17:00

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of GBP/USD Forex Strategy [trugurpala]

Smart Money Concepts

by TamTH-Dev
2 stars

This indicator maps market structure and session activity directly on the price chart. It detects and labels internal and swing structures with customizable confluence filters and candle coloring. Additionally, it highlights major trading killzones including N

Indicator v5 SMC / ICT / price actionSessions & time Repaints
Updated 5 weeks ago · None stated GitHub repository of Smart Money Concepts

Volume Spike Reversal

by Basant1Saini
1 stars

The Volume Spike Reversal strategy identifies potential price reversals driven by high volume activity. It triggers long entries when a volume spike occurs while price is below a 20-period simple moving average, combined with oversold RSI readings and bullish

Strategy v5 VolumeOscillators & momentum
Updated 7 months ago · None stated GitHub repository of Volume Spike Reversal

This strategy tracks GBP/USD market structure by storing confirmed pivot highs and lows. It enters long when price crosses above the last pivot high while above a trend EMA, and short when price crosses below the last pivot low while below that EMA. Entries oc

Strategy v6 SMC / ICT / price actionTrend
Updated 2 months ago · MIT GitHub repository of GBP/USD Market Structure [trugurpala]
114 stars

This indicator implements a binary logistic regression classification model retrained on each bar using gradient descent optimization. It processes normalized price features through a sigmoid activation function to classify market direction and generate direct

Indicator v4 AI / machine learningTrend Repaints
Updated 1 year ago · None stated GitHub repository of Machine Learning: Logistic Regression

Exhaustion Scanner is an overlay indicator that measures overextension and reversal risk by evaluating price stretch, momentum exhaustion, and candle triggers. It combines distance from moving averages and Bollinger Bands with momentum oscillators, divergence

Indicator v6 Oscillators & momentumVolatility & bands
Updated 2 days ago · MIT GitHub repository of Exhaustion Scanner [WavesUnchained]

Alpy Vix

by avatar-lavventura
2 stars

This strategy plots the Williams Vix Fix indicator as a histogram in a separate pane to detect potential trend reversals. It calculates the Vix Fix value using a lookback period and standard deviation bands derived from Bollinger Bands on the Vix Fix. Multiple

Strategy v4 Oscillators & momentumVolatility & bands Repaints
Updated 7 months ago · None stated GitHub repository of Alpy Vix

Market Sessions & Viewer Panel tracks and visualizes major global trading sessions, such as Tokyo, London, New York, and Sydney, on the main price chart. It highlights active market intervals using customizable box shapes, background colors, and labels, while

Indicator v6 Sessions & timeScreeners & dashboards
Updated 8 months ago · None stated GitHub repository of Market Sessions & Viewer Panel [MUQWISHI]
114 stars

This indicator applies Learning Vector Quantization (LVQ), a supervised neural network competitive learning algorithm, to classify normalized market features. It determines winning prototype vectors using Euclidean distance and continuously updates weights acr

Indicator v4 AI / machine learningTrend Repaints
Updated 1 year ago · None stated GitHub repository of Machine Learning: LVQ-based Strategy

ZenLibrary

by Web3Degenerate
2 stars

ZenLibrary is a custom Pine Script utility library providing standard helper functions for trading scripts. It includes calculations for quote currency decimal precision, market pip sizes, decimal truncation, pip conversions, percentage change over lookback pe

Library v5
Updated 2 years ago · None stated GitHub repository of ZenLibrary

Session Stats

by jayadevrana
1 stars

Session Stats highlights Asia, London, and New York trading sessions on the chart with distinct background colors while tracking performance metrics. It plots session high and low lines directly on price action and presents a summary table displaying average s

Indicator v6 Sessions & timeScreeners & dashboards
Updated 3 days ago · MPL-2.0 GitHub repository of Session Stats

Liquidity Entry Zones

by rosijay17-cmd
1 stars

A liquidity sweep entry tool built as a strategy. It stores recent swing highs and lows as liquidity levels, detects sweeps through them, checks that price reclaims and that the candle meets wick, body and range requirements in pips, then confirms within a sho

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 7 days ago · GPL-3.0 GitHub repository of Liquidity Entry Zones

MACD x RSI Study

by jerryinyang
5 stars

This indicator combines MACD and RSI to generate pullback signals on forex pairs. It plots MACD line, signal line and histogram alongside RSI and Wave Trend oscillator. Higher-timeframe MACD provides trend bias while RSI identifies overbought and oversold zone

Indicator v4 Oscillators & momentumMoving averages
Updated 2 years ago · None stated GitHub repository of MACD x RSI Study
6 stars

This indicator maps session-based Candle Range Theory (CRT) cycles by identifying range formation, manipulation, and distribution phases directly on the price chart. It projects range boxes, supply and demand zones, midpoints, and manipulation trendlines accor

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of 3-Candle Time Pattern - Pro

Midnight VWAP

by TradersPost
228 stars

The Midnight VWAP indicator calculates and overlays two distinct Volume Weighted Average Price (VWAP) lines on the price chart based on customizable session timeframes. It tracks an overnight or pre-market session alongside regular trading hours, resetting cal

Indicator v6 Moving averagesSessions & time
Updated 3 months ago · None stated GitHub repository of Midnight VWAP

IMBA Algo

by TamTH-Dev
2 stars

IMBA Algo is a price chart overlay indicator designed to simulate trading setups with detailed position visualisations. It calculates entry points, automatic or fixed percentage stop losses, break-even levels, and four distinct take profit targets with customi

Indicator v5 TrendScreeners & dashboards
Updated 5 weeks ago · None stated GitHub repository of IMBA Algo
7 stars

Arbitrage Detector [LuxAlgo] compares price and volume data across multiple crypto exchanges or forex brokers against the charted asset. It calculates cross-venue spreads and measures their percentile ranks to highlight market anomalies, plotting a smoothed gr

Indicator v6 Screeners & dashboardsVolume
Updated 3 months ago · None stated GitHub repository of Arbitrage Detector [LuxAlgo]

714AutoM8tr

by alboogycOdR
6 stars

714AutoM8tr is a Smart Money Concepts indicator that plots internal and swing market structures directly on the price chart. It identifies Break of Structure and Change of Character points alongside internal and swing order blocks. Users can customize order bl

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of 714AutoM8tr

GrimmHAbacktest

by GreyssonEnterprises
1 stars

This indicator plots four smoothed moving averages of lengths 21, 50, 100 and 200 on the price chart. It fills the area between a two-period EMA and the 200-period SMMA to highlight trend direction. It marks bullish and bearish 3-line strike patterns with arro

Indicator v4 Moving averagesCandlestick patterns
Updated 2 months ago · MIT GitHub repository of GrimmHAbacktest

714AutoM8trDST

by alboogycOdR
6 stars

Calculates Smart Money Concepts market structure elements including internal and swing breaks of structure, change of character, and order blocks directly on the price chart. It highlights bullish and bearish structures, customizable internal and swing order b

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of 714AutoM8trDST
114 stars

This script plots pivot-based support and resistance levels on the price chart while generating directional trade labels tagged with RSI values to measure momentum at turning points. It overlays multi-timeframe open and close step lines with background fills t

Indicator v4 Support & resistanceOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of Support and Resistance Strategy (v.2)
6 stars

Apex Protocol - The SMC Engine is a Smart Money Concepts indicator designed for price chart analysis across multiple timeframes. It automatically detects key SMC market structure events including Break of Structure (BOS), Market Structure Shifts (MSS), Order B

Indicator v5 SMC / ICT / price actionSessions & time Repaints
Updated 7 months ago · None stated GitHub repository of Apex Protocol - The SMC Engine
6 stars

This indicator plots Smart Money Concepts structures directly on the price chart. It identifies and tracks break of structure markers, market structure shifts, fair value gaps, order blocks, and session ranges across London, New York, and Asian trading hours.

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of Apex Protocol - The SMC Engine

SuperTrend

by TamTH-Dev
2 stars

SuperTrend indicator calculates ATR-based bands on the price chart and determines trend direction by comparing current price to the bands. It plots upper and lower SuperTrend bands that shift based on price action. Signals trigger when the trend flips from dow

Indicator v5 TrendVolatility & bands
Updated 5 weeks ago · None stated GitHub repository of SuperTrend

Apex Protocol Assistant

by alboogycOdR
6 stars

Apex Protocol Assistant is a Smart Money Concepts indicator designed for session-based trading. It determines market direction using a higher timeframe Exponential Moving Average and highlights Asian range boundaries alongside London and New York killzones. Th

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of Apex Protocol Assistant

ICT Setup 01 TFlab

by alvinng214
2 stars

This indicator detects Fair Value Gaps using a multiplier factor and validity period. It identifies liquidity sweeps and hunts within or outside defined zones to generate long and short signals. Signals can be configured to fire after a specified number of hun

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of ICT Setup 01 TFlab

Apex Protocol Assistant

by alboogycOdR
6 stars

Apex Protocol Assistant is a Smart Money Concepts overlay indicator designed for session-based market structure analysis. It highlights the Asian range, London and New York killzones, and key daily and weekly price levels. The indicator evaluates higher timefr

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of Apex Protocol Assistant

Apex Protocol Assistant

by alboogycOdR
6 stars

Apex Protocol Assistant is a Smart Money Concepts charting tool designed to identify session-based setups and market structure shifts. It determines directional bias using a higher-timeframe exponential moving average and highlights key trading windows includi

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of Apex Protocol Assistant

1 Pair TF Strength

by capissimo
114 stars

This indicator evaluates momentum strength for a single selected symbol across multiple intraday timeframes (1m to 60m). It retrieves price data across seven timeframes using security calls, combines them into an aggregate metric with optional ATR-based weight

Indicator v4 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of 1 Pair TF Strength
6 stars

Apex Protocol Assistant is an intraday technical indicator that overlays smart money concepts and trading session levels directly on the price chart. It evaluates higher timeframe EMA trends, change of character shifts, and fair value gaps. The tool highlights

Indicator v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of Apex Protocol Assistant (Optimized)
6 stars

Apex Protocol v3.0 - The SMC Engine is an overlay indicator designed for Smart Money Concepts market structure analysis. It identifies and plots Break of Structure (BOS) and Market Structure Shift (MSS) markers, Fair Value Gaps (FVG), Order Blocks (OB), and se

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 7 months ago · None stated GitHub repository of Apex Protocol v3.0 - The SMC Engine

FTB Strategy

by Web3Degenerate
2 stars

The FTB Strategy is a short-only overlay strategy targeting EURUSD during the European session from 0200-0700. It enters short positions when filters confirm RSI overbought, a bullish prior bar close, or a high price level within lookback bars, combined with a

Strategy v5 Mean reversionSessions & time
Updated 2 years ago · None stated GitHub repository of FTB Strategy
1 stars

An overlay indicator that tracks Asia, London and New York sessions in a chosen timezone and classifies how the day is developing into numbered profiles. It adds opening range boxes, previous day high and low sweeps, higher-timeframe market structure, a TDI an

Indicator v6 Sessions & timeSupport & resistance Repaints
Updated 7 days ago · GPL-3.0 GitHub repository of Session Profile + Trading Coach Merged

NQ Stats - ALN Profiler

by TamaraKGreen
46 stars

Plots trading session ranges for New York, London, and Asia directly on the price chart. The indicator draws customizable boxes highlighting the high and low of each session, with options for dotted borders, background transparency, and identifying labels. It

Indicator v5 Sessions & timeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of NQ Stats - ALN Profiler
6 stars

Apex Protocol v3.0 - The SMC Engine is an overlay indicator designed for Smart Money Concepts (SMC) trading strategies. It detects market structure shifts (MSS), breaks of structure (BOS), M5 Fair Value Gaps (FVG), Order Blocks (OB), and Asian session ranges.

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of Apex Protocol v3.0 - The SMC Engine
6 stars

Apex Protocol v3.0 plots smart-money structure on the price chart. It marks break of structure and market structure shifts, order blocks, fair value gaps with optional midlines, automatic Fibonacci levels, and higher-high, lower-high, higher-low, and lower-low

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of Apex Protocol v3.0 - The SMC Engine
1 stars

An ICT-style strategy on the price chart that requires two confirmations before entering: an inverse fair value gap flip and a change in state of delivery, which is a structure break from recent swing levels. Optional filters are an EMA trend check, a liquidit

Strategy v6 SMC / ICT / price actionSessions & time
Updated 2 months ago · None stated GitHub repository of TN IFVG CISD Double Confirm

NQ Stats Helper

by TamaraKGreen
46 stars

NQ Stats Helper is an overlay indicator that plots custom trading session ranges, session high and low boundaries, and 50% equilibrium levels directly on the price chart. It visualizes major sessions like New York, London, and Asia with colored range boxes and

Indicator v5 Sessions & timeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of NQ Stats Helper

Session Filter Template

by TradersPost
228 stars

Session Filter Template highlights major global trading sessions including Asia, London, New York, and a user-defined custom session directly on the price chart. It visualizes active sessions using background color fills, tracks high and low price levels for e

Indicator v6 Sessions & timeSupport & resistance
Updated 3 months ago · None stated GitHub repository of Session Filter Template
6 stars

Apex Protocol - The SMC Engine is a comprehensive Smart Money Concepts indicator that overlays key market structure levels directly on the main price chart. It calculates internal and external market structures (BOS and MSS), Order Blocks, Fair Value Gaps (FVG

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of Apex Protocol v3.4 - The SMC Engine

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