Pine Library · 1,047 open-source scripts

Free Stock Pine Scripts for TradingView (page 13)

Open-source Pine scripts written for shares: relative strength, earnings and gap tools, screeners and stock strategies.

Pine scripts1,047
Code shown here408open licence
Updated in a year564
No repaint flag963

Stocks: Indicators, Strategies and Libraries

9 stars

This indicator plots a heuristic volume-balance oscillator in a separate pane. It estimates signed volume from the close location inside each bar, multiplies that by volume, and sums the proxy over a rolling window. The sum is scaled between minus one and plus

Indicator v6 VolumeOscillators & momentum
Updated 3 days ago · MIT GitHub repository of CVD Bias [WavesUnchained]
6 stars

The Capital41 Structure Swings v3 indicator tracks market structure on the main price chart using pivot detection. It identifies swing highs and swing lows based on a user-defined pivot length, plotting labels and horizontal dotted level lines at active swing

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 2 months ago · MIT GitHub repository of Capital41 Structure Swings v3
1 stars

V10 Swing Sniper (KLSE) is a daily chart overlay indicator designed for swing trading Bursa Malaysia equities based on Mark Minervini's Stage 2 and Volatility Contraction Pattern (VCP) principles. It calculates exponential moving averages, relative strength ag

Indicator v5 TrendBreakout
Updated 4 months ago · None stated GitHub repository of V10 Swing Sniper (KLSE)

Inside Bar Breakout

by Basant1Saini
1 stars

Inside Bar Breakout identifies standard and double inside bar candlestick patterns to trade breakout momentum. It sets trigger levels using reference bar extremes plus an adjustable percentage buffer. Once a pattern forms, the strategy waits up to five bars fo

Strategy v5 Candlestick patternsBreakout
Updated 8 months ago · None stated GitHub repository of Inside Bar Breakout

AIR-tracker

by Allen1212
303 stars

AIR-tracker is an overlay indicator that plots historical buy and sell transactions executed by ARK Invest for the corresponding stock on the price chart. It draws green labels below bars for buy events and red labels above bars for sell events based on hardco

Indicator v4
Updated 2 years ago · None stated GitHub repository of AIR-tracker
16 stars

This trend-following strategy plots Donchian channels and execution signals directly on the price chart. It calculates Average True Range volatility to determine position sizing based on a fixed risk percentage of account equity. Long and short entries trigger

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 27: Asymmetric R/R

Volatility Risk Premium

by eddiebelaval
7 stars

Calculates the Volatility Risk Premium (VRP) by comparing implied volatility against realized volatility calculated using Close-to-Close, Parkinson, or Garman-Klass methods. It plots VRP values as a histogram or line in a separate pane with optional Bollinger

Indicator v6 Volatility & bands
Updated 3 months ago · None stated GitHub repository of Volatility Risk Premium
6 stars

Capital41 Williams Flow Simple calculates current and higher-timeframe Williams %R values alongside a volume filter to identify trend regimes and momentum entries. It defines bullish, bearish, or chop market regimes using the higher-timeframe Williams %R. Entr

Indicator v6 TrendOscillators & momentum
Updated 2 months ago · MIT GitHub repository of Capital41 Williams Flow Simple v2
3 stars

This indicator plots the Parabolic SAR on the price chart and identifies trend reversals with buy and sell labels. It features multi-symbol screening capability, allowing traders to monitor predefined symbol groups or custom BIST stock lists on a selectable ti

Indicator v5 TrendScreeners & dashboards
Updated 2 days ago · None stated GitHub repository of Parabolic SAR Tarama

The Stock and NQ Futures Convergence Strategy identifies trading opportunities by comparing the Relative Strength Index of the active chart stock against NQ futures. It enters a long position when NQ RSI rises above the upper threshold while the stock RSI stay

Strategy v5 Oscillators & momentumDivergence
Updated 2 years ago · GPL-3.0 GitHub repository of Stock and NQ Futures Convergence Strategy

V11 Swing Sniper Pro

by kevinesk
1 stars

V11 Swing Sniper Pro is a trend-following and swing timing indicator tailored for equity markets such as the KLSE. It overlays key moving averages directly on the price chart and evaluates setups across three structured tiers: trend quality based on Minervini

Indicator v5 TrendOscillators & momentum
Updated 4 months ago · None stated GitHub repository of V11 Swing Sniper Pro

NR7 Range Breakout

by Basant1Saini
1 stars

NR7 Range Breakout identifies narrowest range bars over a specified lookback period and trades breakouts beyond their high or low price boundaries. It plots an exponential moving average trend filter alongside visual highlights for range compression and breako

Strategy v5 BreakoutVolatility & bands
Updated 8 months ago · None stated GitHub repository of NR7 Range Breakout

This overlay indicator plots a Supertrend from an ATR length and factor, four exponential moving averages, and a selectable VWAP or TWAP taken from a chosen timeframe on the price chart. It also shows MACD and stochastic with adjustable lengths, smoothing, ver

Indicator v5 Oscillators & momentumMoving averages
Updated 1 year ago · MPL-2.0 GitHub repository of Momentum Setup: Vijay Thakare Option Buying Scalping Setup

AKE Tracker

by Allen1212
303 stars

AKE Tracker overlays historical ARK Invest buying and selling activity directly onto the price chart for the target stock. It plots labels indicating buy or sell events alongside the count of ARK ETFs participating on specific dates. Users can filter trade rec

Indicator v4 Screeners & dashboards
Updated 2 years ago · None stated GitHub repository of AKE Tracker

LeMan Trend Indicator

by capissimo
114 stars

LeMan Trend Indicator calculates buy and sell values using normalized differences between current and highest/lowest highs and lows over adjustable lookback periods. It plots a zero line signal in a separate pane and normalized buy and sell lines in colors. Ma

Indicator v4 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of LeMan Trend Indicator
16 stars

Implements a Donchian breakout trend-following strategy filtered by ADX trend strength. It initiates long or short positions when price breaks Donchian channel extremes and ADX exceeds a specified threshold. Positions are sized using ATR volatility with Turtle

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 28: ADX Filter
3 stars

This indicator calculates and visualizes seasonal performance metrics in a separate pane. It queries higher-timeframe monthly closes to compute the average return of the current calendar month across a user-defined lookback window, alongside the year-to-date a

Indicator v5 Moving averages Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Stocks Seasonality Gauge

JAT+BSM Pro v13

by majixai
1 stars

A strategy that combines an AlphaTrend style volatility core with a MACD condition, higher-timeframe background, three consolidation layers with volume profile buckets, candlestick and macro pattern labels, and a forecast with Bayesian lookback. Cross-asset sy

Strategy v5 TrendOscillators & momentum
Updated 2 days ago · None stated GitHub repository of JAT+BSM Pro v13

V12 Swing Sniper Pro

by kevinesk
1 stars

V12 Swing Sniper Pro is a swing trading indicator for Bursa Malaysia stocks. It layers macro and sector filters atop Minervini-style trend quality gates and RSI checks to validate bullish setups. The script fires buy signals when coiling, pullback proximity, b

Indicator v5 TrendMoving averages
Updated 4 months ago · None stated GitHub repository of V12 Swing Sniper Pro

This indicator scans NSE-listed stocks for momentum signals using Supertrend, multiple EMAs, MACD, and stochastic oscillator. It supports continuous or flip signal modes and displays matching setups in a customizable table at the bottom left of the chart. The

Indicator v5 Oscillators & momentumMoving averages
Updated 1 year ago · MPL-2.0 GitHub repository of Momentum Setup: Vijay Thakare Option Buying Scalping Setup Scanner

ALGN-tracker

by Allen1212
303 stars

This indicator plots historical buy and sell transactions made by ARK Invest for Align Technology (ALGN) directly on the price chart. It uses labels positioned above or below specific bar timestamps to show institutional trade activity, including transaction d

Indicator v4
Updated 2 years ago · None stated GitHub repository of ALGN-tracker

Index Member Distribution

by TradersPost
228 stars

Calculates and plots a weighted histogram of constituent returns for major market indices (NDX, SPX, DJIA, and RUT) in a separate pane. Each histogram bin reflects the summed weights of members within that percentage return bracket. The script renders vertical

Indicator v6 Screeners & dashboards
Updated 3 months ago · None stated GitHub repository of Index Member Distribution

Session backgrounds

by be-thomas
65 stars

This indicator paints the price-chart background according to three fixed clock sessions. Bars from 04:00 to 09:30 use the pre-market color, 09:30 to 16:00 use the regular-session color, and 16:00 to 20:00 use the post-market color. Three color inputs change t

Indicator v5 Sessions & time
Updated 6 days ago · GPL-3.0 GitHub repository of Session backgrounds

This strategy implements a multi-stage trend following system inspired by John W. Seykota. It generates long and short entries when price breaks above or below Donchian channels of specified length. Each entry adds a unit sized to risk a fixed percentage of cu

Strategy v6 TrendVolatility & bands
Updated 12 months ago · None stated GitHub repository of Seykota Alt 29: Multi-Stage Scaling

REG-TREND

by gocaman
3 stars

The REG-TREND indicator plots linear regression trend lines calculated from the selected source over a user-defined length. It determines channel boundaries and deviation to detect trend breaks, marking them with dotted lines in the chosen color. Fibonacci ret

Indicator v5 TrendSupport & resistance
Updated 2 days ago · None stated GitHub repository of REG-TREND
1 stars

This multi-model strategy combines kinematic price modeling, Bayesian inference forecasts, volume profile consolidation zones, and automated pattern recognition directly on the price chart. It evaluates market trajectory using weighted kinematic regression, un

Strategy v5 AI / machine learningSupport & resistance
Updated 2 days ago · None stated GitHub repository of JAT+BSM Pro v13 Extended

This intraday strategy fades tests of the previous day high and low during the New York morning session. It identifies mean-reversion opportunities when price touches within a few ticks of the prior day high or low, closes back inside, confirms with above-aver

Strategy v6 Mean reversionSupport & resistance
Updated 2 months ago · None stated GitHub repository of TeleNexus Sovereign PDH/PDL Fade V6

Stochastic RSI Crossover

by Basant1Saini
1 stars

This strategy calculates Stochastic RSI crossovers occurring in extreme overbought or oversold zones, filtered by an optional Exponential Moving Average trend filter. Long positions enter when the %K line crosses above %D from below the oversold threshold whil

Strategy v5 Oscillators & momentumTrend
Updated 8 months ago · None stated GitHub repository of Stochastic RSI Crossover

ALLO Tracker

by Allen1212
303 stars

ALLO Tracker visualizes historical buy and sell transactions made by ARK Invest funds directly on the main price chart. The indicator uses hardcoded historical trade data and timestamps to plot green buy labels below bars and red sell labels above bars. Users

Indicator v4 Screeners & dashboards
Updated 2 years ago · None stated GitHub repository of ALLO Tracker

Magnificent 7 Oscillator

by regalouisei
2 stars

Calculates smoothed momentum across the primary Magnificent 7 mega-cap tech stocks (AAPL, MSFT, GOOGL, AMZN, NVDA, TSLA, META) and optional additional tickers. It aggregates their performance either through equal weighting or market comparison modes against be

Indicator v6 Oscillators & momentumScreeners & dashboards
Updated 8 months ago · None stated GitHub repository of Magnificent 7 Oscillator

Volume Spike Reversal

by Basant1Saini
1 stars

The Volume Spike Reversal strategy identifies potential price reversals driven by high volume activity. It triggers long entries when a volume spike occurs while price is below a 20-period simple moving average, combined with oversold RSI readings and bullish

Strategy v5 VolumeOscillators & momentum
Updated 8 months ago · None stated GitHub repository of Volume Spike Reversal

This indicator scans a pasted list of symbols and shows matching long and short setups in a table in a separate pane. It uses a Supertrend crossover, then applies an ATR or fixed-point volatility range so quiet, sideways conditions can be skipped. Optional fil

Indicator v5 TrendVolatility & bands
Updated 1 year ago · MPL-2.0 GitHub repository of Trend Following Setup - Sideways Market Skipper Scanner

ALLT Tracker

by Allen1212
303 stars

ALLT Tracker is an overlay indicator that plots historical buying and selling transactions from ARK Invest directly onto the price chart. It uses color-coded labels placed relative to price bars to display trade actions and the count of participating ETFs on s

Indicator v4
Updated 2 years ago · None stated GitHub repository of ALLT Tracker
16 stars

This strategy enters long or short when a fast exponential moving average crosses a slow one, then sizes each unit from a percentage of equity and an ATR-based initial stop. It can add positions as price moves by a multiple of ATR, up to a set unit limit, and

Strategy v6 TrendMoving averages
Updated 12 months ago · None stated GitHub repository of Seykota Alt 2: EMA Crossover
1 stars

An extended version of the JAT+BSM strategy that adds a strategy preset, a risk aggression choice and a pattern type filter to the AlphaTrend style core, MACD, consolidation layers, volume profile and candlestick and macro pattern drawings. Forecasts use kinem

Strategy v5 TrendOscillators & momentum
Updated 2 days ago · None stated GitHub repository of JAT+BSM Pro v13 Extended
1 stars

This mean-reversion strategy implements Larry Connors' 2-period RSI system. It enters long positions when price trades above a long-term simple moving average (default 200) and the 2-period RSI drops below 10. Optional short positions enter below the trend ave

Strategy v6 Mean reversionOscillators & momentum
Updated 4 days ago · MPL-2.0 GitHub repository of RSI-2 (Larry Connors) [JR]

V9 Watchlist Ranker

by kevinesk
1 stars

Evaluates intraday trading rules across ten ticker symbols simultaneously using multi-symbol data requests. It monitors 5-minute volume surges, price breakout pivots, moving average positioning, and session time filters customized for Bursa Malaysia trading ho

Indicator v5 Screeners & dashboardsScalping
Updated 4 months ago · None stated GitHub repository of V9 Watchlist Ranker

ALMDG Tracker

by Allen1212
303 stars

ALMDG Tracker visualizes historical buy and sell transactions executed by ARK Invest funds for the ALMDG ticker directly on the main price chart. It plots visual labels at specific trade dates, indicating transaction types and the count of participating ARK ET

Indicator v4
Updated 2 years ago · None stated GitHub repository of ALMDG Tracker
114 stars

This indicator implements a binary logistic regression classification model retrained on each bar using gradient descent optimization. It processes normalized price features through a sigmoid activation function to classify market direction and generate direct

Indicator v4 AI / machine learningTrend Repaints
Updated 1 year ago · None stated GitHub repository of Machine Learning: Logistic Regression
55 stars

This indicator plots horizontal support and resistance from confirmed pivot lows and pivot highs, using ten bars on each side. When a new pivot appears, it replaces the previous line and extends it ten bars beyond the current bar. A translucent gray fill marks

Indicator v5 Support & resistanceVolume
Updated 6 months ago · Apache-2.0 GitHub repository of AAPL Structural Lines & Fills
16 stars

This strategy enters long or short on Donchian channel breakouts and adds units only while RSI remains beyond its momentum thresholds. Size is based on a percentage of equity per unit, up to a set maximum. An ATR initial stop and a chandelier trail manage open

Strategy v6 TrendOscillators & momentum
Updated 12 months ago · None stated GitHub repository of Seykota Alt 30: Momentum Pyramid

Exhaustion Scanner is an overlay indicator that measures overextension and reversal risk by evaluating price stretch, momentum exhaustion, and candle triggers. It combines distance from moving averages and Bollinger Bands with momentum oscillators, divergence

Indicator v6 Oscillators & momentumVolatility & bands
Updated 3 days ago · MIT GitHub repository of Exhaustion Scanner [WavesUnchained]
7 stars

The 7M Multi-Factor Momentum Scoreboard evaluates real-time market momentum across multiple criteria and displays the results in an overlay dashboard panel on the price chart. It tracks anchored percentage price moves based on pre-market, regular open, or post

Indicator v6 Oscillators & momentumVolume
Updated 3 months ago · None stated GitHub repository of 7M Multi-Factor Momentum Scoreboard
1 stars

An extended strategy version that adds a strategy preset, a risk aggression choice and a pattern type filter to an AlphaTrend style core with MACD. It includes three consolidation layers with volume profile, candlestick and macro pattern drawings, a kinematic

Strategy v5 TrendOscillators & momentum
Updated 2 days ago · None stated GitHub repository of JAT+BSM Pro v13 Extended
1 stars

VCP Volume Contraction is an indicator designed to identify Volatility Contraction Pattern setups by measuring both volume and price volatility tightness. It calculates a volume ratio by comparing current volume against its moving average, alongside an ATR-bas

Indicator v5 Volatility & bandsVolume
Updated 4 months ago · None stated GitHub repository of VCP Volume Contraction

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