Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 37)

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

1 stars

ORB - Opening Range Breakout calculates the highest high and lowest low during a configurable opening session and trades breakouts during the subsequent trading session. When the closing price crosses above the opening range high, it enters a long position; cr

Strategy v5 BreakoutSessions & time
Updated 8 months ago · None stated GitHub repository of ORB - Opening Range Breakout

RSI Indicator

by haydarkadioglu
1 stars

The RSI Indicator plots the Relative Strength Index on a separate pane to measure momentum. It calculates RSI with a user-defined length (default 14) and displays horizontal lines for oversold (default 40), overbought (default 60), and middle (50) levels. Back

Indicator v5 Oscillators & momentum
Updated 8 months ago · None stated GitHub repository of RSI Indicator

MNQ Gamma (7DTE)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for MNQ (Micro Nasdaq-100 futures, scaled from QQQ options) expiring in seven days. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2

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

An overlay indicator that projects standard deviation levels from interbank price delivery lookback ranges. Monthly, weekly, daily and intraday lookbacks can each be switched on and are applied according to the chart timeframe range set for them. The deviation

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 9 months ago · None stated GitHub repository of IPDA Standard Deviations
1 stars

Plots five moving averages on the price chart in one script, defaulting to exponential averages of 9, 20, 50, 100 and 200 bars in graded blue shades. Each line has its own type from SMA, EMA, SMMA, WMA or VWMA, plus length, source, offset and an optional highe

Indicator v5 Moving averagesTrend
Updated 9 months ago · MPL-2.0 GitHub repository of Multiple Moving Averages
1 stars

Volume Profile Advanced calculates session-based volume distribution across customizable lookback periods on the main price chart. It determines key market profile metrics, including the Point of Control (POC), Value Area High (VAH), Value Area Low (VAL), and

Indicator v5 VolumeSupport & resistance
Updated 9 months ago · MIT GitHub repository of Volume Profile Advanced
1 stars

This strategy records the high and low during a configurable opening session, defaulting to 09:30–10:00 exchange time, then locks the range when the session ends. It enters long when price closes above the range high and short when price closes below the range

Strategy v5 BreakoutSessions & time
Updated 11 months ago · None stated GitHub repository of Open Range Breakout Strategy

RSI Divergence Pro

by feliperazeek
1 stars

This strategy detects regular and hidden RSI divergences from pivot points on a 9-period RSI and trades them with labelled markers and stop lines on the price chart. Only long entries on bullish divergences are enabled by default, and shorts can be switched on

Strategy v5 DivergenceOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of RSI Divergence Pro
1 stars

Kurutoga Screener Timing Fix calculates price divergence from highest-high and lowest-low midpoints across three lookback horizons. By assessing divergence consistency across base, double, and quadruple lengths, it identifies synchronized momentum conditions.

Indicator v5 Screeners & dashboardsOscillators & momentum
Updated 1 year ago · MIT GitHub repository of Kurutoga Screener Timing Fix

TOTAL MTPI STRAT M_K

by Mikelkulla
1 stars

This strategy overlays the price chart to determine macro market direction by aggregating signals from an ensemble of up to 26 trend, momentum, and moving-average indicators. It incorporates an Augmented Dickey-Fuller (ADF) market regime filter to detect rangi

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of TOTAL MTPI STRAT M_K
1 stars

This strategy looks for a simplified RSI divergence pattern. A long signal needs RSI two bars ago below the oversold level, RSI rising on the next bar and price lower; a short signal mirrors this at the overbought level. Each entry has an ATR-based stop loss a

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of RSI Divergence Strategy

A variant of a large overlay indicator that merges forex session boxes with kill zones, a market structure oscillator, zero-lag trend levels, a volumatic VIDYA average, an adaptive Money Flow Index, an ADX histogram, a dual-speed TSI and multi-timeframe panels

Indicator v5 Sessions & timeSMC / ICT / price action

Trend Indicator A

by mkdir700
1 stars

A price-chart overlay that draws a selectable moving average of the close, with optional high and low lines and a fill between them, coloured by trend direction. The average type can be ALMA, HMA, SMA, SWMA, VWMA, WMA, ZLEMA or EMA. Optional RSI and volume con

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Trend Indicator A
1 stars

This strategy enters long and short trades when MACD histogram state agrees with KDJ filters. Longs need a positive histogram, MACD below zero, and K, D, and J below 30. Shorts need a negative histogram, MACD above zero, and those values above 70. It closes lo

Strategy v5 Oscillators & momentumMean reversion
Updated 1 year ago · None stated GitHub repository of MACD-KDJ Double Cross Strategy

Hello World

by fiji-solutions
1 stars

This educational script calculates and plots 50-bar highest high and lowest low levels directly on the price chart. It highlights breakout conditions by coloring the chart background green when the closing price exceeds the previous 50-bar high, and red when t

Indicator v5 Support & resistanceBreakout
Updated 2 years ago · None stated GitHub repository of Hello World
1 stars

An overlay that plots up to three double exponential moving averages with separate lengths, where setting a length to zero disables a line. The crossover logic depends on which lines are active: price against the first line when it is alone, or the first line

Indicator v5 Moving averagesTrend
Updated 2 years ago · None stated GitHub repository of Double Exponential Moving Average

algo-trade-v11

by akash-yellgetti
1 stars

A strategy-type script for the price chart that draws the high, low and midpoint of the first part of each session, set by end hour and minute inputs. It plots pivot-based support and resistance using fifteen left and right bars, labels breaks that coincide wi

Strategy v5 Sessions & timeSupport & resistance
Updated 2 years ago · None stated GitHub repository of algo-trade-v11

PineTradingbotWebhook

by PlusGenie
1 stars

This Pine library provides a single exported function, makeWebhookJson, that builds a JSON string for sending TradingView alerts to a Tbot server which places Interactive Brokers orders. The caller passes a webhook key, an order reference, a direction matching

Library v5
Updated 2 years ago · MPL-2.0 GitHub repository of PineTradingbotWebhook
1 stars

This strategy enters long when a 14-period RSI crosses above 60 and short when it crosses below 40, but only while ADX is under 20. Each trade carries a fixed point-distance stop loss of 75 and take profit of 150 from the average entry price, giving a one to t

Strategy v5 Oscillators & momentum
Updated 2 years ago · None stated GitHub repository of Swing Trading Strategy With 1:2 RR

Bband Pinch & Expand

by JohnsonHsiao
1 stars

Bband Pinch & Expand calculates Bollinger Bands width and compares it against its simple moving average to detect periods of volatility expansion and contraction. The script plots a histogram of the difference between the current band width and its moving aver

Indicator v5 Volatility & bandsMoving averages
Updated 3 years ago · None stated GitHub repository of Bband Pinch & Expand

Hotch Strat

by rajatjpatel
1 stars

A Pine v5 overlay that detects Williams-style fractals over an adjustable period and filters them by a recent RSI extreme. When a down fractal forms after RSI dipped into the 20s, 30s or 40s over the lookback, an up triangle of a matching shade is drawn below

Indicator v5 Oscillators & momentumSupport & resistance
Updated 4 years ago · None stated GitHub repository of Hotch Strat

RSI Strategy

by juliencrn
1 stars

RSI Strategy is a short Pine v5 strategy built on one RSI line with a long default length of 75. It enters long when RSI crosses above the overbought input and short when RSI crosses below the oversold input, so it follows momentum rather than fading extremes.

Strategy v5 Oscillators & momentum Archived
Updated 4 years ago · None stated GitHub repository of RSI Strategy

Ichimoku Kumo

by hayashi19
1 stars

This indicator draws an Ichimoku Kinko Hyo set on the price chart, with conversion and base lines, leading spans A and B, a lagging line and a cloud filled lime or red depending on which span is higher. Candles are coloured green, red or white by their positio

Indicator v5 TrendSupport & resistance
Updated 4 years ago · None stated GitHub repository of Ichimoku Kumo
575 stars

This indicator detects equal highs and lows by comparing prices within user-defined left and right bars using a tolerance percentage. It plots horizontal lines on the price chart for equal highs in one color and lows in another. A screener allows input of mult

Indicator v5 Support & resistanceTrend
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Equal Highs and Lows with Screener
330 stars

This indicator calculates the Supertrend direction across multiple selected symbols on the active timeframe using custom ATR length and multiplier settings. When the trend switches between bullish and bearish for any enabled asset, the script triggers formatte

Indicator v5 Trend
Updated 2 months ago · None stated GitHub repository of Multi Supertrend [Alorse]
318 stars

This indicator plots three moving averages on the price chart using lengths of 8, 21 and 50 by default. It colors the first average blue, the second maroon and the third red. A translucent fill between the first and second averages turns lime when the first is

Indicator v5 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of TVT 3X Scale In Out

ArrayStatistics

by ricardosantos79
261 stars

ArrayStatistics is a Pine Script v5 library of exported functions that compute descriptive statistics on numeric arrays. It returns root mean square, Pearson first and second skewness coefficients, the Pearson correlation between two samples, and kurtosis from

Library v5
Updated 4 years ago · None stated GitHub repository of ArrayStatistics
257 stars

This strategy overlays the price chart and builds Ichimoku-style Tenkan, Kijun, Chikou, and Senkou values from a ten-bar average of opens. It plots pivot highs and lows as resistance and support circles and reconstructs Heikin-Ashi-like prices from recent open

Strategy v5 TrendSupport & resistance Repaints
Updated 7 weeks ago · None stated GitHub repository of Dev - Futures No repaint

STRG One Bar Pursuit

by harryguiacorn
220 stars

The STRG One Bar Pursuit strategy identifies single-bar momentum reversals by monitoring shifts between bullish and bearish candlesticks starting from the year 2024. It enters a long position when a bullish candle follows a bearish candle and enters a short po

Strategy v5 Candlestick patternsMean reversion
Updated 1 year ago · None stated GitHub repository of STRG One Bar Pursuit

This strategy implements a single-layer perceptron machine learning model built from scratch to generate trading signals directly on the price chart. It calculates predictions based on sample size, threshold settings, and optional volatility or volume filters.

Strategy v5 AI / machine learningTrend
Updated 1 year ago · None stated GitHub repository of Machine Learning: Perceptron-Based Strategy [5] (v.3)
106 stars

This strategy simulates a dollar-cost averaging (DCA) trading bot that enters positions when a short moving average crosses over or under a long moving average. It manages trades by placing scaled safety orders as price drops, lowering the average position ent

Strategy v5 Moving averagesMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of 3Commas Visible DCA Strategy
92 stars

This indicator classifies the market into gamma regime types (negative gamma trend, positive gamma mean-reversion, or transition) by calculating a composite score based on daily ATR ratios, session VWAP crossover frequencies, and opening range displacement. It

Indicator v5 Volatility & bandsTrend
Updated 2 months ago · Custom licence GitHub repository of Moon Dev GEX Regime & Trap

CCI line gradient

by be-thomas
65 stars

This indicator calculates the Commodity Channel Index from a user-selected source and length, then plots that oscillator in a separate pane. It colors the CCI line with a gradient that shifts from the bear color toward the bull color as the value moves from ne

Indicator v5 Oscillators & momentum
Updated 6 days ago · GPL-3.0 GitHub repository of CCI line gradient

Fractals v2

by iamc1oud
56 stars

Fractals v2 identifies custom swing highs and swing lows across configurable left and right bar periods and visualizes them on the price chart. It plots extended swing lines, labels, boxes, and optional volume or open interest delta data for crypto futures. Tr

Indicator v5 Support & resistanceVolume Repaints
Updated 2 months ago · None stated GitHub repository of Fractals v2
43 stars

This indicator calculates standardized trend strength and historical volatility to estimate position sizes. It computes the differences between three user-defined EMAs standardized by price using MACD logic, while historical volatility is derived from the stan

Indicator v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Trend Strength & Volatility v2
43 stars

This strategy executes trades on short-term cryptocurrency charts using a combination of pivot support and resistance levels and a multi-pole smoothed trend filter. Entries trigger when price crosses the smoothed trend line and confirms above or below a short-

Strategy v5 TrendBreakout Repaints
Updated 2 years ago · None stated GitHub repository of SOL 1m - Strategy Candle Bar

Aroon

by TWODS-CAPITAL
37 stars

This indicator calculates and plots the standard Aroon Up and Aroon Down lines in a separate pane. It tracks the number of bars since the highest high and lowest low occurred over a specified lookback period, expressing the values as percentage levels between

Indicator v5 TrendOscillators & momentum
Updated 3 years ago · MIT GitHub repository of Aroon
29 stars

This library exports one function, custom_ma, which returns a 14-period exponential moving average of a supplied source series. It declares no inputs, so the length stays fixed at 14 and the caller chooses the series. It plots nothing and does not generate ent

Library v5 Moving averages
Updated 11 months ago · Custom licence GitHub repository of Exponential Trend [AlgoAlpha]

Burgle Bounce

by benso87
24 stars

Burgle Bounce is a price-chart strategy that treats a move toward one of up to four simple or exponential moving averages as a test when price comes within a user-set percentage of ATR, then exits toward a target average under a separate error margin. Longs an

Strategy v5 Moving averagesOscillators & momentum Repaints
Updated 4 years ago · MPL-2.0 GitHub repository of Burgle Bounce
20 stars

This indicator applies John Ehlers' roofing filter to a chosen price source in a separate pane. A high-pass stage removes cycles longer than the high-pass period, then a fixed super smoother smooths the result and a second high-pass produces a comparison serie

Indicator v5 Oscillators & momentum
Updated 1 year ago · None stated GitHub repository of John F. Ehlers - Zero Mean Roofing Filter
16 stars

Smart Money Concepts [LuxAlgo] X CDC overlay indicator visualizes market structure and smart money concepts directly on the price chart. It detects real-time internal and swing market structure events including Change of Character (CHoCH) and Break of Structur

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints

DI Engulfing A002

by ruckard
13 stars

This strategy executes trades based on candlestick engulfing patterns aligned with a 200-period exponential moving average trend filter. It enters long positions when a bullish engulfing candle follows three consecutive bearish candles while price trades above

Strategy v5 Candlestick patternsTrend
Updated 1 year ago · None stated GitHub repository of DI Engulfing A002

TTrades Daily Bias [TFO]

by dbruce1990
12 stars

This indicator determines daily and weekly bias using higher-timeframe structural levels and liquidity targets based on TTrades concepts. It plots period separators, tracks previous highs and lows, and changes level colors when liquidity is raided. An on-scree

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of TTrades Daily Bias [TFO]

This indicator builds an external signal series for the PineCoders backtesting and trading engine and plots it in a separate pane. Comments state that a built-in MACD setup is the template. It encodes filter state, long and short entries, exits, and optional s

Indicator v5 Oscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of Signal for Backtesting-Trading Engine [PineCoders]

Keltner Channel Trend - Eterna

by EternaHybridExchange
9 stars

This strategy plots a Keltner channel from an EMA basis and ATR bands on the price chart. It enters long when price crosses back above the lower band while trading above a slower trend EMA, and short when price crosses back below the upper band while below tha

Strategy v5 TrendVolatility & bands
Updated 7 months ago · MIT GitHub repository of Keltner Channel Trend - Eterna

OTE (Optimal Trade Entry)

by muammeryldrm42
7 stars

This strategy draws optimal trade entry zones on the price chart from confirmed swing pivots. A later swing high after a swing low defines an up impulse, and the reverse defines a down impulse. It then marks the 0.62 to 0.79 Fibonacci retracement of that swing

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 3 months ago · MIT GitHub repository of OTE (Optimal Trade Entry)

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