Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 50)

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

5212 EMA Strategy

by hasnocool
106 stars

This strategy combines a triple exponential moving average system with a Stochastic RSI oscillator to identify trend-following entry opportunities directly on the price chart. It plots 50, 100, and 200-period EMAs while computing smoothed Stochastic RSI values

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of 5212 EMA Strategy

Example 1

by be-thomas
65 stars

This script is a TradingView documentation example demonstrating how to fill background spaces between plots and horizontal lines in a separate indicator pane. It calculates and plots the sine of the high price, the cosine of the low price, and the sine of the

Indicator v5
Updated 6 days ago · GPL-3.0 GitHub repository of Example 1
56 stars

An overlay indicator that plots dynamic trendlines and support/resistance channels on the price chart. It detects pivot high and low points across a configurable lookback period to draw S/R zones and calculate trendline slopes using ATR, standard deviation, or

Indicator v5 Support & resistanceTrend Repaints
Updated 2 months ago · None stated GitHub repository of Trendline Support Resistance 2024
43 stars

This indicator builds a synthetic Heikin-Ashi series using only the current open and the opens of the previous three bars. It derives open, high, low, and close from those values, rounds each price to the symbol mintick, and plots the result as candles in a se

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Heikin-Ashi Open Only

Balance of Power

by TWODS-CAPITAL
37 stars

This indicator plots the Balance of Power of each bar in a separate pane. It calculates the ratio of the close-to-open difference to the high-to-low range and draws that value as a red line. Positive readings mean the close is above the open, and negative read

Indicator v5 Oscillators & momentum
Updated 3 years ago · MIT GitHub repository of Balance of Power
26 stars

This overlay indicator marks swing highs and swing lows from a user-set pivot lookback and draws each swing as a level and a shaded area. Area size can follow the wick extremity or the full bar range. It counts bars, or accumulated volume, that trade through t

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · AGPL-3.0 GitHub repository of Liquidity Swings [LuxAlgo]

Market Sessions

by benso87
24 stars

This indicator highlights major regional trading sessions directly on the price chart, including Asia, Europe, and America. Users can customize the exact start and stop times in UTC for each region, as well as the background fill colors. Additional settings al

Indicator v5 Sessions & time
Updated 4 years ago · MPL-2.0 GitHub repository of Market Sessions

Divergenced F002

by ruckard
13 stars

This strategy detects momentum divergences based on shifts between color states of the Squeeze Momentum indicator. It enters long positions when lower price lows form alongside higher oscillator values, and enters short positions on higher price highs with low

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Divergenced F002

TSI Strategy - Eterna MCP

by EternaHybridExchange
9 stars

The TSI Strategy - Eterna MCP calculates the True Strength Index using double-smoothed momentum and an exponential moving average signal line. It opens long positions on bullish signal line crossovers occurring below zero or in oversold territory, and short po

Strategy v5 Oscillators & momentum
Updated 7 months ago · MIT GitHub repository of TSI Strategy - Eterna MCP

Bollinger Bands

by suyons
7 stars

This indicator calculates and plots multi-timeframe Bollinger Bands directly on the price chart. Users can select from various moving average types for the basis line, such as SMA, EMA, WMA, HMA, RMA, VWMA, or ALMA, alongside customizable basis length, standar

Indicator v5 Volatility & bandsMoving averages
Updated 4 months ago · None stated GitHub repository of Bollinger Bands

RSI Trend Strategy

by SynergOps
7 stars

The RSI Trend Strategy combines a short-period Relative Strength Index with 30-period and 100-period Simple Moving Averages to identify trading opportunities on the main price chart. Long positions trigger when a 5-period RSI drops below 30 while price sits ab

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · MPL-2.0 GitHub repository of RSI Trend Strategy

This indicator implements an ICT Silver Bullet trading framework directly on the price chart. It detects and visualizes Fair Value Gaps (FVG), Market Structure Shifts (MSS), Order Blocks, Breaker Blocks, Breaks of Structure (BOS), and Equal Highs/Lows across d

Indicator v5 SMC / ICT / price actionSessions & time Repaints
Updated 7 months ago · None stated GitHub repository of ICT Silver Bullet Flux Charts v2 - Claude

RSI Basic Indicator

by mitchell-917
4 stars

This indicator calculates the Relative Strength Index from a chosen source and length and plots it in a separate pane. It draws overbought, oversold, and midline levels, optionally shades the background when RSI is outside those levels, and marks crosses into

Indicator v5 Oscillators & momentum
Updated 11 months ago · Custom licence GitHub repository of RSI Basic Indicator

USTA

by Kalumur
4 stars

USTA combines multiple trend-following mechanisms on the price chart, primarily integrating SuperTrend and AlphaTrend overlay components. It calculates ATR-based volatility trailing lines to determine overall market direction, displaying visual buy and sell si

Indicator v5 TrendVolatility & bands
Updated 2 years ago · None stated GitHub repository of USTA

Snagprofit WMA MA

by dearvn
4 stars

Snagprofit WMA MA is a multi-timeframe trend indicator overlaid on the price chart. It calculates a weighted moving average across 1-minute, 5-minute, 15-minute, and 1-hour timeframes alongside a simple moving average on the active chart. Momentum shapes signa

Indicator v5 Moving averagesTrend Repaints
Updated 4 years ago · None stated GitHub repository of Snagprofit WMA MA

P-Dipmix Kripto

by gocaman
3 stars

P-Dipmix Kripto is a multi-indicator oscillator and screener designed to detect dip opportunities in cryptocurrency markets. It calculates WaveTrend oscillator lines, Bollinger Bands, the Awesome Oscillator, and the Accelerator Oscillator to evaluate oversold

Indicator v5 Oscillators & momentumScreeners & dashboards
Updated 2 days ago · None stated GitHub repository of P-Dipmix Kripto

Jash Test

by jash-git
3 stars

This indicator plots five exponential moving averages of lengths 3, 13, 34, 55 and 144 on the price chart. Fast lines are red and orange, slower lines are blue and purple, and a black 144-period average acts as a trend filter. It draws buy and sell labels when

Indicator v5 TrendMoving averages Repaints
Updated 4 weeks ago · None stated GitHub repository of Jash Test
3 stars

Canca's Sweeps n Raids is a price-chart indicator that marks bullish and bearish liquidity sweeps of prior swing highs and lows. It scans historical bars for swing levels that price has swept, using either a wick-only or regular close condition, then draws a l

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 5 months ago · None stated GitHub repository of Canca's Sweeps n Raids
3 stars

TradingView Debug Example is an overlay indicator that calculates RSI, a simple moving average, and MACD, then marks buy and sell shapes on the price chart. A buy appears when RSI is below 30 and price is above the SMA; a sell appears when RSI is above 70 and

Indicator v5 Oscillators & momentumMoving averages
Updated 7 months ago · None stated GitHub repository of TradingView Debug Example

This indicator identifies and plots market structure and smart money concept elements directly on the price chart. It detects swing structure, internal structure, liquidity sweeps, and strong or weak highs and lows. It also visualizes order blocks with buying

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 12 months ago · None stated GitHub repository of Price Action Smart Money Concepts [BigBeluga]

BTMM Stop Hunt Detection

by jcortes254
3 stars

The BTMM Stop Hunt Detection indicator identifies liquidity sweeps, stop hunts, and market maker manipulation zones directly on the main price chart. It tracks key liquidity levels, Optimal Trade Entry (OTE) zones, and premium or discount areas based on swing

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of BTMM Stop Hunt Detection
3 stars

This indicator computes and plots the Slow Stochastic momentum oscillator in a separate chart pane. It calculates the raw stochastic percentage based on price location within the highest high and lowest low range over a user-defined period, smoothing the resul

Indicator v5 Oscillators & momentum
Updated 2 years ago · None stated GitHub repository of Stochastic Slow (Momentum Oscillator)

PE and PEG Over Time

by jawauntb
3 stars

This indicator calculates the price-to-earnings (P/E) and price-to-earnings growth (PEG) ratios for a target stock and for QQQ. It fetches earnings per share basic one year growth and PEG ratio data using financial API calls, then derives P/E as close divided

Indicator v5
Updated 2 years ago · GPL-3.0 GitHub repository of PE and PEG Over Time

Currency Strength Chart

by itmakesyousick
3 stars

This indicator calculates and plots the relative strength of major forex currencies and optional commodities in a separate pane. It fetches price data across configurable broker feeds to calculate relative performance over a selected resolution or lookback per

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

Radius Trend [ChartPrime]

by wynnforthework
2 stars

This indicator tracks directional market movement directly on the price chart using adaptive curved bands. It measures volatility via a smoothed high-low bar range, setting an initial boundary when trend flips occur. As the trend persists across bars, the scri

Indicator v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Radius Trend [ChartPrime]

PivotPointsDailyTraditional

by Electrified-Trading
2 stars

PivotPointsDailyTraditional is a Pine Script library that provides calculation functions for standard daily pivot points. It imports daily high, low, and close values to compute the main pivot point along with multiple resistance and support levels. The librar

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

My Super Fancy Script

by Web3Degenerate
2 stars

My Super Fancy Script is an introductory Pine Script indicator that plots the daily closing price on the main price chart alongside a visual text label on the most recent bar. Designed as a basic tutorial example, it demonstrates how to configure indicator ove

Indicator v5
Updated 2 years ago · None stated GitHub repository of My Super Fancy Script

HTF Candles & Pivots

by itmakesyousick
2 stars

This indicator overlays higher-timeframe candles and traditional pivot levels on the price chart. It draws open-close or high-low ranges with optional wicks, thickness, filled negative candles, and bar coloring. History can show only new candles, all candles,

Indicator v5 Support & resistanceCandlestick patterns
Updated 3 years ago · None stated GitHub repository of HTF Candles & Pivots
1 stars

A table overlay on the price chart, short title Fundamentals, that shows company financial data pulled with TradingView's financial data requests. It lists diluted earnings per share, total revenue and operating margin for recent quarters or years, with quarte

Indicator v5 Screeners & dashboards
Updated 3 days ago · None stated GitHub repository of Earnings & Fundamentals Dashboard

An overlay indicator that records the high and low of a configurable opening range, starting at a set market open hour and minute, and projects the average, sub-levels and second and third support and resistance lines from it. It also plots 9 and 21 EMAs with

Indicator v5 Sessions & timeSupport & resistance
Updated 2 weeks ago · None stated GitHub repository of OR Levels + EMA Cross Integrated

Silver Setup Strategy

by GreyssonEnterprises
1 stars

A strategy version of the paint bar setup. It detects candles whose low is above the high from two bars earlier, or the mirror case, and trades only inside up to three user-set sessions on weekdays. Inputs set the take profit multiplier, stop offset in bars, a

Strategy v5 Sessions & timeSupport & resistance
Updated 3 months ago · MIT GitHub repository of Silver Setup Strategy

MES + XSP Busby Pivot

by majohnst
1 stars

This indicator draws Busby-style pivot levels on the price chart for XSP, using a selectable MES or ES futures symbol. It stores New York premarket highs, lows, and closes on the chart and on a 15-minute MES series, then builds an opening-range box after the r

Indicator v5 Support & resistanceSessions & time
Updated 4 months ago · None stated GitHub repository of MES + XSP Busby Pivot

EMA-Flat

by riegodavid-git
1 stars

A separate-pane indicator that measures how flat an exponential moving average is. It takes the absolute one-bar change of the EMA and divides it by the ATR, then plots that ratio as a histogram. Bars are teal when the ratio is below a flat threshold and orang

Indicator v5 TrendVolatility & bands
Updated 4 months ago · None stated GitHub repository of EMA-Flat

RS vs KLCI 63d

by kevinesk
1 stars

RS vs KLCI 63d measures the relative strength of a stock compared to a benchmark index over a customizable lookback period, defaulting to 63 trading days against the FTSE Malaysia KLCI. It calculates the difference between the stock's percentage return and the

Indicator v5 Oscillators & momentumScreeners & dashboards
Updated 4 months ago · None stated GitHub repository of RS vs KLCI 63d
1 stars

Corpus Array Stats Helpers is an experimental Pine Script strategy designed to test array manipulation and moving average functions. During the first 50 bars, the script collects close prices into an array to perform statistical calculations like sum, average,

Strategy v5 Moving averagesTrend
Updated 4 months ago · MIT GitHub repository of Corpus Array Stats Helpers

Talons Wyckoff Phase

by muammeryldrm42
1 stars

A strategy that looks for spring and upthrust patterns inside a consolidation range. A spring is a high-volume bar that dips below the recent range low, closes back above it and closes up. An upthrust is the mirrored move above the range high. A range counts a

Strategy v5 Support & resistanceMean reversion
Updated 5 months ago · None stated GitHub repository of Talons Wyckoff Phase

MA+SQZ+STO V1

by gabriel-klettur
1 stars

This strategy combines exponential moving averages, a Stochastic oscillator, and Squeeze Momentum calculations to identify long trade entries on the price chart. It enters long positions when the Stochastic K line crosses above D in oversold territory while pr

Strategy v5 TrendOscillators & momentum
Updated 7 months ago · None stated GitHub repository of MA+SQZ+STO V1

Double EMA Crossover

by Basant1Saini
1 stars

The Double EMA Crossover strategy plots a fast 9-period EMA and slow 21-period EMA on the price chart with a 200-period trend EMA filter. It generates long signals on golden crosses when price exceeds the trend EMA and MACD is bullish, and short signals on dea

Strategy v5 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of Double EMA Crossover

MegaBarAlgo

by Tradehook-org
1 stars

A Pine v5 script that detects unusually large candles on the price chart. A mega bar is one whose high-to-low range exceeds a multiple of its recent average range, optionally with volume above a multiple of average volume. Bullish bars get a green triangle and

Indicator v5 Volatility & bandsBreakout
Updated 8 months ago · None stated GitHub repository of MegaBarAlgo

SPX Gamma (DTE:30)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for SPX (the S&P 500 index) expiring in thirty days. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-03, produced offline fro

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

RB Rejection Blocks

by Ahmed1926
1 stars

A simple overlay indicator that marks rejection blocks from three-candle price structure. A bullish block is a down candle whose low is lower than the candles on both sides, and a bearish block is an up candle whose high is higher than both neighbours. Each bl

Indicator v5 SMC / ICT / price actionCandlestick patterns
Updated 9 months ago · None stated GitHub repository of RB Rejection Blocks

ES Absolute Trigger

by knectardev
1 stars

This strategy captures the first bar of each new day as an opening range and plots those high and low levels on the price chart. It enters one long position if price trades above the range high, or one short if price trades below the range low, then blocks fur

Strategy v5 BreakoutSessions & time
Updated 9 months ago · None stated GitHub repository of ES Absolute Trigger
1 stars

This indicator identifies market trends and projects dynamic price targets directly on the price chart. It calculates high and low bands using simple moving averages offset by a smoothed Average True Range buffer. Bullish and bearish trend signals trigger when

Indicator v5 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of Target Trend [BigBeluga]

A chart-overlay indicator that extends a LuxAlgo-style smart money concepts framework with trend and momentum filters. It marks internal and swing break of structure and change of character, order blocks, equal highs and lows, fair value gaps, premium and disc

Indicator v5 SMC / ICT / price actionTrend Repaints
Updated 9 months ago · None stated GitHub repository of Smart Money Concepts + EMA + RSI

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