Pine Library · 1,047 open-source scripts

Free Stock Pine Scripts for TradingView (page 4)

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

Momentum Rider DAILY FINAL

by greenpeas007
58 stars

This strategy combines exponential moving averages (EMA 9, 21, 50), RSI, MACD, and Supertrend indicators to enter long positions. It triggers trades using six dynamic setups based on momentum breakouts, EMA crossovers, and pullbacks. Position sizing is compute

Strategy v6 TrendOscillators & momentum Repaints
Updated 4 months ago · Custom licence GitHub repository of Momentum Rider DAILY FINAL

Pine Script v6 Test Features

by tradesdontlie
33 stars

This indicator demonstrates several Pine Script v6 language features on the price chart. It requests the daily close for a fixed list of stock symbols and writes those prices to the log. On the last bar it draws labels using exact point sizes and bold or itali

Indicator v6
Updated 8 days ago · MIT GitHub repository of Pine Script v6 Test Features
23 stars

The Stocks - Inside Day Strategy identifies inside day candlestick patterns on the main price chart. It enters a long position when a bar's high is below the previous high and its low is above the previous low. The strategy exits positions when a short-period

Strategy v6 Candlestick patternsOscillators & momentum
Updated 3 months ago · Custom licence GitHub repository of Stocks - Inside Day Strategy

This indicator scans a pasted list of symbols, up to the first forty, and shows long and short momentum setups in a configurable table in a separate pane. It compares RSI with an SMA of RSI using Break Flip or Break Continuous scanning. Optional filters cover

Indicator v5 Oscillators & momentumScreeners & dashboards
Updated 1 year ago · None stated GitHub repository of Momentum Setup: RSI Direction Confirmation Scanner

ORB Pro - Research-Based ORB

by Mrshahidali420
16 stars

The ORB Pro indicator calculates and plots Opening Range Breakout levels, stop-loss and take-profit zones, signal labels, and an status dashboard on the price chart. Built on academic research, it evaluates trades using an opening-candle direction filter, open

Indicator v6 BreakoutSessions & time Repaints
Updated 3 months ago · None stated GitHub repository of ORB Pro - Research-Based ORB

Equity Intraday Analyst

by chris-c-thomas
14 stars

Equity Intraday Analyst is a comprehensive intraday overlay indicator for US equities and ETFs. It evaluates multi-EMA ribbons, session-anchored VWAP bands, OBV trends, momentum oscillators, TTM Squeeze, and optional market breadth indicators like NYSE TICK an

Indicator v6 TrendVolume
Updated 6 months ago · MIT GitHub repository of Equity Intraday Analyst
11 stars

This indicator plots a smoothed Z-score of cumulative volume delta in a separate pane, showing whether buying or selling pressure is dominant and when the reading enters extreme zones. It marks spot accumulation, climax or exhaustion, and pivot-based price-vol

Indicator v6 Oscillators & momentumVolume Repaints
Updated 7 weeks ago · MIT GitHub repository of CVD Z-Score [NeuNue]

Quant

by hirawatt
11 stars

Quant is a Pine Script utility library providing custom functions for quantitative analysis. It includes an exported function to calculate the percentage change between consecutive values of any float series. Additionally, it offers a function to calculate mar

Library v5
Updated 2 years ago · MIT GitHub repository of Quant
10 stars

This indicator tracks macro market cycle phases by evaluating moving average interactions and a modified Mayer Multiple threshold. It monitors crossovers between a double 350-period simple moving average and a 111-period SMA for cycle-out conditions, alongside

Indicator v4 Moving averagesTrend
Updated 5 years ago · None stated GitHub repository of cycleOutToCycleInProgression

5000x Breakout Scanner

by jmragsdale
8 stars

This indicator marks momentum breakouts on the price chart. A signal appears only when the bar makes a new high over the lookback, volume is at least a chosen multiple of the 20-bar average, the percentage change from the prior close meets a minimum, the close

Indicator v5 BreakoutVolume
Updated 7 weeks ago · None stated GitHub repository of 5000x Breakout Scanner
8 stars

This strategy calculates a StockCharts Technical Rank metric alongside an O'Neil-style relative strength rating, plotting both curves in a separate pane. It evaluates long-term, medium-term, and short-term exponential moving average deviations, rate-of-change

Strategy v5 Oscillators & momentumMoving averages
Updated 4 years ago · None stated GitHub repository of SCTR & ONeil + RSI strategy

Input metadata

by pineforge-4pass
6 stars

This strategy declares many input types and plots a simple moving average of the chosen source in a separate pane. Length sets the average period and source selects the price series. Other inputs cover a numeric threshold, an enable flag, a long or short side,

Strategy v6 Moving averages
Updated yesterday · Custom licence GitHub repository of Input metadata

C41 Key Calendar

by damianpitt
6 stars

Identifies and highlights recurring key market calendar dates directly on the price chart. It plots visual lines and labels for month, quarter, and year opens and closes, as well as monthly and quarterly options expiration (OPEX), OPEX week starts, earnings se

Indicator v6 Sessions & time
Updated 8 weeks ago · MIT GitHub repository of C41 Key Calendar
6 stars

MarketMerge Data Panel is a Pine Script indicator that overlays a customizable data panel on price charts to display company fundamentals. It shows ratings including composite, RS, EPS, SMR, Acc/Dis, P/E, ROE and Minervini trend template checks. The panel pres

Indicator v6 Screeners & dashboardsMoving averages
Updated 8 months ago · MIT GitHub repository of MarketMerge Data Panel

DCA Long Nonstop

by Jaden300
4 stars

DCA Long Nonstop runs a perpetual dollar-cost averaging ladder on any ticker. It opens a base order at market entry then adds safety orders when price drops soStep percent below the base price, with each subsequent safety order sized larger by 5 percent. When

Strategy v6 Mean reversion
Updated 5 months ago · None stated GitHub repository of DCA Long Nonstop
4 stars

This strategy draws on the price chart and is set up for daily ETF trading. It can enter through a classic surge-and-consolidation breakout, a pullback toward stacked EMAs, a relative-volume spike with price momentum, or a pause inside a strong trend. EMA leng

Strategy v6 BreakoutTrend
Updated 7 months ago · None stated GitHub repository of Qullamaggie Breakout Strategy

AT+T3

by gocaman
3 stars

AT+T3 is a TradingView Pine Script indicator that overlays the T3 moving average (with Fibonacci variant) and AlphaTrend on price charts for BIST stocks. T3 uses Tim Tillson's smoothing formula with adjustable length and volume factor to produce trend lines th

Indicator v5 TrendVolatility & bands Repaints
Updated yesterday · None stated GitHub repository of AT+T3

This strategy plots Fibonacci retracement levels from a rolling high-low range and trades long only on the price chart. It enters when price is above the first Fibonacci level, volume exceeds its moving average, and price is above a simple moving average. It c

Strategy v5 TrendVolatility & bands
Updated 1 year ago · MIT GitHub repository of Volume + Fibonacci + Trend + ATR Strategy with 1% TP
3 stars

This strategy combines five selectable mean-reversion and swing trading sub-strategies into a unified system. It generates entry signals based on conditions like Internal Bar Strength drops, consecutive lower closes into Tuesday, multi-day channel breakdowns,

Strategy v5 Mean reversionTrend
Updated 2 years ago · MIT GitHub repository of Mean Reversal Portfolio
3 stars

Calculates an Investor's Business Daily (IBD) style Relative Strength (RS) rating and plots an RS line directly on the price chart. It evaluates price performance against a comparative benchmark index (defaulting to NSE:NIFTY). Optional visual markers highligh

Indicator v5 Oscillators & momentumBreakout
Updated 2 years ago · None stated GitHub repository of RS Rating for Indian Market
3 stars

This strategy looks for long entries when the MACD line exceeds its signal line by a set amount and volume rises by a chosen percentage. It places one buy limit either a set number of pips or a percentage below the previous close. Exits start with a percentage

Strategy v4 Oscillators & momentumVolume
Updated 4 years ago · None stated GitHub repository of Dutch Bros Strategy

Trade History Labels

by kaiku0125
2 stars

Plots historical trade records as visual buy and sell labels directly on the price chart. It matches recorded trade dates and symbols against the active instrument, calculating cumulative volume-weighted average buy and sell prices with horizontal reference li

Indicator v6 Support & resistance
Updated 3 days ago · None stated GitHub repository of Trade History Labels

Equity Trading Strategy

by AmjadSaidam
2 stars

This indicator draws a daily-anchored volume-weighted average price on the price chart and marks the first long or short reclaim of that level. A long needs a bar below the average whose high reaches it, a later close above it, and confirmation after at least

Indicator v6 VolumeSupport & resistance Repaints
Updated 5 weeks ago · MIT GitHub repository of Equity Trading Strategy
2 stars

Swing Trade Analyzer - S&R Levels identifies key support and resistance levels directly on the price chart using pivot high and low points. It filters duplicate price levels and offers optional multi-timeframe confluence analysis against higher timeframes like

Indicator v6 Support & resistanceTrend
Updated 5 weeks ago · None stated GitHub repository of Swing Trade Analyzer - S&R Levels

This indicator plots gamma exposure levels, multi-timeframe breakout structure, and trading session ranges directly on the price chart. It parses input strings containing option metrics to display key levels such as Zero Gamma, Max Pain, Expected Move boundari

Indicator v6 Support & resistanceBreakout
Updated 6 weeks ago · MIT GitHub repository of GEX Levels + Breakout Structure + Session AVWAP — NQ/NDX/QQQ

API Integration Examples

by danielbodnar
2 stars

This indicator demonstrates Pine Script data requests and draws them on the price chart. It plots a four-hour simple moving average plus the daily high and low as step lines, and it plots twenty-bar relative performance versus SPY. It also requests QQQ, VIX, v

Indicator v6 Moving averagesSupport & resistance Repaints
Updated 2 months ago · MIT GitHub repository of API Integration Examples

Kell + Minervini VCP

by mirkothepirko
2 stars

This price-chart indicator combines Oliver Kell moving-average phases with Minervini volatility contraction. It plots EMA 10, 20, 50 and 200 and can require the SMA 50, 150 and 200 trend template. It flags a wedge pop above EMA 10 after an EMA 20 cross, pullba

Indicator v6 TrendMoving averages
Updated 3 months ago · Custom licence GitHub repository of Kell + Minervini VCP
2 stars

Calculates 20-day Average Daily Range percentage, multi-month performance metrics, opening gap size, and relative volume to identify Kristjan Kullamägi style Breakout and Episodic Pivot setups. When conditions are satisfied on the price chart, it flags candles

Indicator v6 BreakoutVolume
Updated 4 months ago · Custom licence GitHub repository of Qullamaggie Breakout / EP Flags

ORB Breakout Alert

by az9713
2 stars

The indicator identifies upside breakouts from the 30-minute US market opening range between 09:30 and 10:00 AM ET. It triggers a signal when price closes above the opening range high before 11:30 AM ET, provided bar volume exceeds a multiplier of the opening

Indicator v5 BreakoutSessions & time
Updated 5 months ago · None stated GitHub repository of ORB Breakout Alert
2 stars

This overlay indicator maps a US equity day-trading framework of levels, trend, and patience candles onto the price chart. It plots 8 and 21 SMAs, higher-timeframe 200 SMAs, VWAP, the last five days of premarket highs and lows, and the 9:30–9:45 opening range.

Indicator v6 TrendMoving averages Repaints
Updated 6 months ago · None stated GitHub repository of Day Trading Strategy v2

This strategy enters long positions on volume-backed breakout setups with moving average confirmation. It plots the 10, 50, 150, and 200 simple moving averages directly on the price chart. Users can select between three breakout modes: gap only, strict gap wit

Strategy v6 BreakoutMoving averages
Updated 10 months ago · MIT GitHub repository of Ede - Breakout Strategie (mit MA und ATR Exit)

Calculates a long-term Exponential Moving Average as a baseline for fair value alongside a Relative Strength Index. Generates long entry signals when the close price trades at least five percent below the moving average while the RSI is oversold. Exits trades

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · MIT GitHub repository of Buffett-Inspired Value Strategy

ADR label

by etnt
2 stars

This indicator calculates and displays the Average Daily Range percentage alongside a Mark Minervini Trend Template score in an on-screen table. It evaluates moving average alignments, 52-week price extremes, and moving average slope criteria to generate a Tre

Indicator v6 Screeners & dashboardsTrend
Updated 1 year ago · MPL-2.0 GitHub repository of ADR label

PerformanceTable

by jvalen01
2 stars

PerformanceTable displays a compact dashboard table on the main chart summarizing key stock metrics. It calculates the 20-day Average Daily Range (ADR), an IBD-style Relative Strength (RS) rating, 10-day average trading volume, quarterly earnings and revenue e

Indicator v5 Screeners & dashboards
Updated 3 years ago · None stated GitHub repository of PerformanceTable

Mini-Project

by Core-Four
2 stars

Mini-Project is a multi-indicator trading strategy that overlays technical indicators directly on the price chart. It provides modular components including Linear Regression, the Relative Strength Index (RSI), MACD, Parabolic SAR, and Supertrend. Users can tog

Strategy v5 TrendOscillators & momentum
Updated 3 years ago · None stated GitHub repository of Mini-Project

Initial Balance

by MuMuLLC
2 stars

The Initial Balance indicator highlights high, low, and 50% midpoint levels calculated over a defined session timeframe, such as the opening hour. It draws primary initial balance bounds, optional extended x2 projection levels, intermediate 50% levels, and sha

Indicator v5 Support & resistanceSessions & time
Updated 3 years ago · MIT GitHub repository of Initial Balance
1 stars

A research strategy for the price chart, meant for a five-minute chart with Moscow time. It measures the price move between two time points of the same day, and if the move exceeds a threshold it opens a position at the end of the second slot, either with the

Strategy v6 Sessions & timeMean reversion
Updated yesterday · None stated GitHub repository of Session Triples - 5 Stocks

RSI 30 Turbo Swing

by vriken
1 stars

A long-only strategy that buys stocks after the daily 14-period RSI closes below an oversold level, optionally only above the 200-day average and in a bullish market regime based on an index and VIX. Trades close after a set number of days or earlier when the

Strategy v6 Mean reversionOscillators & momentum Repaints
Updated yesterday · None stated GitHub repository of RSI 30 Turbo Swing

Dip Mafia HODL

by 0xCaretaker
1 stars

A long-only strategy that buys dips and never sells during the test. A buy needs a lower Bollinger Band touch, by default with a close below the midline, plus a MACD or Impulse MACD crossover. Position size is a percent of equity or a fixed cash amount per buy

Strategy v6 Mean reversionOscillators & momentum
Updated 2 days ago · None stated GitHub repository of Dip Mafia HODL

Donchian Breakout

by quantxaashish
1 stars

Donchian Breakout identifies potential momentum shifts based on Donchian channel extremes. It calculates highest highs and lowest lows across a user-defined lookback period. A bullish signal triggers when the current high matches or exceeds the channel high an

Indicator v5 BreakoutTrend
Updated 13 days ago · MIT GitHub repository of Donchian Breakout
1 stars

A long-only strategy for the price chart that pairs a lower timeframe with a higher one, selected by a volatility mode: 10 and 45 minutes, 15 and 75 minutes, or 30 and 120 minutes. It buys when price crosses above the 20 EMA with RSI above 52 while price is ab

Strategy v5 TrendOscillators & momentum
Updated 2 weeks ago · None stated GitHub repository of TV Adaptive MTF Strategy

Cumulative Volume Index

by AkashSasikumar47
1 stars

A Pine v6 indicator in a separate pane that plots a running total of advancing volume minus declining volume for a chosen US exchange. The exchange can be NYSE, NASDAQ, AMEX, ARCX, US total or Dow Jones. It reads the exchange up-volume and down-volume symbols

Indicator v6 Volume
Updated 2 weeks ago · MIT GitHub repository of Cumulative Volume Index

FVG Screener TW

by gplee789-afk
1 stars

This indicator scans up to 40 symbols across a user-defined timeframe to identify Smart Money Concepts Fair Value Gaps, Inversion FVGs, displacement bars, and internal order blocks. It calculates a weighted quality score for each gap, monitors price proximity,

Indicator v6 SMC / ICT / price actionScreeners & dashboards
Updated 3 weeks ago · MPL-2.0 GitHub repository of FVG Screener TW

Kernal Cipher 1

by kdricha0602
1 stars

A large price-chart overlay that combines many filters into tagged signal markers. It uses a 21, 50 and 200 EMA stack with slope, a higher-timeframe reference, Supertrend, ADX regime, WaveTrend, StochRSI, regular and hidden divergence, relative strength agains

Indicator v6 TrendOscillators & momentum
Updated 5 weeks ago · MIT GitHub repository of Kernal Cipher 1
1 stars

A second version of an index-oriented strategy that uses TRAMA adaptive moving averages with short and long lengths, a hold percentage and a hedge percentage. It can add an RSI slope filter on a chosen timeframe and an optional Turtle-style mode that adds to p

Strategy v6 TrendMoving averages
Updated 8 weeks ago · MIT GitHub repository of Hedge Fund Manager 2 SIGIL

TTP VIX Spy

by AubakirovArman
1 stars

Pulls the VIX and builds a MACD histogram from it, then uses that with a SuperTrend, a band width test, price and RSI slope checks and an optional working-days filter to print B1, B2, S1 and S2 labels on the price chart. The SuperTrend fill is coloured by the

Indicator v5 TrendOscillators & momentum
Updated 3 months ago · MIT GitHub repository of TTP VIX Spy
1 stars

A separate-pane indicator that builds a 0 to 100 score from price momentum, nudged by the prior move of a chosen US index and pulled toward 50 in high-volatility regimes. Background colours mark calm, elevated or panic volatility, found by comparing recent vol

Indicator v5 Volatility & bandsOscillators & momentum
Updated 3 months ago · MIT GitHub repository of SPE Regime & Prob Proxy

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