Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 19)

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

This long-only strategy builds an AlphaTrend line from ATR bands that switches behaviour on MFI, or RSI when volume data is missing. A buy signal appears when the line crosses above its two-bar-delayed copy, and a sell signal on the opposite cross. It enters l

Strategy v5 TrendVolatility & bands
Updated 2 years ago · MPL-2.0 GitHub repository of Alpha Trend Strategy on TradingBoat

This strategy enters long when a 13-period EMA crosses above a 34-period EMA and short when it crosses below, and closes on the opposite cross. While in a trade, it places a stop loss and a take profit at fixed percentages of the average entry price, set separ

Strategy v5 Moving averagesTrend
Updated 2 years ago · None stated GitHub repository of EMA Crossover With Percentage Stop and Target
1 stars

This indicator draws several kernel regression lines on the price chart, using a kernel function library. Each of five lines has its own filter mode (No Filter, Smooth or Zero Lag), kernel type (Rational Quadratic, Gaussian, Periodic or Locally Periodic), look

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Kernel Regression Toolkit
1 stars

A price-chart overlay that builds supply, equilibrium and demand zones from the bars currently visible on the chart. It splits the visible price range into a configurable number of volume bins, using lower-timeframe intrabar data for volume, and draws boxes pl

Indicator v5 Support & resistanceVolume Repaints
Updated 2 years ago · None stated GitHub repository of Supply and Demand Visible Range

The Woverine - Buy Sell Indicators plots buy and sell labels on the price chart based on selected calculation sources like close, EMA, or SMA, combined with ADX for long or short strategies. Users can customize the strategy type, signal colors, label sizes, po

Indicator v5 TrendOscillators & momentum
Updated 3 years ago · MIT GitHub repository of Woverine - Buy Sell Indicators

ThangeVault

by govindthange
1 stars

A small Pine v5 library of helper functions for the author's Woodwind Playbook script. One function writes a text tag on the chart just above the recent ten-bar high, using a label. Another builds a number format string that limits displayed price precision to

Library v5
Updated 3 years ago · Custom licence GitHub repository of ThangeVault

Imbalance Strategy

by creatidy
1 stars

A stock strategy that combines a trend template with relative strength against a reference index. It builds smoothed moving averages scaled for daily or weekly charts, 52-week high and low, and an IBD-style relative strength measure against a reference symbol.

Strategy v5 TrendOscillators & momentum
Updated 3 years ago · GPL-3.0 GitHub repository of Imbalance Strategy

Mavezo

by arrabyte
1 stars

Strategy built on exponential moving averages and an optional volume zone oscillator filter. It plots fast, slow and 200-period trend EMAs on the price chart. Risk settings include an ATR based stop distance, a risk-to-reward ratio for the take profit, optiona

Strategy v5 TrendMoving averages
Updated 3 years ago · None stated GitHub repository of Mavezo

MPB

by sourdiesel1202
1 stars

A Pine library that exports a scoring function for price against two simple moving averages, with periods of 9 and 20. Depending on the candle colour and where the close sits relative to each average, it adds or subtracts weighted values and returns the total

Library v5
Updated 3 years ago · None stated GitHub repository of MPB

KC Integration

by Sikako
1 stars

KC Integration is a trading strategy that calculates multiple sets of Keltner Channels tailored for both trend-following and counter-trend conditions. It plots upper, middle, and lower channel bands directly on the main price chart to identify potential breako

Strategy v5 Volatility & bandsBreakout
Updated 3 years ago · None stated GitHub repository of KC Integration

Fluffy MACD Uptrend

by pvdochtend
1 stars

A long-only strategy that buys when the MACD histogram turns from negative to positive while the 50 EMA is above the 200 EMA and RSI sits between a lower and an upper limit. Its only exit is a percentage take-profit above the average entry price. No stop loss

Strategy v5 Oscillators & momentumTrend
Updated 3 years ago · GPL-3.0 GitHub repository of Fluffy MACD Uptrend

Gap Finder

by lesari08
1 stars

Gap Finder identifies and displays bullish and bearish liquidity gaps directly on the main price chart. The indicator calculates gap boundaries, equilibrium levels, and fill lines using either the current chart resolution or a specified higher timeframe. Users

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 3 years ago · None stated GitHub repository of Gap Finder

Aroon [RSI-Adjusted]

by JohnsonHsiao
1 stars

This indicator calculates the difference between traditional Aroon lines derived from price action and RSI-adjusted Aroon lines calculated from the Relative Strength Index. It measures both upper spread and lower spread values across a user-defined rolling per

Indicator v5 Oscillators & momentum
Updated 3 years ago · None stated GitHub repository of Aroon [RSI-Adjusted]
1 stars

A stock-oriented overlay that weighs the current price against fundamental data. The settings let the user pick factor groups such as earnings price, per-share book value, earnings, revenue and free cash flow, EBIT and EBITDA, profit margins, returns on assets

Indicator v5 Screeners & dashboards
Updated 4 years ago · None stated GitHub repository of Discounted Price Probability

EMA 50 100 150 200

by juliencrn
1 stars

This overlay indicator plots exponential moving averages of the close at 12, 26, 50, 100, 150 and 200 periods in different colors on the price chart. The 12 and 26 lines are the fast and slow averages used in MACD and are labeled that way in the plot names. Th

Indicator v5 TrendMoving averages Archived
Updated 4 years ago · None stated GitHub repository of EMA 50 100 150 200

Tobacco

by 0xfffangel
1 stars

An overlay that builds a Kaufman adaptive moving average of price as a center line and surrounds it with three bands above and below, scaled from an adaptive average of true range. The band length and the three deviation multipliers are adjustable, and the zon

Indicator v5 Volatility & bandsMean reversion
Updated 4 years ago · None stated GitHub repository of Tobacco

Supertrend v2 Strategy

by greenish7
1 stars

Strategy version of a Supertrend plus Stochastic RSI system. Supertrend direction comes from an ATR period and multiplier; long and short entries require the Stochastic RSI lines to be in low or high bands and close to each other while the trend agrees. Trades

Strategy v5 TrendOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Supertrend v2 Strategy

Barbwire v2.0.0

by itmakesyousick
1 stars

Finds barbwire zones, runs of bars with small bodies or ranges, and draws boxes around them on the price chart. The bar size source can be Heikin-Ashi open to close, high to low, a hybrid or open to close. Detection can use rank, stochastic or rate of change m

Indicator v5 Candlestick patternsVolatility & bands
Updated 4 years ago · None stated GitHub repository of Barbwire v2.0.0

1DTE

by tyler314
1 stars

1DTE is an overlay indicator designed for 1-day-to-expiration option trading analysis. It evaluates market conditions using Average True Range (ATR), consecutive green or red daily streaks, and CBOE Volatility Index (VIX) levels. Users can filter evaluation wi

Indicator v5 Volatility & bandsSessions & time
Updated 4 years ago · None stated GitHub repository of 1DTE

ATR Volatility Power

by hayashi19
1 stars

This indicator shows how far the 14-period ATR sits above its lowest value over the last 200 bars, smoothed with a 9-period average. It draws this value as columns in a separate pane, coloured lime when it rises and red when it falls. A second series, the lowe

Indicator v5 Volatility & bands
Updated 4 years ago · None stated GitHub repository of ATR Volatility Power

MJ Bull Support 1

by mehdijangjou
1 stars

This indicator plots the 20-period EMA in green and the 20-period SMA in red directly on the price chart. It fills the space between the two moving averages using a color that changes based on which line sits above the other. The script targets crypto assets a

Indicator v5 Moving averagesTrend Archived
Updated 4 years ago · MPL-2.0 GitHub repository of MJ Bull Support 1

Slimdicator

by tseitz
1 stars

Slimdicator is a TradingView indicator for cryptocurrency markets that plots multiple moving averages on the price chart including a fast EMA, a medium SMA, and a slow SMA. It calculates MACD and RSI values to generate buy and sell signals. The indicator alert

Indicator v5 Oscillators & momentumMoving averages
Updated 4 years ago · None stated GitHub repository of Slimdicator
330 stars

Double RSI is a momentum strategy that calculates RSI on the current bar and a multi-timeframe RSI. Long entries trigger on RSI crossover above 30 when multi-timeframe RSI is below 35. Short entries trigger on RSI crossover below 70 when multi-timeframe RSI is

Strategy v5 Oscillators & momentum
Updated 2 months ago · None stated GitHub repository of Double RSI [Alorse]

AIActivationFunctionsThreshold

by ricardosantos79
261 stars

This Pine Script v5 library implements a threshold activation function for neural-network style calculations. The exported function returns 1.0 when the input is greater than or equal to zero and 0.0 otherwise. Two derivative exports, derivate and derivate2, a

Library v5 AI / machine learning
Updated 4 years ago · None stated GitHub repository of AIActivationFunctionsThreshold

Candlestick Kicker Pattern

by harryguiacorn
220 stars

This indicator plots green circles below bars and red circles above bars on the price chart to signal Candlestick Kicker patterns. It identifies upward kickers when the prior bar is bearish with body percentage above the left threshold, the current bar is bull

Indicator v5 Candlestick patternsBreakout
Updated 1 year ago · None stated GitHub repository of Candlestick Kicker Pattern

Higher TF Closes

by agutinbaigo28
147 stars

This indicator fetches and overlays the 4-hour high and low price bounds for TRXUSDT onto the price chart. It draws prominent red and green lines representing the 4-hour high and low levels respectively, providing reference points for price action across lower

Indicator v5 Support & resistance Repaints
Updated 6 weeks ago · MIT GitHub repository of Higher TF Closes

JMA Clone

by capissimo
114 stars

This indicator implements an approximation of the Jurik Moving Average algorithm, featuring an adjustable power parameter. It overlays a smoothed curve and a one-bar lagged reference curve directly on the price chart. When the slope turns upward, a green circl

Indicator v5 Moving averagesTrend Repaints
Updated 1 year ago · None stated GitHub repository of JMA Clone

2xTP, SL to Entry

by hasnocool
106 stars

This strategy executes mean-reversion trades based on Bollinger Bands and the Stochastic Oscillator. Long orders trigger when price dips below the lower band alongside a bullish Stochastic crossover, with an optional oversold threshold. Short orders execute on

Strategy v5 Mean reversionOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of 2xTP, SL to Entry
104 stars

Candlestick Pattern Strategy 1 is a scalping strategy designed for short-term timeframes. It evaluates two-bar candlestick price action patterns to generate entry signals directly on the price chart. When a bullish or bearish setup is detected, the strategy ex

Strategy v5 Candlestick patternsScalping
Updated 3 years ago · MIT GitHub repository of Candlestick Pattern Strategy 1

Machine Learning: Lorentzian Classification

by artificial-intelligence-edge
75 stars

This indicator classifies the current bar by comparing its feature vector with historical bars using Lorentzian distance and a k-nearest-neighbors vote. Configurable features include RSI, WaveTrend, CCI, and ADX. Optional volatility, regime, ADX, and EMA filte

Indicator v5 AI / machine learningOscillators & momentum
Updated 4 days ago · MIT GitHub repository of Machine Learning: Lorentzian Classification

All alert() calls

by be-thomas
65 stars

This indicator calculates a 20-period RSI of the close and plots it in a separate pane with a horizontal line at 50. It marks an RSI cross above 50 with a small up triangle and a cross below 50 with a small down triangle. On those same crosses it calls alert w

Indicator v5 Oscillators & momentum
Updated 6 days ago · GPL-3.0 GitHub repository of All alert() calls

Higher TF BBands

by PythonForForex
64 stars

This indicator calculates Bollinger Bands from the close, using a chosen length and standard-deviation multiplier, then reads the middle, upper, and lower values from a user-selected timeframe. It plots those three bands on the price chart. The timeframe input

Indicator v5 Volatility & bands
Updated 4 years ago · None stated GitHub repository of Higher TF BBands

Nonsense

by frizLabz-FFriZz
59 stars

Nonsense is a mock Pine Script strategy script designed as a syntax testing script within a code editor extension repository. It defines custom type declarations, matrix and array object creations, and placeholder function logic using obfuscated variable names

Strategy v5 Repaints
Updated 1 year ago · MIT GitHub repository of Nonsense

EMA

by milocaetano
48 stars

This script calculates and plots an Exponential Moving Average (EMA) directly on the price chart. It uses Pine Script's built-in moving average calculation over a customizable period length and input price source, defaulting to a 9-period close price. The resu

Indicator v5 Moving averagesTrend
Updated 3 days ago · MIT GitHub repository of EMA
43 stars

This indicator measures how extreme current Average True Range is versus recent history. It calculates ATR, converts it to a percentile rank over a lookback window, and smooths that rank with an EMA. Both series plot in a separate pane, with a color gradient f

Indicator v5 Volatility & bands
Updated 1 year ago · None stated GitHub repository of ATR Percentile Rank

This strategy trades 1-minute futures contracts on Binance. It plots pivot high and low resistance and support levels on the price chart, along with an EMA and a custom Cto indicator. Long and short entries trigger on EMA and Cto crossovers combined with price

Strategy v5 TrendMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of Binancash Futures Strategy 1M Candles

FVG RSI Strategy (Translated)

by skywalker0803r
42 stars

This strategy overlays two exponential moving averages on the price chart to trade reversals using custom Fair Value Gaps and the Relative Strength Index. It enters long trades when price closes bullishly below both moving averages with an oversold RSI and a g

Strategy v5 SMC / ICT / price actionOscillators & momentum
Updated 2 months ago · None stated GitHub repository of FVG RSI Strategy (Translated)

Abandoned Baby - Bullish

by TWODS-CAPITAL
37 stars

This indicator identifies the Bullish Abandoned Baby candlestick pattern directly on the price chart. The three-bar reversal pattern consists of a strong down candle during an established downtrend, followed by a lower gapping doji candle, and completed by an

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Abandoned Baby - Bullish

Hedge Scalp - Open Profit/Loss

by nikita-doronin
30 stars

This indicator tracks and plots open profit and loss in a separate pane for a custom crypto hedge scalping strategy. It calculates an exponential moving average and establishes four long grid levels and one hedged short grid level at user-defined percentage di

Indicator v5 Moving averagesScalping
Updated 2 years ago · Custom licence GitHub repository of Hedge Scalp - Open Profit/Loss
29 stars

This indicator calculates the Amazing Oscillator using 5-period and 34-period simple moving averages of the median price, then applies an RSI-style relative strength formula over a configurable smoothing period. The resulting oscillator fluctuates between -50

Indicator v5 Oscillators & momentumMoving averages
Updated 11 months ago · Custom licence GitHub repository of Amazing Oscillator [Algoalpha]

Smart Money Concepts [LuxAlgo]

by GeneralTradingSarl
24 stars

Calculates and plots Smart Money Concepts elements directly on the price chart. It identifies internal and swing market structure shifts, including Break of Structure (BOS) and Change of Character (CHoCH). The indicator plots bullish and bearish order blocks,

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 12 days ago · Custom licence GitHub repository of Smart Money Concepts [LuxAlgo]

ADX/DMI Strategy

by benso87
24 stars

This strategy calculates ADX and plus and minus directional movement and adds a Bollinger Band Width Percentile filter. It tracks positive or negative DMI, rising or falling ADX, and an optional recent DMI flip within a set lookback. Settings change ADX length

Strategy v5 TrendOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of ADX/DMI Strategy
20 stars

This indicator implements John F. Ehlers adaptive stochastic and is declared for a separate pane. It high-pass filters the chosen source to keep shorter cycles, smooths that series with a super smoother, and measures Pearson correlation over lags from zero to

Indicator v5 Oscillators & momentum
Updated 1 year ago · None stated GitHub repository of Adaptive Stochastic - John F. Ehlers

This script plots Vegas Tunnel exponential moving averages directly onto the price chart. It calculates two pairs of EMAs: a fast tunnel using 144 and 169 periods displayed in green, and a slow filter tunnel using 576 and 676 periods displayed in red. Although

Strategy v5 Moving averagesTrend
Updated 3 weeks ago · Apache-2.0 GitHub repository of 第一个指标VeGa隧道交易策略

PHASE 404 v2

by Musyimi97
16 stars

PHASE 404 v2 is a Smart Money Concepts (SMC) indicator that plots structure directly on the main price chart. It identifies Buy Side Liquidity (BSL) and Sell Side Liquidity (SSL) levels, highlights Market Structure Shifts (MSS) after liquidity sweeps, and mark

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 6 months ago · MIT GitHub repository of PHASE 404 v2

P/E, P/BV, EPS

by msongkiet
16 stars

Calculates and plots key financial metrics including the Price-to-Earnings ratio, Price-to-Book Value ratio, and Earnings Per Share in a separate pane. The script retrieves financial data through standard financial requests based on customizable reporting peri

Indicator v5
Updated 2 years ago · None stated GitHub repository of P/E, P/BV, EPS

Scalping Level PRO

by stupenkov
14 stars

Scalping Level PRO identifies key local and global horizontal support and resistance levels across cryptocurrency price charts. It draws level lines based on customizable time periods, calculates Normalized Average True Range (NATR) for volatility assessment,

Indicator v5 Support & resistanceVolatility & bands
Updated 3 years ago · None stated GitHub repository of Scalping Level PRO

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