Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 61)

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

A strategy that trades from a linear regression channel combined with three moving averages (base, slow and fast). It can take long and short deals, requires a minimum channel width, and sizes orders either as a share of equity or a fixed quantity. Exits scale

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of LinReg Quick Strategy

SMR

by JohnsonHsiao
1 stars

This indicator calculates a triple-smoothed Relative Strength Index oscillator and displays it in a separate pane. It evaluates momentum by applying the RSI calculation iteratively across three stages using a user-defined period. The script plots the resulting

Indicator v5 Oscillators & momentum
Updated 3 years ago · None stated GitHub repository of SMR
330 stars

This indicator calculates the MACD oscillator from a configurable source with fast and slow lengths, then plots the histogram, MACD line, and signal line in a separate pane. It detects regular bullish divergences (price lower lows with oscillator higher lows),

Indicator v5 Oscillators & momentumDivergence
Updated 2 months ago · None stated GitHub repository of MACD + Divergences [Alorse]

FunctionArrayMovingAverage

by ricardosantos79
261 stars

This Pine Script v5 library provides an exported function to calculate moving averages directly over float arrays. Users can supply a sample array, set the smoothing length, choose whether to omit initial values prior to reaching the lookback window, and speci

Library v5 Moving averages
Updated 4 years ago · None stated GitHub repository of FunctionArrayMovingAverage

NQU2023-10M V1

by dearvn
257 stars

The NQU2023-10M V1 strategy calculates 3-period simple moving averages of high and low prices alongside 3-bar price action patterns to detect short-term swings and trend reversals. It enters long or short trades when price action confirms a trend change condit

Strategy v5 TrendMoving averages
Updated 7 weeks ago · None stated GitHub repository of NQU2023-10M V1
106 stars

Adaptive Price Channel Strategy combines Donchian-style high/low channels with Average Directional Index (ADX) and ATR-based volatility offsets. It evaluates trend strength and directional movement to trigger entries when price crosses ATR-adjusted upper or lo

Strategy v5 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Adaptive Price Channel Strategy

V5 Concepts Alerts 09

by be-thomas
65 stars

This indicator calculates a 14-period relative strength index and detects when that oscillator crosses above 50. It defines an alert condition whose message includes the current RSI value through a plot placeholder. The RSI series is plotted with display set t

Indicator v5 Oscillators & momentum
Updated 6 days ago · GPL-3.0 GitHub repository of V5 Concepts Alerts 09

Auto Pivot Trendlines

by dcaoyuan
55 stars

This indicator draws trendlines between confirmed swing points on the price chart. It finds pivot highs and pivot lows with a fixed ten-bar lookback on each side, then connects successive highs with red lines and successive lows with green lines. There are no

Indicator v5 Support & resistanceTrend
Updated 6 months ago · Apache-2.0 GitHub repository of Auto Pivot Trendlines

Confluence Suite

by TamaraKGreen
46 stars

The Confluence Suite indicator draws multiple trading signals and tools directly on the price chart. It generates entry and exit signals based on selected modes and filters, with an AI signal classifier rating quality from 1-4. Additional features include smar

Indicator v5 TrendSMC / ICT / price action
Updated 8 weeks ago · None stated GitHub repository of Confluence Suite

Choppiness Index

by TWODS-CAPITAL
37 stars

Choppiness Index is a volatility and trend indicator that measures whether a market is consolidating or trending directionally. It calculates the ratio of the true range sum over a specified period to the highest and lowest price range, scaled logarithmically

Indicator v5 Volatility & bandsTrend
Updated 3 years ago · MIT GitHub repository of Choppiness Index

EnlargedBodies A002

by ruckard
13 stars

This strategy executes trend-following trades directly on the price chart based on consecutive expanding candle bodies filtered by the 13-period exponential moving average. When price is above the EMA13, it enters long positions after three consecutive bullish

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

RSI Oscillator

by suyons
7 stars

This indicator calculates and plots Relative Strength Index (RSI) values across four distinct user-defined timeframes within a separate pane. Each higher-timeframe RSI line is rendered with unique colors and line thicknesses, displayed alongside customizable u

Indicator v5 Oscillators & momentum
Updated 4 months ago · None stated GitHub repository of RSI Oscillator
6 stars

This indicator maps multi-timeframe candle range patterns based on specific time-of-day sessions. It converts user-specified SAST starting hours into UTC to identify initial 4-hour range candles, plotting their high, low, and median levels across the chart. Th

Indicator v5 Sessions & timeSupport & resistance
Updated 7 months ago · None stated GitHub repository of 3-Candle Time Pattern - Enhanced
4 stars

This strategy combines nine technical indicators including RSI, SuperTrend, MACD, Triple EMA, Bollinger Bands, Ichimoku, HMA, Swing Failure Pattern, and Z-Score. Each indicator votes on long or short direction, with a Dynamic mode that weights votes based on m

Strategy v5 TrendOscillators & momentum
Updated 2 days ago · None stated GitHub repository of Simpleton v0.06 Kimi_Cursor
3 stars

Calculates a composite market internals oscillator by averaging the 50-period Relative Strength Index (RSI) across four major U.S. index ETFs: SPY, DIA, QQQ, and IWM. It plots this composite oscillator against a 50 midline in a separate pane, dynamically color

Indicator v5 Oscillators & momentumScreeners & dashboards Repaints
Updated 5 months ago · None stated GitHub repository of CSW Internals Pro

EzSMC

by TamTH-Dev
2 stars

EzSMC is an overlay indicator designed for Smart Money Concepts analysis. It identifies and plots bullish and bearish order blocks directly on the price chart, with optional multi-timeframe order block capabilities. Traders can categorize order blocks into int

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 6 weeks ago · None stated GitHub repository of EzSMC

3.Candlestick - 5.Doji Candles

by Web3Degenerate
2 stars

This indicator identifies indecision doji candles and highlights potential market reversals directly on the price chart. It calculates the candle body percentage relative to total range and compares the upper and lower wick proportions. When a valid doji coinc

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of 3.Candlestick - 5.Doji Candles
1 stars

A strategy that merges two signal engines: a JAT+BSM engine and a POI scalp engine built on pattern and composite scoring. Either or both can be enabled, and signals combine as either-fires, both-must-agree, or one engine only. Risk uses either an ATR based st

Strategy v5 TrendScalping
Updated 2 days ago · None stated GitHub repository of JinxAlpha Unified Strategy v1

WaveTrend Adv

by 7b809
1 stars

An overlay version of the WaveTrend oscillator that hides the oscillator lines by default and instead prints buy and sell labels on the price chart. Labels show time, price, volume, previous volume and percentage changes. Channel and average lengths adjust aut

Indicator v5 Oscillators & momentum
Updated 2 weeks ago · None stated GitHub repository of WaveTrend Adv
1 stars

This strategy generates trend-following trade signals by combining the Supertrend indicator with the Directional Movement Index (DMI). It enters long when the closing price crosses above the Supertrend line while +DI exceeds -DI and the ADX value is above 18.

Strategy v5 TrendVolatility & bands
Updated 4 months ago · MIT GitHub repository of Supertrend DMI Filter

Goertzel Algorithm V6

by mikeyhu70
1 stars

This indicator applies the Goertzel algorithm to price in a separate pane, measuring one frequency component set by a period length and a measurement block length. A training percentage and shift settings align the fitted wave with recent data, and the wave ex

Indicator v5 AI / machine learning
Updated 6 months ago · None stated GitHub repository of Goertzel Algorithm V6

VAMA Bands(BreakOut)+!

by ymlee1104
1 stars

This strategy trades breakouts using VAMA Bands on the price chart. It supports long and short entries with filters from VAMA, MACD, DI, ADX, OBV and optional entry limits. Positions exit on opposite trend, force close periods or flip signals. Main settings ad

Strategy v5 BreakoutMoving averages
Updated 7 months ago · None stated GitHub repository of VAMA Bands(BreakOut)+!

Range Scalper

by knectardev
1 stars

Range Scalper is a price-chart overlay indicator. Archived notes describe an ATR-based dynamic range threshold meant to adapt range detection to volatility, plus breakout shape markers. The file is labeled simplified for the archive and shows no parsed inputs.

Indicator v5 ScalpingVolatility & bands
Updated 9 months ago · None stated GitHub repository of Range Scalper

v5 Combination by Yzz

by webcrack4
1 stars

This combination indicator plots a Volume Profile or Market Profile histogram directly on the main price chart alongside MACD calculations. It measures volume or time distribution across custom price rows, highlighting key market structure levels such as the P

Indicator v5 VolumeSupport & resistance
Updated 9 months ago · None stated GitHub repository of v5 Combination by Yzz

Meta Divergence

by zhuzp98
1 stars

An indicator that looks for regular or hidden divergences between price pivots and up to eleven oscillators and volume tools, including MACD, RSI, Stochastic, CCI, momentum, OBV, Chaikin Money Flow and MFI. It draws divergence lines and labels on the price cha

Indicator v5 DivergenceOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of Meta Divergence

Squeeze Cross

by JohnsonHsiao
1 stars

This indicator calculates a normalized volatility oscillator plotted in a separate pane. It measures the distance between the closing price and a simple moving average, standardized by a scaled standard deviation band. The script plots the resulting ratio alon

Indicator v5 Volatility & bandsOscillators & momentum
Updated 3 years ago · None stated GitHub repository of Squeeze Cross
330 stars

This mean-reversion strategy combines multi-timeframe exponential moving averages, Bollinger Bands, and the Relative Strength Index. It generates long and optional short trade signals when price interacts with the Bollinger Bands alongside RSI threshold confir

Strategy v5 Mean reversionMoving averages
Updated 2 months ago · None stated GitHub repository of MEMA + BB + RSI [Alorse]

FunctionBestFitFrequency

by ricardosantos79
261 stars

FunctionBestFitFrequency is a Pine Script v5 library that smooths a float array with a rolling average and searches a frequency range for the moving-average length whose residual signs are closest to evenly split. The array function can omit early values short

Library v5
Updated 4 years ago · None stated GitHub repository of FunctionBestFitFrequency

Snag - 100 Win

by dearvn
257 stars

This indicator plots smoothed adaptive moving averages on the price chart using T3, AMA, or Kaufman methods. It accepts various sources including standard and Heikin-Ashi versions. Main settings select the calculation type, input source, period length, and smo

Indicator v5 Moving averagesTrend
Updated 7 weeks ago · None stated GitHub repository of Snag - 100 Win
106 stars

Calculates multi-period logarithmic regression trend channels and deviation bands across up to twenty selectable lookback lengths directly on the price chart. It evaluates channel slopes and Pearson's correlation coefficient to detect market trends and generat

Strategy v5 TrendSupport & resistance Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Advanced Trend Detection Strategy
65 stars

This indicator demonstrates Pine Script bar-state handling on the price chart. It creates one persistent label on the first bar and, when the current bar is the last bar, moves that label to the bar high and sets its text to the high formatted to the symbol mi

Indicator v5
Updated 6 days ago · GPL-3.0 GitHub repository of V5 Concepts Bar States 02

Channel

by dcaoyuan
55 stars

The Channel indicator identifies recent pivot highs and pivot lows using fixed left and right bar lengths. It connects the two most recent pivot highs and two most recent pivot lows with extended lines to project upper and lower boundaries directly on the pric

Indicator v5 TrendSupport & resistance
Updated 6 months ago · Apache-2.0 GitHub repository of Channel

Daily close statistics

by TamaraKGreen
46 stars

This indicator plots the previous day's high, low and midpoint and the previous week's high, low and midpoint directly on the price chart. It also marks New York, London and Asia sessions, optionally filling each session range and showing that session's maximu

Indicator v5 Support & resistanceSessions & time
Updated 8 weeks ago · None stated GitHub repository of Daily close statistics

Commodity Channel Index

by TWODS-CAPITAL
37 stars

This indicator plots the Commodity Channel Index in a separate pane. It measures how far the selected source, defaulting to the average of high, low, and close, sits from its simple moving average, scaled by mean deviation. Dashed bands mark plus and minus 100

Indicator v5 Oscillators & momentum
Updated 3 years ago · MIT GitHub repository of Commodity Channel Index

Ersinator A002

by ruckard
13 stars

Ersinator A002 is a strategy that combines moving average and KDJ momentum calculations to generate trade signals directly on the price chart. It features built-in alert formatting designed for integration with the Zignaly crypto trading platform. Position ris

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Ersinator A002

RSI Signal

by suyons
7 stars

RSI Signal is a multi-timeframe momentum indicator that plots buy and sell signals on the price chart based on Relative Strength Index crossovers. It retrieves RSI values across four configurable timeframes and evaluates trend alignment using the highest timef

Indicator v5 Oscillators & momentumScreeners & dashboards Repaints
Updated 4 months ago · None stated GitHub repository of RSI Signal

Super Alligator Strategy

by eltonaguiar
4 stars

This strategy plots the Alligator indicator with customizable Jaw, Teeth, and Lips lines on the price chart. It generates buy and sell signals when the close price moves beyond the Lips line by a minimum gap percentage. The strategy includes optional SMA and V

Strategy v5 TrendMoving averages
Updated 2 days ago · None stated GitHub repository of Super Alligator Strategy

v2

by jash-git
3 stars

This indicator plots five Exponential Moving Averages (EMA 3, 13, 34, 55, and 144) on the price chart to determine market trend structure. It identifies entry confluence signals by detecting when an EMA 3 and 13 crossover coincides with a MACD crossover within

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

CSW MTF Sentiment Line evaluates market sentiment across five customizable timeframes on the price chart. Traded assets can be measured using RSI, volatility (RSI of price standard deviation), or volume (RSI of volume moving average), with values normalized on

Indicator v5 Oscillators & momentumVolatility & bands Repaints
Updated 5 months ago · None stated GitHub repository of CSW MTF Sentiment Line
3 stars

This indicator overlays a dynamic trend ribbon or cloud on the price chart to visualize market direction and strength. It generates long and short signals based on selected strategy modes such as Default, Scalping, Intraday or Swing, using adjustable period, s

Indicator v5 TrendSMC / ICT / price action Repaints
Updated 12 months ago · None stated GitHub repository of Money Moves [Premium Algo V2]

Ichimoku Kinko Hyo

by TamTH-Dev
2 stars

Plots the classic Ichimoku Kinko Hyo system directly on the price chart. It calculates the Tenkan-Sen, Kijun-Sen, Senkou Span A, Senkou Span B, and Chikou Span based on midpoints of highest highs and lowest lows over user-defined lookback periods. The Kumo clo

Indicator v5 TrendSupport & resistance
Updated 6 weeks ago · None stated GitHub repository of Ichimoku Kinko Hyo

CTC BB Hedge Strategy

by wynnforthework
2 stars

CTC BB Hedge Strategy calculates the Pearson correlation coefficient between the close prices of two symbols to determine market alignment. It applies Bollinger Bands to the primary symbol for mean-reversion signals while optionally filtering with a moving ave

Strategy v5 Volatility & bandsMean reversion Repaints
Updated 1 year ago · None stated GitHub repository of CTC BB Hedge Strategy

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