Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 39)

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

Omega Ratio

by Teerth1
1 stars

Draws Omega ratio curves for the chart symbol and a second comparison symbol across a range of minimum acceptable return levels. The levels are derived from the volatility of a reference security, and inputs set the calculation period, the number of increments

Indicator v5
Updated 6 months ago · None stated GitHub repository of Omega Ratio
1 stars

An indicator that sets trend direction from a fast and slow EMA on four-hour data, then looks for a crossover of the same EMAs on the chart timeframe, intended as fifteen minutes, in that direction. An optional volume-above-average check and a cooldown filter

Indicator v5 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of V14 4H EMA Trend with 15M Entries

Pivot Points - S/R Trading

by Basant1Saini
1 stars

Calculates classic support and resistance pivot levels using Traditional, Fibonacci, or Camarilla formulas from a higher timeframe. The strategy offers two execution modes: Bounce mode trades reversals within a customizable percentage buffer of support and res

Strategy v5 Support & resistanceBreakout
Updated 8 months ago · None stated GitHub repository of Pivot Points - S/R Trading

Supertrend Enhanced

by haydarkadioglu
1 stars

Supertrend Enhanced plots a classic ATR Supertrend on the price chart and marks trend flips as buy and sell signals. It builds upper and lower bands from an ATR or a simple moving average of true range, then flips direction when price crosses the opposite band

Indicator v5 TrendVolatility & bands
Updated 8 months ago · None stated GitHub repository of Supertrend Enhanced

Close Flip Reversal

by Tradehook-org
1 stars

A Pine v5 indicator that tracks recent swing highs and lows over a lookback and plots them as resistance and support levels on the price chart. A bullish flip is a close above the last swing high after a close below it, and a bearish flip is the reverse at the

Indicator v5 BreakoutSupport & resistance
Updated 8 months ago · None stated GitHub repository of Close Flip Reversal

QQQ Gamma (0DTE)

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 the same day. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-04, produced offline f

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

An overlay indicator that splits the trading day into accumulation, manipulation and distribution phases using New York time sessions, by default 19:00 to 01:00, 01:00 to 07:00 and 07:00 to 13:00. For each phase it draws a shaded box that tracks the session hi

Indicator v5 Sessions & time
Updated 9 months ago · None stated GitHub repository of Power Of 3 ICT AMD Accumulations
1 stars

Reports on which weekday the high and low of each trading week tend to occur, shown as columns in a separate pane. It collects data from daily bars, so it must be run on the 1-day chart. Settings allow a custom interval of days, a filter for up or down weeks,

Indicator v5 Sessions & time
Updated 9 months ago · MPL-2.0 GitHub repository of Tops & Bottoms - Day of Week
1 stars

This strategy plots the Relative Strength Index in a separate pane and fades extremes. It opens a long when RSI crosses back above the oversold level and a short when RSI crosses back below the overbought level. Open trades exit at a percentage stop loss or ta

Strategy v5 Oscillators & momentumMean reversion
Updated 11 months ago · None stated GitHub repository of RSI Mean Reversion Strategy

RSI Divergences

by feliperazeek
1 stars

This indicator finds regular and hidden divergences between price and a 14-period RSI, together with a stochastic of the RSI, and draws divergence lines and labels on the price chart. A margin setting from zero to two controls how large a divergence it accepts

Indicator v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of RSI Divergences

New Indicator Template

by NakliTechie
1 stars

This script serves as a starter template for building custom TradingView Pine Script indicators. It defines basic input settings including a length value and source selection, then provides empty sections for adding calculations and plot statements. The script

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

Financial YoY

by lumduan
1 stars

A fundamentals indicator that pulls company financial data such as revenue, net income, EBITDA, EPS, debt, cash flow and margin ratios, and shows two chosen items in a table on the chart. It can display quarter-on-quarter, year-on-year and compound growth for

Indicator v5 Screeners & dashboards Repaints
Updated 1 year ago · None stated GitHub repository of Financial YoY
1 stars

This strategy trades stochastic crossovers in extreme zones. It enters long when %K crosses above %D with both below the oversold level, and short when %K crosses below %D with both above the overbought level. Each entry carries an ATR-based stop loss and take

Strategy v5 Oscillators & momentumMean reversion
Updated 1 year ago · None stated GitHub repository of Stochastic Oscillator Strategy
1 stars

A separate-pane oscillator based on market structure ranges at three scales: short, intermediate and long. Each scale has a weight input, and the combined value is smoothed and shown as a gradient or a cycle histogram. Optional structure lines and tags for eac

Indicator v5 SMC / ICT / price actionOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Market Structure Oscillator
1 stars

A price-chart overlay that measures how fast an exponential moving average is turning. It takes the bar-to-bar change of a 20-bar EMA as its slope and the change in that slope as acceleration. When both exceed adjustable thresholds in the same direction, it ti

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Trend Slope Acceleration

An overlay indicator that marks reversal-style signals on the price chart: TD8 and TD9 counts, hammer, shooting star, bullish and bearish harami, and RSI divergence. Each signal can be switched on or off, and signals can be limited to long or short only. Marke

Indicator v5 Candlestick patternsDivergence
Updated 1 year ago · None stated GitHub repository of Price Action Signals and Filters

Hello World

by fiji-solutions
1 stars

Demonstrates symbol information functions alongside basic Average True Range (ATR) conversions. It calculates a 14-period ATR, converts the values into mintick points and pips, and plots each metric in a separate pane. Additionally, on the most recent historic

Indicator v5 Volatility & bands
Updated 2 years ago · None stated GitHub repository of Hello World

Floor Trader Pivots

by JoeTonDev
1 stars

An overlay that plots classic floor trader pivot levels: a pivot point, with support and resistance pairs one to three, as circles. The inputs come from the previous day, the previous week or the previous custom intraday session, chosen in a menu. Toggles show

Indicator v5 Support & resistanceSessions & time
Updated 2 years ago · None stated GitHub repository of Floor Trader Pivots

algo-trade-v111

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 then plots pivot-based support and resistance from left and right bar counts, shows labels where price bre

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

This strategy detects divergence strength across multiple indicators including RSI and MACD on the price chart. It evaluates regular and hidden divergences using user-defined weights for price and indicator changes along with lookback parameters for pivots and

Strategy v5 DivergenceOscillators & momentum
Updated 2 years ago · MPL-2.0 GitHub repository of Strength of Divergence Across Multiple Indicators on Tradingboat
1 stars

This strategy goes long when a 13-period EMA crosses above a 34-period EMA and short on the opposite cross, closing each side on the reverse cross. A percentage trailing stop, set separately for longs and shorts, ratchets behind the close and is plotted as cir

Strategy v5 Moving averagesTrend Repaints
Updated 2 years ago · None stated GitHub repository of Verge EMA Crossover + Trailing Stop

Bias

by JohnsonHsiao
1 stars

The indicator computes bias and mbias curves from typical price relative to highest and lowest closes across periods 3, 6, 9, 12, and 20. It sums the positive and negative biases then negates and plots them as b (red) and s (green) lines in a separate pane to

Indicator v5 Support & resistanceMean reversion
Updated 3 years ago · None stated GitHub repository of Bias

RSI Oscillator (Hotch)

by rajatjpatel
1 stars

A separate-pane trend oscillator built from two smoothed moving averages, 21 and 315 bars by default. Each average is passed through a weighted filter and then an RSI, and the result is scaled to a range of roughly 0 to 200. Two lines are drawn with dynamic gr

Indicator v5 Oscillators & momentumTrend
Updated 4 years ago · None stated GitHub repository of RSI Oscillator (Hotch)

Simple Moving Average

by juliencrn
1 stars

Simple Moving Average is a minimal overlay indicator that plots two simple moving averages of the close on the price chart: a 20-period line in orange and a 50-period line in blue. The lengths are fixed in the code and there are no inputs, signals, fills or al

Indicator v5 Moving averagesTrend Archived
Updated 4 years ago · None stated GitHub repository of Simple Moving Average

Modified ADX

by hayashi19
1 stars

This indicator computes the standard ADX from directional movement, subtracts twenty so that zero becomes the usual trend-strength threshold, and draws the result as columns in a separate pane. Positive columns are green, brighter when rising, and negative col

Indicator v5 Oscillators & momentumTrend
Updated 4 years ago · None stated GitHub repository of Modified ADX

This indicator plots ICT Fair Value Gaps and internal external range imbalances on multiple high timeframes. It detects liquidity pools and potential reversal zones by analyzing range structures. Three customizable timeframes allow selection of colors and bar

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · MPL-2.0 GitHub repository of ICT External and Internal Range Liquidity Multi-timeframe

Omar Edited WF

by Alorse
330 stars

Omar Edited WF is a trading strategy overlay built around Williams Fractals and multiple Exponential Moving Averages. It detects high and low fractal pivot points over configurable lookback periods alongside three adjustable EMA trendlines. Long entries are ma

Strategy v5 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Omar Edited WF
318 stars

This indicator calculates and plots two moving averages, which can be configured as either exponential or simple, along with a shaded fill between them to highlight trend direction. It also derives and plots upper and lower deviation levels using a customizabl

Indicator v5 Moving averagesTrend
Updated 2 months ago · MIT GitHub repository of TVT Short Term (1h)

ArrayStatisticsPearsonR

by ricardosantos79
261 stars

This Pine Script library provides a helper function to calculate the Pearson correlation coefficient between two numeric datasets stored as float arrays. It evaluates the linear relationship between the samples by dividing their covariance by the product of th

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

This overlay indicator smooths a rolling highest low and lowest high with a rational quadratic kernel, then holds a step line that switches between those two smoothed levels when the selected source crosses them. It plots that line as crosses on the price char

Indicator v5 TrendSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Donald - Highest-Lowest Visual

STRG-BBForce

by harryguiacorn
220 stars

STRG-BBForce is a Bollinger Bands trend-following strategy. It calculates standard Bollinger Bands and tracks directional alignment across the upper, lower, and basis lines. When all three lines slope upward, it opens a long position and closes short positions

Strategy v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of STRG-BBForce
114 stars

This indicator compares two user-selected symbols by plotting the z-score of their log-price ratio in a separate pane. It averages the ratio with a chosen moving average, measures standard deviation over the same period, and marks a buy when the ratio falls be

Indicator v5 Mean reversion
Updated 1 year ago · None stated GitHub repository of Pair Trading - Cointegration

This strategy identifies bullish and bearish Three Line Strike candlestick patterns combined with a dual moving average cloud and Volume Spread Analysis (VSA). It triggers long or short entries when a strike formation confirms in alignment with the moving aver

Strategy v5 Candlestick patternsTrend Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of 3LS 3 Line Strike Strategy [Kintsugi Trading]

CCI Line Gradient

by be-thomas
65 stars

Calculates the Commodity Channel Index (CCI) and plots it in a separate pane using dynamic color gradients. The script adjusts the signal line color smoothly across values ranging from -200 to +200. Additionally, it fills the background between the +100 and -1

Indicator v5 Oscillators & momentum
Updated 6 days ago · GPL-3.0 GitHub repository of CCI Line Gradient
56 stars

This indicator identifies fractal-based pivot highs and lows to map out market structure directly on the price chart. It detects bullish and bearish structure breaks, automatically labeling Break of Structure (BOS) and Change of Character (ChoCH) events when p

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of Market Structure (Fractal)
43 stars

This strategy trades SOL perpetual candles on the price chart. It tracks confirmed pivot highs and lows as support and resistance circles, then compares close with a smoothed filter and a three-period EMA to mark long and short conditions after the bar closes.

Strategy v5 Moving averagesSupport & resistance Repaints
Updated 2 years ago · None stated GitHub repository of SOL 1m Strategy Candle Bar

Auto Fib Extension

by TWODS-CAPITAL
37 stars

Auto Fib Extension detects pivot highs and lows on the price chart and draws Fibonacci extension levels from the latest swing. Depth sets how many bars define a pivot, and Reverse flips the swing direction. Users can extend lines left or right, show prices and

Indicator v5 Support & resistance
Updated 3 years ago · MIT GitHub repository of Auto Fib Extension

IndicatorExample

by nersent
29 stars

This indicator calculates the difference between a slow RSI and a fast RSI based on a selected price source. It plots the resulting oscillator value in a separate pane to display relative momentum changes between the two periods. Users can configure the source

Indicator v5 Oscillators & momentum
Updated 11 months ago · Custom licence GitHub repository of IndicatorExample
24 stars

This overlay strategy combines a Cipher B WaveTrend oscillator with two optional moving averages on the price chart. It exposes WaveTrend channel and average lengths, overbought and oversold levels, buy, sell and gold dots, and regular or hidden divergence mar

Strategy v5 Oscillators & momentumMoving averages
Updated 4 years ago · MPL-2.0 GitHub repository of Cipher B + EMAs Strategy
20 stars

This indicator calculates a deseasonalized centered moving average from the selected source data using chosen MA types like WMA, EMA, SMA or RMA. It plots the resulting value on the price chart and changes the color to green or red based on the direction of th

Indicator v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Modified Deseasonalized/Centered MA

DI Engulfing B002

by ruckard
13 stars

This strategy identifies trend-following engulfing setups filtered by a 200 EMA on the price chart. Long trades require price to be above the 200 EMA following three consecutive bearish candles engulfed by a bullish candle. Short entries mirror this structure

Strategy v5 TrendCandlestick patterns
Updated 1 year ago · None stated GitHub repository of DI Engulfing B002
12 stars

Tracks and visualizes active, swept, and closed-through swing points while measuring C3 continuation success rates following C2 candle closures based on ICT concepts. It draws customizable level lines directly on the price chart and compiles performance statis

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of C2 Next Candle Statistics Tracker

This indicator generates standardized signal outputs using MACD logic designed to feed into the PineCoders Backtesting-Trading Engine via external inputs. It encodes filter states, entry signals, stop loss levels, and exit triggers into a single numerical seri

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

Linear Regression Channel - Eterna

by EternaHybridExchange
9 stars

This strategy plots a linear regression of close and deviation bands on the price chart. It enters long when price crosses up from the lower band in an uptrend defined by an EMA and a rising regression line, and enters short on a rejection from the upper band

Strategy v5 TrendMean reversion Repaints
Updated 7 months ago · MIT GitHub repository of Linear Regression Channel - Eterna

RSI Divergence

by muammeryldrm42
7 stars

This strategy detects bullish and bearish RSI divergences using price and RSI pivot points. A bullish divergence triggers a long entry when price forms a lower low while RSI forms a higher low below 40. A bearish divergence triggers a short entry when price fo

Strategy v5 Oscillators & momentumDivergence
Updated 3 months ago · MIT GitHub repository of RSI Divergence

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