Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 2)

Scripts written for Pine Script version 5. They still run in TradingView as they are, and the Pine Editor can convert them to version 6.

Pine scripts4,643
Code shown here2,378open licence
Updated in a year2,687
No repaint flag4,051

Pine Script v5: Indicators, Strategies and Libraries

Clusterbreak

by Jferheart
15 stars

This indicator identifies Break of Structure (BOS) and Market Structure Shift (MSS) zones, plotting automated bracket levels on the price chart. It triggers signals when a reversal breaks a swing point formed inside an opposing zone, projecting stop loss and t

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 4 weeks ago · None stated GitHub repository of Clusterbreak
15 stars

This indicator plots Bollinger Bands and smoothed HAMA candles on the price chart. It builds each candle from separate moving averages of open, high, low and close, using selectable EMA, SMA or WMA lengths. A simple moving average forms the band basis, and an

Indicator v5 Candlestick patternsMoving averages
Updated 4 months ago · Apache-2.0 GitHub repository of NSDT HAMA Candles with Bollinger Bands

Annualized ROC / HV Ratios

by Blackdesk-ai
15 stars

This indicator plots two ratios of annualized rate of change to annualized historical volatility in a separate pane. It requests daily closes and computes a 252-day and a 63-day compound ROC, each scaled by 252 trading days. Historical volatility is the standa

Indicator v5 Oscillators & momentumVolatility & bands
Updated 6 months ago · Apache-2.0 GitHub repository of Annualized ROC / HV Ratios

XAUUSD SMC Bot

by GifariKemal
15 stars

This strategy plots on the XAUUSD price chart and looks for Smart Money Concepts entries on the fifteen-minute timeframe. It scores fair value gaps, order blocks, liquidity sweeps, break of structure, and change of character, plus EMA, RSI, MACD, and higher-ti

Strategy v5 SMC / ICT / price actionOscillators & momentum
Updated 8 months ago · None stated GitHub repository of XAUUSD SMC Bot

ATRLevels

by stupenkov
14 stars

Calculates horizontal price levels anchored to the session open using the daily Average True Range (ATR). It retrieves the previous day ATR through a security call to project symmetrical upper and lower boundary bands across fractional ratios of the ATR range.

Indicator v5 Support & resistanceVolatility & bands
Updated 3 years ago · None stated GitHub repository of ATRLevels

Alert VOL Strong Candle CME

by codingfordummies911
13 stars

This overlay indicator classifies candle volume against a Wilder moving average and highlights unusually strong volume on the price chart. In automatic mode it requests matching CME or COMEX futures volume for mapped forex, gold, silver, crypto, and index symb

Indicator v5 Volume Repaints
Updated 10 months ago · None stated GitHub repository of Alert VOL Strong Candle CME
13 stars

BitLa Microtendencias A002 is a TradingView strategy that enters long when a 10-period EMA crosses above a 120-period EMA and enters short on the opposite cross. It draws on the price chart and can limit trading to a start and stop date. Risk controls include

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of BitLa Microtendencias A002
12 stars

This indicator calculates 12-period and 26-period Exponential Moving Averages (EMAs) and plots them directly on the main price chart. It identifies bullish crossovers and bearish crossunders between the two moving averages, displaying visual buy and sell marke

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of EMA Crossover with Area Fill

RS: Footprint

by agejevasv
12 stars

RS: Footprint is an overlay indicator that draws a footprint-style view of volume inside each candle on the price chart. It accumulates up and down volume across price levels spaced by the ticks-per-step setting and can display either bid versus ask or delta.

Indicator v5 Volume Repaints
Updated 2 years ago · None stated GitHub repository of RS: Footprint

Pattern Trade Levels

by zachisit
11 stars

Pattern Trade Levels is a price-chart overlay that plots levels typed in by the user for a chart pattern. It draws the breakout boundary, a confirmation level and a negation stop from a percentage buffer, a measured-move target using either a log formula or an

Indicator v5 Support & resistanceBreakout
Updated 5 days ago · MIT GitHub repository of Pattern Trade Levels
11 stars

This overlay indicator identifies Smart Money Concepts (SMC) and Inner Circle Trader (ICT) market structure elements directly on the price chart. It detects higher highs, lower lows, Break of Structure (BOS), and Change of Character (CHoCH) labels alongside st

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · Custom licence GitHub repository of Pro Trading V6 - ICT/SMC + MACRO

iHotel Index

by hirawatt
11 stars

The iHotel Index indicator tracks Indian hotel sector equities listed on the National Stock Exchange (NSE). It uses security functions to fetch closing prices for multiple hospitality stocks, including Indian Hotels Company, EIH, Royal Orchid Hotels, Chalet Ho

Indicator v5
Updated 2 years ago · MIT GitHub repository of iHotel Index

Pinbar strategy

by samgozman
11 stars

This strategy detects bullish and bearish pinbar candles on the price chart and opens a long or short position when the pattern appears and no trade is open. Take profit and stop loss are set from the signal candle's range using separate multipliers, and trail

Strategy v5 Candlestick patterns Repaints
Updated 3 years ago · None stated GitHub repository of Pinbar strategy
11 stars

This indicator framework backtests trading strategies and generates execution alerts directly from an overlay chart study. It simulates trade entries, fills, stop losses, and take-profit targets across custom or built-in rules, including moving average filters

Indicator v5 TrendMoving averages
Updated 4 years ago · MPL-2.0 GitHub repository of Backtesting-Trading Engine [PineCoders]

SMC Strategy

by tsunafire
10 stars

SMC Strategy is a Pine Script v5 overlay strategy based on smart money concepts. It flags market structure shifts from ten-bar highs and lows, draws bullish and bearish order blocks as rectangles when that option is on, and marks liquidity sweeps with short li

Strategy v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 2 years ago · None stated GitHub repository of SMC Strategy

MarketCipher B

by 2b260adc4a7
10 stars

MarketCipher B plots a wave oscillator in a separate pane. It builds two smoothed waves from the typical price, draws their difference as a VWAP-style area, and marks wave crosses with buy and sell dots, including larger dots below a lower threshold. Optional

Indicator v5 Oscillators & momentum
Updated 2 years ago · None stated GitHub repository of MarketCipher B

Investor Ninja

by the-up
10 stars

This strategy places repeated long entries of a fixed cash amount on a chosen weekday at a selected weekly interval inside a user-defined start and end date. It draws on the price chart. Settings choose the calendar window, the starting week, whether buys occu

Strategy v5
Updated 2 years ago · MIT GitHub repository of Investor Ninja

1BullBear

by KweeBoss
10 stars

The 1BullBear indicator is an all-in-one chart utility that displays key trading sessions, reference levels, and market structure helpers directly on the price chart. It highlights Asian, London, and New York sessions with customizable background ranges, label

Indicator v5 Sessions & timeSupport & resistance Repaints
Updated 2 years ago · None stated GitHub repository of 1BullBear

ADX Trend Strength - Eterna

by EternaHybridExchange
9 stars

Calculates the Average Directional Index (ADX), Directional Movement Index (DMI), and an Exponential Moving Average to trade strong directional momentum. It enters long when the DI+ line crosses above DI- while ADX exceeds a threshold and price is above the EM

Strategy v5 TrendOscillators & momentum
Updated 7 months ago · MIT GitHub repository of ADX Trend Strength - Eterna
9 stars

This indicator implements Chanlun (Zen Theory) structural concepts directly on the main price chart. It identifies top and bottom fractals using five-bar pivot conditions and dynamically tracks high and low arrays to plot strokes (Bi) and segments. Traders can

Indicator v5 Support & resistanceCandlestick patterns
Updated 12 months ago · None stated GitHub repository of Chanlun Buy Sell Points Indicator

Markov Strategy

by Rohanom
9 stars

Markov Strategy is a mean-reversion quantitative strategy inspired by streak-based Markov chain analysis. Applied directly to the price chart, it monitors price action for consecutive downward closes. The strategy enters a long position after detecting six con

Strategy v5 Mean reversionCandlestick patterns
Updated 1 year ago · MIT GitHub repository of Markov Strategy

Calculates the Stochastic Momentum Index (SMI) Ergodic oscillator in a separate pane. Users can choose from nine different moving average types for both the SMI line and signal line calculations, including SMA, EMA, DEMA, TEMA, WMA, SSMA, LSMA, Hull, and ALMA.

Indicator v5 Oscillators & momentumMoving averages
Updated 3 years ago · MIT GitHub repository of Stochastic Momentum Index (SMI) Ergodic [andre_007]
8 stars

This indicator analyzes Maximum Adverse Excursion (MAE) and Maximum Favorable Excursion (MFE) across hourly and multi-hour intraday trading sessions. It plots session open baselines, historical excursion boundaries, custom probability target zones, and time hi

Indicator v5 Sessions & timeSupport & resistance Repaints
Updated 8 days ago · None stated GitHub repository of Hourly Time and Price [JerryG & Smitty]

MattSuite V3

by mmarbmatt
8 stars

MattSuite V3 is an overlay indicator that combines market-structure and trend tools on the price chart. It identifies bullish and bearish fair value gaps and estimates their strength, flags break of structure and change of character, and marks order blocks. It

Indicator v5 SMC / ICT / price actionVolatility & bands
Updated 1 year ago · None stated GitHub repository of MattSuite V3

RSI Crossover

by cleanmind777
8 stars

This strategy evaluates market trends using triple exponential moving averages, a Stochastic RSI oscillator, MACD, Supertrend, and average true range. It plots two EMAs and Supertrend direction directly on the price chart alongside entry shape markers. Long en

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of RSI Crossover
8 stars

Plots institutional price action and smart money concepts directly on the price chart. It detects swing and internal market structures, marking Break of Structure (BOS) and Change of Character (CHoCH) levels, swing points, and strong or weak highs and lows. Th

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 1 year ago · MIT GitHub repository of Price Action Concepts Open Source

KY SMC Indicator

by yusin99
8 stars

This indicator plots smart money concepts on the price chart. It marks internal and swing market structure, optional short, intermediate, and long-term swing points, and strong or weak highs and lows. It can draw internal and swing order blocks, filtered by AT

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 2 years ago · None stated GitHub repository of KY SMC Indicator

BB strategy Production

by satheshshiva
8 stars

This strategy plots Bollinger Bands on the price chart using a simple moving average and a standard-deviation multiplier. It enters long when close crosses above the lower band while still below the basis, and short when close crosses under the upper band whil

Strategy v5 Volatility & bandsMean reversion
Updated 3 years ago · None stated GitHub repository of BB strategy Production

Calculates a custom moving average (MaMA) by modifying the source price with price momentum, acceleration, and psychological win-rate probability before applying an EMA or SMA. Plots the adjusted moving average directly on the price chart alongside optional re

Strategy v5 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of Momentum Adjusted Moving Average by DGT

This indicator plots core Inner Circle Trader (ICT) concepts directly on the price chart. It visualizes session killzones (Asia, London, NY AM, London Close, NY PM) with high and low boundaries, opening price levels, multi-timeframe Fair Value Gaps with conseq

Indicator v5 SMC / ICT / price actionSessions & time Repaints
Updated 3 weeks ago · GPL-3.0 GitHub repository of All-in-One ICT v1.2 + RTH Gap + HTF Candles

BB Squeeze Breakout

by muammeryldrm42
7 stars

BB Squeeze Breakout is a volatility breakout strategy that identifies consolidation squeezes using Bollinger Band width percentile ranking. When the band width drops below its 25th percentile and price crosses above or below the bands with optional volume conf

Strategy v5 Volatility & bandsBreakout
Updated 3 months ago · MIT GitHub repository of BB Squeeze Breakout
7 stars

This strategy opens a long position when the bar hour matches the opening hour, the close is above a simple moving average, and the day is not Thursday or Saturday. It closes that long when the bar hour matches the closing hour. Default inputs set the open hou

Strategy v5 Moving averagesSessions & time Repaints
Updated 1 year ago · None stated GitHub repository of Strategia Buy 20:00 - Close 00:00

Our MACD Backtesting

by benniebendiksen
7 stars

This Pine Script strategy computes a MACD indicator with customizable fast, slow, and signal EMA lengths applied to close prices. Delta is calculated as the difference between the MACD line and signal line, plotted as an overlay on the price chart. Long entrie

Strategy v5 Oscillators & momentumMoving averages
Updated 1 year ago · MIT GitHub repository of Our MACD Backtesting

ForexAlgo

by Harshil427
7 stars

ForexAlgo generates trade signals directly on the price chart using a primary leading indicator, such as the Range Filter, combined with modular confirmation filters. Traders can toggle multiple technical filters, including exponential moving average crosses,

Indicator v5 TrendOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of ForexAlgo

LIT - Timing

by rpanchyk
7 stars

LIT - Timing plots key market session ranges directly on the price chart based on Liquidity Inducement Theorem concepts. It renders customizable boxes alongside horizontal projection lines representing the high, low, and midpoint for the Asian, London, and New

Indicator v5 Sessions & timeSupport & resistance Repaints
Updated 2 years ago · MIT GitHub repository of LIT - Timing

Math

by BlackPhoenixSlo
7 stars

This Pine Script v5 library provides helpers for approximating price and reducing noise. The exported DFT3 function computes a three-point discrete Fourier transform from the current close and the two previous closes, using a direction parameter that scales th

Library v5
Updated 2 years ago · None stated GitHub repository of Math
7 stars

Acts as a modular strategy boilerplate designed for automated and manual trading strategies on the price chart. It provides execution infrastructure including trade direction toggles, signal reversal, alternating orders, session filtering, and anti-news volati

Strategy v5 Sessions & time
Updated 2 years ago · None stated GitHub repository of Git Pine Script v5 Template

Combined Strategy

by Dropio12
7 stars

This strategy plots buy and sell markers on the price chart by combining a fast and slow ALMA crossover with a simple close-to-close momentum check. A long marker appears when the fast ALMA crosses above the slow ALMA and momentum is positive. A short marker a

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Combined Strategy

Optimizer v1

by QuantGeekDev
7 stars

This strategy generates long signals on the price chart using multiple technical indicators. It computes EMA 70 and 100, SMA 70, ADX with DMI, CCI, and MACD values. A long entry occurs when EMA crossover condition, SMA condition, ADX above 15, CCI above 30, an

Strategy v5 TrendOscillators & momentum
Updated 3 years ago · None stated GitHub repository of Optimizer v1

15m Volume Alert

by JackZhao516
7 stars

This strategy monitors 15-minute volume to detect sudden volume spikes and triggers long entries directly on the price chart. It evaluates whether the latest 15-minute volume exceeds preceding bars by a factor of 10 or 50, provided that the total bar turnover

Strategy v5 VolumeBreakout Repaints
Updated 3 years ago · MIT GitHub repository of 15m Volume Alert

FX Market Sessions

by itmakesyousick
7 stars

This indicator draws custom trading session boxes directly on the price chart, with presets for London, New York, and Tokyo sessions. It calculates and outlines session ranges using boxes and lines, with optional extensions, opening ranges, and Fibonacci retra

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

SRI Indicator ft. MSB

by kingmalitha
7 stars

This indicator overlays an all-in-one technical analysis toolkit on the price chart. It plots multiple moving averages, including standard EMAs, SMAs, and a Trend Regularity Adaptive Moving Average, alongside Bollinger Bands, Supertrend, Nadaraya-Watson envelo

Indicator v5 Moving averagesTrend Repaints
Updated 3 years ago · None stated GitHub repository of SRI Indicator ft. MSB
7 stars

This strategy plots a simple moving average basis and upper and lower Bollinger bands on the price chart, with a fill between the bands. It also calculates RSI. It opens one long trade when RSI is above 25, price is at or below the lower band, and no position

Strategy v5 Volatility & bandsOscillators & momentum
Updated 4 years ago · GPL-3.0 GitHub repository of Bollinger Bands 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