Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 42)

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

MUSLUCA-V2

by Kalumur
4 stars

MUSLUCA-V2 is an overlay indicator that plots higher-timeframe moving averages on the price chart. It draws an 8-period and a 55-period exponential moving average from the four-hour timeframe, an 8-period daily exponential moving average, and 9-period and 15-p

Indicator v5 Moving averagesSupport & resistance Repaints
Updated 2 years ago · None stated GitHub repository of MUSLUCA-V2

My Custom Strategy 2

by might-tree
4 stars

This strategy calculates a 20-period volume-weighted moving average of the low, a 200-period Hull moving average of the high, and 25-period highest close values. It enters a long position when the high breaks above the previous highest close while the close re

Strategy v5 TrendMoving averages
Updated 3 years ago · None stated GitHub repository of My Custom Strategy 2
4 stars

An overlay indicator that calculates multi-timeframe market conditions and displays them in an information panel on the price chart. It evaluates timeframe metrics such as 15-minute and 1-hour periods to monitor RSI values, support and resistance levels, and r

Indicator v5 Screeners & dashboardsOscillators & momentum Repaints
Updated 4 years ago · None stated GitHub repository of SnagProfit Logic 15M 1H

EMA 14 Haf-Aylık

by gocaman
3 stars

This indicator overlays multi-timeframe exponential moving averages and channel zones directly on the price chart. It calculates a weekly 14-period EMA, monthly 9-period and 14-period EMAs, along with a configurable 233-period high-low EMA channel with a shade

Indicator v5 Moving averagesTrend Repaints
Updated 2 days ago · None stated GitHub repository of EMA 14 Haf-Aylık

This indicator plots an average daily range from hourly high-low ranges stored for each hour across a selectable number of days. It highlights time sessions on the price chart and can show a timeline and the current range box. Optional filters use a volatility

Indicator v5 Volatility & bandsSessions & time Repaints
Updated 5 months ago · None stated GitHub repository of Average Daily Range with Time Session Highlighter
3 stars

This overlay indicator is a Phase 3 debug demonstration. It exposes toggles for memory profiling, code coverage, test-data collection, and benchmarking, plus a debug level and a maximum bar count. Minimal helper functions estimate memory use, count function ca

Indicator v5 Oscillators & momentumMoving averages
Updated 7 months ago · None stated GitHub repository of Phase 3 Comprehensive Test

Stella's Trend Strength

by stella-entry
3 stars

This indicator calculates and plots ADX values on a separate pane to gauge overall trend strength from 0 to 100. It combines ADX with DI+ and DI- to classify trends as Strong, Moderate, or Weak based on input thresholds. The script identifies bullish and beari

Indicator v5 Trend
Updated 8 months ago · MIT GitHub repository of Stella's Trend Strength

Gold Digger AI

by IAMATOMIC001
3 stars

This strategy executes gap breakout entries directly on the price chart, opening long positions when the current open exceeds the prior high and short positions when the open drops below the prior low. It overlays a custom Supertrend filter, an EMA cloud, a Pa

Strategy v5 BreakoutMoving averages
Updated 12 months ago · None stated GitHub repository of Gold Digger AI

BTMM Master Dashboard

by jcortes254
3 stars

BTMM Master Dashboard displays a comprehensive monitoring interface on the main price chart based on Steve Mauro's Beat The Market Maker (BTMM) methodology. It aggregates system status, a market clock, key price levels, and signal fusion confluence metrics int

Indicator v5 Screeners & dashboardsSMC / ICT / price action
Updated 1 year ago · None stated GitHub repository of BTMM Master Dashboard

PSAR Lib

by augustoerni
3 stars

This Pine Script library provides a custom calculation of the Parabolic Stop and Reverse indicator. The exported function accepts parameters for the starting acceleration factor, increment step, and maximum acceleration limit. It evaluates bar highs, lows, and

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

J's Composite Index

by jawauntb
3 stars

J's Composite Index combines RSI momentum with simple moving averages in a separate pane. It calculates an unbounded momentum RSI value by adding the bar-over-bar change of a 14-period RSI to a 3-period simple moving average of a 3-period RSI. The indicator pl

Indicator v5 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of J's Composite Index

Currency Strength Chart

by itmakesyousick
3 stars

The script calculates and plots relative currency strengths for major pairs including EUR, USD, JPY, GBP, CHF, AUD, CAD and NZD in a separate pane. Strength is derived from RSI, CCI, Stochastics or raw Price source, optionally smoothed and filtered by length.

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

Modified Momentum QQE-ZigZag

by wynnforthework
2 stars

This indicator blends a modified multi-timeframe RSI and Quantitative Qualitative Estimation (QQE) logic with an ATR-based Supertrend overlay on the price chart. Users can select between Wilders and Cutlers RSI calculations, adjust the multi-timeframe length m

Indicator v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Modified Momentum QQE-ZigZag

Data Panel

by etnt
2 stars

Data Panel calculates and displays fundamental financial metrics and closing range percentages directly on the price chart in an organized table. It requests financial metrics such as basic earnings per share, total revenue, net income, and total equity across

Indicator v5 Screeners & dashboards
Updated 1 year ago · MPL-2.0 GitHub repository of Data Panel

DataCleaner

by Electrified-Trading
2 stars

DataCleaner is a Pine Script utility library providing functions to calculate outlier levels and generate cleaned versions of input data series. It utilizes moving averages and standard deviations to detect extreme statistical deviations, replace outlier value

Library v5
Updated 1 year ago · MPL-2.0 GitHub repository of DataCleaner

Relative Volume

by ryangaraygay
2 stars

Relative Volume calculates an exponential moving average and standard deviation of volume over a user-defined lookback period to identify statistical volume anomalies. When volume exceeds standard deviation thresholds and meets a minimum volume level, the indi

Indicator v5 Volume
Updated 1 year ago · MIT GitHub repository of Relative Volume
2 stars

This indicator highlights buy setups on the chart when price is trending above an exponential moving average and the Relative Strength Index falls within a narrow neutral-to-bullish zone. When the closing price is above the configured EMA and the RSI is betwee

Indicator v5 Moving averagesOscillators & momentum
Updated 2 years ago · None stated GitHub repository of HMD 25 Week EMA and 55% RSI Indicator

HTF Candles & Pivots

by itmakesyousick
2 stars

The HTF Candles & Pivots indicator plots higher timeframe candles alongside traditional pivot points, support and resistance levels on the current price chart. It calculates open, high, low, and close values from a user-selected timeframe and displays them wit

Indicator v5 Candlestick patternsSupport & resistance
Updated 3 years ago · None stated GitHub repository of HTF Candles & Pivots
2 stars

The Moving Average Based Zig Zag indicator computes a smoothed price series with a volume-weighted Hull Moving Average applied to the chosen pivot source, either high-low or open-close. It detects pivot highs and lows on this moving average to construct a conn

Indicator v5 Moving averagesTrend
Updated 3 years ago · None stated GitHub repository of Moving Average Based Zig Zag

TorkEma

by engtuncay
1 stars

This indicator calculates and plots a standard exponential moving average (EMA) directly on the main price chart. Users can customize the calculation period length and the input price source. The script renders a single orange line overlaying price action to a

Indicator v5 Moving averagesTrend
Updated 7 days ago · None stated GitHub repository of TorkEma

7/19 EMA Crypto

by kanylbullen
1 stars

The 7/19 EMA Crypto strategy calculates two exponential moving averages using lengths 7 and 19. It plots bullish crossovers as long signals and bearish crossovers as short signals directly on the price chart. Long positions enter on bullish EMA crossovers and

Strategy v5 TrendMoving averages
Updated 8 days ago · None stated GitHub repository of 7/19 EMA Crypto

Market Cipher B

by kasutu
1 stars

A community imitation of the Market Cipher B oscillator, drawn in a separate pane. It plots a WaveTrend oscillator with a fast line, overbought and oversold levels, and dots at wave crossings, including buy, sell, gold and divergence dots. It also includes a s

Indicator v5 Oscillators & momentumDivergence
Updated 2 weeks ago · None stated GitHub repository of Market Cipher B

TQE Trade Quality Engine

by AssetWhisper
1 stars

An overlay indicator that combines several statistical modules into a single trade planning panel. For a long or short direction, chosen automatically or manually, it proposes an ATR-based stop widened for tail risk, a target R multiple optimised for expectanc

Indicator v5 Volatility & bandsSupport & resistance
Updated 7 weeks ago · MPL-2.0 GitHub repository of TQE Trade Quality Engine

Polish Setup Strategy

by GreyssonEnterprises
1 stars

A Pine v5 strategy that uses smoothed moving averages of 21, 50 and 200, W and M pattern recognition with an optional volume check, an RSI midline filter and a time-zone trading session. Targets use extension levels, risk per trade is a base percentage capped

Strategy v5 Moving averagesSessions & time
Updated 3 months ago · MIT GitHub repository of Polish Setup Strategy

Liquidity Heatmap

by VVASILEVSS
1 stars

A Pine v5 overlay that estimates liquidation price levels and draws them as horizontal lines on the price chart. When volume is above its 14-bar average, a bullish candle adds a long liquidation line below the low and a bearish candle adds a short line above t

Indicator v5 VolumeSupport & resistance
Updated 3 months ago · None stated GitHub repository of Liquidity Heatmap
1 stars

Plots an exponential moving median on the price chart as a comparison with the standard EMA. For each bar it takes a window of recent prices, gives nearer bars exponentially larger weights, sorts the prices and returns the value where cumulative weight reaches

Indicator v5 Moving averages
Updated 3 months ago · None stated GitHub repository of Exponential Moving Median (EMM)

KLSE Trend Template

by kevinesk
1 stars

This indicator evaluates Mark Minervini's Trend Template criteria directly on the price chart. It checks eight technical conditions based on 21, 50, 150, and 200-period exponential moving averages, alongside 52-week (260-bar) highs and lows. The script plots t

Indicator v5 TrendMoving averages
Updated 4 months ago · None stated GitHub repository of KLSE Trend Template

Talons RSI Divergence

by muammeryldrm42
1 stars

The Talons RSI Divergence strategy detects bullish and bearish divergences by combining RSI values with price pivots. It calculates RSI using a customizable period and identifies pivot highs and lows on both price and RSI with a lookback setting. Bullish diver

Strategy v5 Oscillators & momentumDivergence
Updated 5 months ago · None stated GitHub repository of Talons RSI Divergence
1 stars

A counter-trend indicator that complements a trend-following sibling. It looks for fading trends in two ways: four-hour EMAs narrowing together followed by a counter-cross on one hour, or RSI divergence on four hours with a rejection candle. A signal offset ca

Indicator v5 Mean reversionDivergence
Updated 7 months ago · None stated GitHub repository of V16 Trend Exhaustion Catcher

Scalper Quick Strike

by Basant1Saini
1 stars

Scalper Quick Strike is a Pine Script strategy that trades on intraday charts using multiple EMAs and Stochastic oscillator. It calculates fast medium and slow EMAs along with a smoothed Stochastic to detect trend alignment and momentum shifts. Long entries tr

Strategy v5 TrendOscillators & momentum
Updated 8 months ago · None stated GitHub repository of Scalper Quick Strike

QQQ Gamma (30DTE)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for QQQ (the Nasdaq-100 ETF) expiring in thirty days. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-04, produced offline fr

Indicator v5 Support & resistance
Updated 8 months ago · None stated GitHub repository of QQQ Gamma (30DTE)
1 stars

An overlay indicator that colours candles showing displacement, meaning a candle range far larger than normal. Candle range is measured open to close or high to low and compared with a standard deviation over a chosen length multiplied by a strength setting. B

Indicator v5 SMC / ICT / price actionVolatility & bands
Updated 9 months ago · None stated GitHub repository of Visualizing Displacement

ES Professional Fade

by knectardev
1 stars

The ES Professional Fade strategy trades overnight price gaps during regular trading hours on intraday charts. It establishes an opening range and enters counter-trend positions when price fails near overnight extremes. Positions target the previous day's clos

Strategy v5 Mean reversionSessions & time
Updated 9 months ago · None stated GitHub repository of ES Professional Fade
1 stars

This indicator plots a custom MACD oscillator directly on the main price chart while incorporating multi-depth Zigzag pattern detection. It supports four MACD calculation modes—Traditional, AS Histogram, Leader, and Source—with customizable fast, slow, and sig

Indicator v5 Oscillators & momentumMoving averages Repaints
Updated 9 months ago · None stated GitHub repository of MACD-X Overlay More Than MACD

Three Bar Reversal Pattern

by feliperazeek
1 stars

This strategy detects three-bar reversal patterns in normal, enhanced or both forms, derives support and resistance from them as levels or zones, and trades the reversals on the price chart. An optional trend filter uses a moving average cloud, Supertrend or D

Strategy v5 Candlestick patternsSupport & resistance
Updated 1 year ago · None stated GitHub repository of Three Bar Reversal Pattern

Screener Template

by NakliTechie
1 stars

This template indicator provides a baseline framework for building custom Pine Script market screeners. It sets up a standard configurable length parameter and offers structured comment blocks for adding calculations, filtering conditions, and outputs. Designe

Indicator v5 Screeners & dashboards
Updated 1 year ago · MIT GitHub repository of Screener Template
1 stars

A scalping strategy that goes long when a 9 EMA crosses above a 21 EMA while price crosses above VWAP, and short on the opposite pair of crosses. Exits close the trade at 1.5 ATR from the average entry price or on a MACD cross with a new five-bar extreme. A br

Strategy v5 ScalpingMoving averages
Updated 1 year ago · None stated GitHub repository of S50 TFEX Scalping Strategy
1 stars

This strategy measures volatility as the standard deviation of closes and compares it with its own moving average multiplied by a threshold. When volatility is expanding and the close is beyond a Bollinger Band (20 periods, 2 deviations, fixed in the code), it

Strategy v5 BreakoutVolatility & bands
Updated 1 year ago · None stated GitHub repository of Volatility Breakout Strategy

TSI & Divergences

by munlit
1 stars

A separate-pane indicator that calculates the True Strength Index with fast, slow and signal lengths and detects regular and hidden divergences between price and the oscillator. Pivot lookback and range inputs control how far apart pivots may be, and each dive

Indicator v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of TSI & Divergences
1 stars

A long-side strategy that combines a Stochastic Momentum Index, a fast and slow EMA pair and MACD histogram. It enters long when the SMI crosses above its EMA while below the overbought level, and exits on the opposite SMI cross or when the fast EMA crosses un

Strategy v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of SMI-MA Long Strategy

Hello world

by fiji-solutions
1 stars

This indicator demonstrates custom user-defined functions in Pine Script v5 and plots their results in a separate pane. It defines a one-line addition function, a multi-line function that multiplies two numbers and then scales the product by a fixed multiplier

Indicator v5
Updated 2 years ago · None stated GitHub repository of Hello world

Trend Histogram

by JoeTonDev
1 stars

A separate-pane indicator that shows two trend states as colored histogram bars, a slow one from 3, 8 and 20 period simple averages and a fast one from 21, 55 and 89 period averages. Green means the averages are stacked bullishly, yellow a pullback, light red

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

My strategy 11

by akash-yellgetti
1 stars

A strategy-type script for the price chart built around a fast and slow moving average pair, exponential or simple, whose lines and fill change colour with the direction of the gap. It prints B and S labels at crossovers and builds text messages for an externa

Strategy v5 Moving averagesTrend
Updated 2 years ago · None stated GitHub repository of My strategy 11

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