Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 31)

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

Edge 71

by subos2008
6 stars

This strategy plots prior high and low breakout levels on the price chart and trades a long breakout. It goes long when the bar high exceeds the previous bar's highest high over a user-set lookback, and it closes that long when the bar low breaks the previous

Strategy v5 BreakoutSupport & resistance Repaints
Updated 2 years ago · Custom licence GitHub repository of Edge 71

30 Laws Dashboard

by AllienNova
5 stars

This indicator overlays a regime and risk dashboard on the price chart. It calculates ADX from DMI, an ATR ratio against a long moving average of ATR, and a daily VIX close. It labels the market SHOCK, TRENDING, RANGING, or TRANSITION using those thresholds. I

Indicator v5 Screeners & dashboardsTrend
Updated 8 weeks ago · None stated GitHub repository of 30 Laws Dashboard

ICT Concepts [LuxAlgo]

by rubystar0512
5 stars

This indicator identifies and visualizes key Inner Circle Trader (ICT) market structure concepts directly on the price chart. It detects Market Structure Shifts (MSS), Breaks of Structure (BOS), bullish and bearish Order Blocks (OB), Volume Imbalances, Fair Va

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 years ago · None stated GitHub repository of ICT Concepts [LuxAlgo]

RSI EMA Breakout

by latentwill
4 stars

This strategy trades momentum breakouts by combining an Exponential Moving Average with the Relative Strength Index. It enters a long position when the closing price is above the EMA and the RSI crosses above the breakout threshold. It enters a short position

Strategy v5 TrendOscillators & momentum
Updated 8 days ago · None stated GitHub repository of RSI EMA Breakout

Japo [Alorse]

by Hugs-4-Bugs
4 stars

This strategy plots a fast EMA and a slow EMA of Heikin Ashi closes requested from two higher timeframes, both drawn on the price chart. It enters long when the fast average crosses above the slow average and enters short on the opposite cross, only inside a u

Strategy v5 TrendMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of Japo [Alorse]

EFELER-DDT

by Kalumur
4 stars

EFELER-DDT plots multiple moving average overlays and pivot-based support and resistance levels directly on the price chart. It calculates dual Weighted Moving Averages (9 and 15 WMA), three standard Exponential Moving Averages (20, 50, and 200 EMA), and three

Indicator v5 Moving averagesTrend Repaints
Updated 2 years ago · None stated GitHub repository of EFELER-DDT

Gap Finder [KL]

by kevinhhl
4 stars

This indicator detects price gaps between consecutive bars and plots them directly on the price chart. Gaps are identified when current price ranges separate from the prior bar candle body beyond a user-defined absolute point or percentage threshold. It projec

Indicator v5 Support & resistance
Updated 3 years ago · None stated GitHub repository of Gap Finder [KL]

EMA_SMA

by might-tree
4 stars

This indicator draws a 21-period exponential moving average and a 21-period simple moving average of the closing price directly on the price chart. The exponential average is blue and the simple average is red. Settings for length, source, and offset are decla

Indicator v5 Moving averages
Updated 3 years ago · None stated GitHub repository of EMA_SMA

This long-term trend-following indicator plots three Weighted Moving Averages (13, 48, and 200 periods) directly on the main price chart. It evaluates price crossovers against each moving average to detect early trend shifts, alongside crossovers between WMA l

Indicator v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of Snag - Swing Trade Long Term V3

RSI-7 Breakout

by aofwittawat
4 stars

This strategy identifies breakout trades using a 7-period RSI combined with price extreme lookbacks. A long entry triggers when the RSI rises above 70 and price reaches a new lookback high, provided price remains above an optional EMA trend filter and passes a

Strategy v5 Oscillators & momentumBreakout
Updated 4 years ago · None stated GitHub repository of RSI-7 Breakout
3 stars

This indicator calculates the Commodity Channel Index from a user-selected source and length and plots it in a separate pane. Dashed lines mark plus 100 and minus 100, a middle line sits at zero, and the area between the outer bands is filled. A smoothing line

Indicator v5 Oscillators & momentumScreeners & dashboards
Updated 2 days ago · None stated GitHub repository of Commodity Channel Index
3 stars

This indicator plots an eight-period and a twenty-period exponential moving average on the price chart and colors candles by their relationship. Candles are green when the faster average is above the slower average and red when it is below. The average lengths

Indicator v5 Moving averagesTrend
Updated 5 months ago · None stated GitHub repository of 8/20 Cross Colored Candles
3 stars

This utility indicator benchmarks Pine Script execution performance, tracking execution time, estimated memory usage, and accuracy scores across customizable iteration counts. It allows comparison of custom routines against built-in calculations such as RSI, S

Indicator v5
Updated 7 months ago · None stated GitHub repository of Debug Performance Benchmark

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

This price-chart strategy is built around RSI divergence using a configurable RSI length and source plus left and right pivot lookbacks. Separate toggles control regular and hidden bullish and bearish divergence plots, and an RSI level is available as a take-p

Strategy v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of Sapphire RSI Divergence Strategy

This indicator marks Hammer and Hanging Man candlestick patterns on the price chart. A Hammer requires a bullish candle with a small real body, a long lower shadow, and a short upper shadow after a lookback downtrend. A Hanging Man uses the same body and shado

Indicator v5 Candlestick patternsTrend
Updated 2 years ago · None stated GitHub repository of Hammer and Hanging Man (Candlestick Pattern)

DFO 3

by jawauntb
3 stars

DFO 3 plots a directional flow oscillator in a separate pane. It averages five normalized components: a composite RSI momentum index, a cumulative volume delta built from one-minute volume, a price position over a 100-bar range, an EMA-versus-SMA trend spread,

Indicator v5 Oscillators & momentumVolume
Updated 2 years ago · GPL-3.0 GitHub repository of DFO 3

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

This overlay indicator builds a weighted volume profile over a chosen number of bars and plots pivot points with a point of control line on the price chart. Volume can be weighted toward recent, normal, or past bars, and swing length, row count, and alignment

Indicator v5 VolumeSupport & resistance
Updated 5 months ago · None stated GitHub repository of Weighted Volume Profile Pivot Points | Flux Charts

Alpy Vix

by avatar-lavventura
2 stars

Alpy Vix is a strategy that computes the Wave Trend oscillator from HLC3 using EMA and SMA, the Williams VIX Fix formula, VWAP levels, and Bollinger Bands on WVF. It generates signals on WT crosses and WVF conditions like long_VWMA or close strength versus pri

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

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

This indicator overlays a volatility filter on the price chart. It loads CBOE VIX and VIX3M closes, divides VIX by VIX3M, and smooths that ratio with a five-bar simple moving average. A breakout is marked allowed only when the smoothed ratio is below 0.98 and

Indicator v5 Volatility & bandsBreakout
Updated 10 months ago · MIT GitHub repository of Harter VIX Curve Breakout Filter

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

This indicator tracks and plots market breadth data for major stock market indices such as the S&P 500, Nasdaq, Dow Jones, and Russell indices in a separate pane. It fetches external market breadth metrics showing the percentage of stocks trading above various

Indicator v5 Moving averages
Updated 1 year ago · None stated GitHub repository of 市场宽度 - Market Breadth

2b Reversal

by ashwagamma
2 stars

This indicator identifies 2B reversal patterns across auto-detected or user-defined price levels on the chart. It monitors breakdowns and breakouts against key references such as regular trading hours highs and lows, overnight swings, previous day boundaries,

Indicator v5 BreakoutSupport & resistance
Updated 1 year ago · None stated GitHub repository of 2b Reversal

Calculates and compares estimated buying and selling volume over a fixed lookback period from the latest bar. For each bar in the range, volume is apportioned between buyers and sellers according to price movement distances. The indicator displays an informati

Indicator v5 Volume
Updated 1 year ago · MPL-2.0 GitHub repository of PriceCatch Volume Analysis Fixed Range

Elder Force Index

by ryangaraygay
2 stars

The Elder Force Index indicator calculates efi as the EMA of price change times volume with a configurable length. It then plots the difference between efi and its 9-period SMA as colored column bars in a separate pane, with positive values colored up and nega

Indicator v5 Oscillators & momentumVolume
Updated 1 year ago · MIT GitHub repository of Elder Force Index

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

The MarketSmith Indicator enhances price action visualization by applying custom candle coloring and overlaying configurable moving averages on the main chart. Bar colors can be based either on the bar open relative to close or on the price relative to the pre

Indicator v5 Moving averagesTrend
Updated 2 years ago · MIT GitHub repository of MarketSmith Indicator

HTF Candles & Pivots

by itmakesyousick
2 stars

HTF Candles & Pivots overlays higher timeframe candles and pivot point levels directly onto the main price chart. It renders customizable higher timeframe candle bodies, wicks, and labels while calculating pivot points, Central Pivot Range, and projected price

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

This overlay indicator combines several ZigZag lengths with an ATR-based ZigZag Supertrend and oscillator settings to mark trend direction on the price chart. It reads close or an optional alternative source and keeps a limited pivot history. A movable table s

Indicator v5 TrendVolatility & bands
Updated 3 years ago · None stated GitHub repository of Multi-ZigZag Multi-Oscillator Trend Detector

CBB MTF Penta RSI

by codybbrown
2 stars

This indicator calculates five RSI series from the chart close: a short RSI smoothed by a simple moving average, plus RSI lengths of 14, 30, 70, and 120. It stores those readings in arrays and offers toggles for price-bar colors that mark trend, crossovers, cr

Indicator v5 Oscillators & momentum
Updated 3 years ago · None stated GitHub repository of CBB MTF Penta RSI

STC+TrendTrader

by theupslidedown
2 stars

This indicator combines the Schaff Trend Cycle (STC) oscillator with Andrew Abraham's Trend Trader indicator in a separate pane. It calculates the STC oscillator using fast and slow moving averages combined with double stochastic smoothing, plotting a colored

Indicator v5 Oscillators & momentumTrend
Updated 3 years ago · None stated GitHub repository of STC+TrendTrader

This indicator plots volume-based support and resistance zones on the price chart. It marks high, low, and close levels when volume exceeds a moving-average threshold, and can shade zones between those lines. Users choose up to several time frames, line style

Indicator v5 Support & resistanceVolume
Updated 4 years ago · MIT GitHub repository of Volume-based Support & Resistance Zones V2

Order 65 bars

by DaniilOkrug
2 stars

This indicator calculates the percentage distance between the current price and the highest high price over the last 65 bars. It maintains an array of closing prices for the specified number of bars and identifies the maximum high value. The script then plots

Indicator v5 Volatility & bandsSupport & resistance
Updated 4 years ago · MIT GitHub repository of Order 65 bars
1 stars

An overlay for the S&P 500 index that measures the opening range over an observation window, classifies the day as volatile or not by comparing that range with the daily ATR, and projects high and low boundaries for the session. Reversal signal triangles appea

Indicator v5 Sessions & timeMean reversion
Updated 2 days ago · None stated GitHub repository of ZeroDTE Range Predictor

Stochastic and RSI

by teshmi9z-beep
1 stars

A separate-pane indicator that shows a slow stochastic oscillator and an RSI together. The stochastic uses a long K length with smoothing, and its D line changes colour with its direction. Overbought and oversold lines are drawn for both oscillators, with defa

Indicator v5 Oscillators & momentum
Updated 2 days ago · MIT GitHub repository of Stochastic and RSI

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 5 days ago · None stated GitHub repository of Range Risk Lines v3

GridWB3

by cckmchiu-gapps
1 stars

This indicator draws a rectangular price and time grid on the price chart from two manually set corner anchors, a top-right and a bottom-left, each with a time and a price. The box is divided into one to seven side-by-side grid units with alternating colours,

Indicator v5
Updated 8 days ago · None stated GitHub repository of GridWB3

Dhan+Webhook

by 7b809
1 stars

An overlay indicator that combines a Hull-style moving average, selectable as HMA, EHMA or THMA, with pivot-based support and resistance lines and optional labels. It builds alert messages in JSON for a broker webhook, including action, price, quantity, order

Indicator v5 Moving averagesSupport & resistance
Updated 2 weeks ago · None stated GitHub repository of Dhan+Webhook

AlgoBot Strategy

by femibol
1 stars

A strategy that approximates a trading bot's entry and exit rules in three modes: EMA 8 and 21 momentum with ADX and a volume surge, relative-volume momentum, and a daily SuperTrend trend rider using a daily EMA, ADX and consecutive green days. Exits include a

Strategy v5 Oscillators & momentumTrend
Updated 6 weeks ago · None stated GitHub repository of AlgoBot Strategy

Simple Test

by mrme000m
1 stars

This indicator plots a 14-period relative strength index of the close and a 21-period exponential moving average of the close in a separate pane. The RSI series is drawn in purple and the EMA series in blue. There are no user inputs, so both lengths stay fixed

Indicator v5 Oscillators & momentumMoving averages
Updated 7 weeks ago · None stated GitHub repository of Simple Test

DMS v2 Breadth Dispersion

by AssetWhisper
1 stars

An indicator in a separate pane that compares a cap-weighted index with its equal-weighted counterpart, SPY and RSP by default, to gauge market breadth. It takes the log ratio of the two, then adds its momentum, a z-score, a percentile rank, divergences agains

Indicator v5 DivergenceScreeners & dashboards
Updated 7 weeks ago · MPL-2.0 GitHub repository of DMS v2 Breadth Dispersion

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