Pine Library · 1,047 open-source scripts

Free Stock Pine Scripts for TradingView (page 8)

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

1 stars

A strategy built around the first regular-session candle of the US day in New York time, together with rejection levels collected from wicks formed during pre-market and after-hours sessions. Rejection levels within a tolerance percentage are grouped. Options

Strategy v5 BreakoutSessions & time
Updated 11 months ago · Custom licence GitHub repository of Breakout Strategy - Step by Step
1 stars

This strategy uses 10, 50, and 200 period EMAs on the price chart to filter for bullish and bearish trend signals with a confirmation candle. It calculates position size based on a user-set risk percentage of equity divided by the distance to a stop price deri

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Reg T Margin Stock Strategy

algo-trade-indian

by akash-yellgetti
1 stars

A strategy-type script for the price chart that marks the high, low and midpoint of the first part of each session, set by start hour and minute inputs, with alerts for price crossing above the high or below the low. It also plots VWAP, pivot-based support and

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

4477 Tracker

by Allen1212
303 stars

4477 Tracker overlays historical buy and sell records from ARK Invest directly onto the price chart. The indicator hardcodes exact execution dates and trade instances, displaying green labels for purchases and red labels for sales below or above the price bars

Indicator v4
Updated 2 years ago · None stated GitHub repository of 4477 Tracker
257 stars

This strategy plots VWMA-based Bollinger bands on the 1-minute ES futures price chart for volatility analysis and potential breakout identification. It calculates dynamic long and short stop loss and take profit levels using percentage inputs relative to entry

Strategy v6 Volatility & bandsSupport & resistance
Updated 6 weeks ago · None stated GitHub repository of V1.6 ES - Futures 1M No Repaint

RS指標

by TaichiS
219 stars

This indicator calculates and displays the relative strength of an asset compared to a benchmark index. It plots the 21-bar percentage return of the current chart symbol alongside the daily return of the TWSE TAIEX index in a separate pane. A zero baseline mar

Indicator v4 Oscillators & momentum
Updated 5 years ago · None stated GitHub repository of RS指標

Price of Apple

by PythonForForex
64 stars

This simple educational indicator requests and plots the daily closing price of Apple Inc. (AAPL) in a separate pane on the chart. It demonstrates the use of Pine Script security functions to pull data from an external symbol regardless of the current chart sy

Indicator v5
Updated 4 years ago · None stated GitHub repository of Price of Apple

IB / ORB Live Stats

by TamaraKGreen
46 stars

This overlay indicator marks the New York initial balance and a configurable opening range on the price chart and reports live range statistics in two tables. It builds an IB box for a default 09:30–10:30 ET window, an ORB box from 09:30 for a set number of mi

Indicator v6 Sessions & timeBreakout
Updated 7 weeks ago · None stated GitHub repository of IB / ORB Live Stats

LoD Intraday Entry

by ChartsLector
41 stars

This overlay indicator marks the current day's low and a suggested entry zone a fraction of daily ATR below that low. It compares daily volume with a volume moving average, plots daily SMA and EMA distance, and draws an optional ATR-width price cloud. Labels c

Indicator v6 Support & resistanceVolatility & bands
Updated 3 days ago · None stated GitHub repository of LoD Intraday Entry

Advance Decline Ratio

by TWODS-CAPITAL
37 stars

This indicator calculates and plots the ratio of advancing stocks to declining stocks on the New York Stock Exchange. It requests close prices from the USI:ADVN.NY and USI:DECL.NY ticker symbols using the security function and divides advances by declines. The

Indicator v5 Oscillators & momentum
Updated 3 years ago · MIT GitHub repository of Advance Decline Ratio

Bandz Session Ranges + ORG + Opening Prices plots trading session ranges, killzones, opening RTH gaps, standard deviation projections, and key opening prices directly on the price chart. It calculates gap ranges based on prior regular trading hours close sourc

Indicator v6 Sessions & timeSupport & resistance
Updated 2 weeks ago · MPL-2.0 GitHub repository of Bandz Session Ranges + ORG + Opening Prices
16 stars

This Pine Script implements a trend-following strategy inspired by John Seykota's methods. It enters positions on Donchian channel breakouts using a longer lookback period of 55 bars and exits on shorter 10-bar signals. Volatility gating prevents adding to pos

Strategy v6 TrendMoving averages
Updated 12 months ago · None stated GitHub repository of Seykota Alt 13: Vol-Gated Adds

Market Monitor 5m

by chris-c-thomas
14 stars

Market Monitor 5m is an intraday context overlay designed for 5-minute chart analysis. It calculates directional bias using exponential moving averages, VWAP, TTM Squeeze volatility state, NYSE TICK market breadth, and ATR volatility regimes. The script plots

Indicator v6 Screeners & dashboardsSupport & resistance Repaints
Updated 6 months ago · MIT GitHub repository of Market Monitor 5m

Swing Strategy

by JoelPasapera
11 stars

This strategy executes trades based on specific days of the week. It opens a long position when the current day matches the primary day input and closes the position whenever the chart moves to a day other than the secondary day input. Settings allow traders t

Strategy v6 Sessions & time
Updated 5 months ago · Apache-2.0 GitHub repository of Swing Strategy

TR KAP Marker

by Enesp4rl4k
7 stars

This indicator overlays labels on a BIST equity price chart at bars whose time window contains a material KAP disclosure. Event times, titles, and categories come from a static snapshot written into parallel arrays when the recipe is generated, not from a live

Indicator v6
Updated 6 days ago · MIT GitHub repository of TR KAP Marker
6 stars

Capital41 Confluence Core plots an EMA or SMA on the price chart and combines its direction with RSI, Williams %R, and a liquidity-sweep check into long and short confluence signals. Signal strictness is Strict, Standard, or Loose, which changes how far the os

Indicator v6 Oscillators & momentumMoving averages
Updated 8 weeks ago · MIT GitHub repository of Capital41 Confluence Core
4 stars

Meridian Options Levels plots clustered reaction zones on the price chart for liquid options underlyings. It groups nearby candidate levels using confirmed daily ATR distance and tick or percent tolerances, then sizes each zone between minimum and maximum ATR

Indicator v6 Support & resistanceSessions & time
Updated 7 weeks ago · MPL-2.0 GitHub repository of Meridian - Options Levels
4 stars

This long-only strategy identifies mean-reversion dip opportunities within established uptrends on daily charts. It opens a position when price is trading above a simple moving average and the Relative Strength Index (RSI) crosses back above a specified overso

Strategy v6 Mean reversionOscillators & momentum
Updated 5 months ago · None stated GitHub repository of RSI Mean Reversion (Long Only)
3 stars

This indicator calculates the Commodity Channel Index from a user-selected source and length and plots it in a separate pane. Dashed lines mark plus 100 and minus 100, a middle line sits at zero, and the area between the outer bands is filled. A smoothing line

Indicator v5 Oscillators & momentumScreeners & dashboards
Updated yesterday · None stated GitHub repository of Commodity Channel Index

Ultimate Trading System

by EngineeredSuccess
3 stars

The Ultimate Trading System is an integrated indicator that combines multiple analysis methodologies—including Pi Cycle Top, SPX/Gold ratio, Elliott Wave, and multi-source market signals—into a composite oscillator scored from 0 to 100. Plotted in a separate p

Indicator v6 Screeners & dashboardsOscillators & momentum
Updated 1 year ago · Custom licence GitHub repository of Ultimate Trading System
2 stars

This intraday strategy is designed for 5-minute ETF trading, specifically tailored for leveraged assets like TQQQ. It evaluates simple moving average alignment across three lengths and calculates consecutive rising or falling bars over a lookback window to ide

Strategy v6 TrendMoving averages
Updated 8 days ago · None stated GitHub repository of TQQQ MA Accumulation v3-5m

IBD Power Trend

by major
2 stars

This indicator tracks Investor's Business Daily style Power Trend rules and setup conditions in a separate pane. It evaluates whether price lows hold above an exponential moving average, verifies that the fast EMA remains above a rising simple moving average,

Indicator v6 TrendMoving averages
Updated 3 months ago · Apache-2.0 GitHub repository of IBD Power Trend
2 stars

Calculates the divergence between global money supply growth and benchmark equity performance to highlight potential market turning points. It aggregates M2 money supply metrics across major economies—including the US, China, Eurozone, Japan, UK, Canada, and S

Indicator v6 DivergenceScreeners & dashboards
Updated 8 months ago · None stated GitHub repository of Central Bank Liquidity Gap Indicator
2 stars

This indicator overlays a volatility filter on the price chart. It loads CBOE VIX and VIX3M closes, divides VIX by VIX3M, and smooths that ratio with a five-bar simple moving average. A breakout is marked allowed only when the smoothed ratio is below 0.98 and

Indicator v5 Volatility & bandsBreakout
Updated 10 months ago · MIT GitHub repository of Harter VIX Curve Breakout Filter

The Industry Indices Comparison - SWE indicator displays a performance dashboard table directly on the price chart to evaluate relative sector strength. It tracks up to eleven Swedish industry sector indices against a selected benchmark index. The indicator ca

Indicator v6 Screeners & dashboards
Updated 1 year ago · MPL-2.0 GitHub repository of Industry Indices Comparison - SWE
2 stars

This indicator tracks and plots market breadth data for major stock market indices such as the S&P 500, Nasdaq, Dow Jones, and Russell indices in a separate pane. It fetches external market breadth metrics showing the percentage of stocks trading above various

Indicator v5 Moving averages
Updated 1 year ago · None stated GitHub repository of 市场宽度 - Market Breadth

Breakout Strategy

by Web3Degenerate
2 stars

This strategy detects price breakouts beyond the high or low of a higher timeframe (default Daily) on an intraday chart. When the close crosses above the higher-timeframe high or below its low, it enters long or short, limiting execution to one breakout per di

Strategy v5 BreakoutSupport & resistance
Updated 2 years ago · None stated GitHub repository of Breakout Strategy
2 stars

The MarketSmith Indicator enhances price action visualization by applying custom candle coloring and overlaying configurable moving averages on the main chart. Bar colors can be based either on the bar open relative to close or on the price relative to the pre

Indicator v5 Moving averagesTrend
Updated 2 years ago · MIT GitHub repository of MarketSmith Indicator

AlgoBot Strategy

by femibol
1 stars

A strategy that approximates a trading bot's entry and exit rules in three modes: EMA 8 and 21 momentum with ADX and a volume surge, relative-volume momentum, and a daily SuperTrend trend rider using a daily EMA, ADX and consecutive green days. Exits include a

Strategy v5 Oscillators & momentumTrend
Updated 6 weeks ago · None stated GitHub repository of AlgoBot Strategy

DMS v2 Breadth Dispersion

by AssetWhisper
1 stars

An indicator in a separate pane that compares a cap-weighted index with its equal-weighted counterpart, SPY and RSP by default, to gauge market breadth. It takes the log ratio of the two, then adds its momentum, a z-score, a percentile rank, divergences agains

Indicator v5 DivergenceScreeners & dashboards
Updated 7 weeks ago · MPL-2.0 GitHub repository of DMS v2 Breadth Dispersion
1 stars

This indicator measures how far the current low sits below the highest high of the last 252 bars, expressed in 50-period ATR units and plotted as a negative value capped at 12. It draws that distance in a separate pane and colors the line green, yellow, or red

Indicator v6 Volatility & bandsSupport & resistance
Updated 2 months ago · MPL-2.0 GitHub repository of Webby's ATR Off 52-Week High

Regime Trend Rider

by jayadevrana
1 stars

This long-only trend strategy trades only while price is above a 200-period SMA that is also rising. It enters when price crosses back above a 20-period EMA after a pullback within that uptrend, and exits on an ATR-based chandelier trailing stop that ratchets

Strategy v6 TrendMoving averages
Updated 2 months ago · Custom licence GitHub repository of Regime Trend Rider

GEKO Ultimate - UO Williams Baseline

by grzegorzkowalskigk-jpg
1 stars

This strategy applies Larry Williams' Ultimate Oscillator rules, blending 7, 14 and 28 period buying pressure, and draws in a separate pane. A long entry needs the oscillator below 30, a bullish price divergence and a break above the oscillator peak from that

Strategy v6 Oscillators & momentumDivergence
Updated 3 months ago · Custom licence GitHub repository of GEKO Ultimate - UO Williams Baseline

MRM Scanner

by majohnst
1 stars

The MRM Scanner is a multi-symbol technical analysis tool that scans a user-defined watchlist of up to 20 stock symbols. It calculates a cloud from 144 and 169 EMAs along with Fibonacci retracement levels based on swing highs and lows over a configurable lookb

Indicator v6 Screeners & dashboardsMoving averages
Updated 4 months ago · None stated GitHub repository of MRM Scanner
1 stars

This overlay indicator is a companion dashboard for Bursa Malaysia stocks. It builds a table that shows Minervini trend-template conditions, VCP squeeze tightness, volume surge and contraction, price and average-volume liquidity filters, and an MCDX banker or

Indicator v6 TrendVolatility & bands
Updated 4 months ago · None stated GitHub repository of Minervini VCP Dashboard v8 KLSE
1 stars

MACD Divergence - Reversal Hunter detects regular and hidden divergences between price action and the MACD line using pivot points. It generates buy signals on bullish divergences and sell signals on bearish divergences, with optional RSI filter for overbought

Strategy v5 DivergenceOscillators & momentum
Updated 7 months ago · None stated GitHub repository of MACD Divergence - Reversal Hunter

P/E BANDs

by lumduan
1 stars

An indicator in a separate pane that divides price by trailing twelve month diluted earnings per share to get a price to earnings series, then wraps it in Bollinger-style bands. The basis can be an SMA, EMA, SMMA, WMA or VWMA of the chosen length, with upper a

Indicator v6 Volatility & bandsMean reversion
Updated 1 year ago · None stated GitHub repository of P/E BANDs

Sector AD

by nvFede
1 stars

A Pine v4 indicator in a separate pane that works as a sector advance-decline count. It pulls closing prices for eleven US sector ETFs (materials, communications, energy, financials, industrials, technology, staples, real estate, utilities, health care and dis

Indicator v4 Screeners & dashboards
Updated 3 years ago · None stated GitHub repository of Sector AD

This indicator scans a pasted list of symbols for RSI directional momentum and shows matching long and short signals in a table in a separate pane. The user chooses continuous break, continuous retracement, flip break, flip retracement, divergence, or hidden d

Indicator v6 Oscillators & momentumDivergence
Updated 1 year ago · MPL-2.0 GitHub repository of Momentum Setup - RSI Directional Momentum Scanner
318 stars

This indicator plots four customizable moving averages directly on the main price chart using default lengths of 3, 8, 21, and 50 periods. It fills the space between adjacent averages in green or maroon depending on trend alignment. Additionally, it computes B

Indicator v5 Moving averagesTrend
Updated 2 months ago · MIT GitHub repository of Multiple Moving Averages

4689-tracker

by Allen1212
303 stars

4689-tracker is a visual overlay indicator that plots historical buy and sell transactions executed by ARK Invest funds for a specific asset. It generates hardcoded green buy labels below bars and red sell labels above bars at exact historical timestamps corre

Indicator v4
Updated 2 years ago · None stated GitHub repository of 4689-tracker
46 stars

The IB/ORB Statistical Mapper plots Initial Balance (IB) and Opening Range Breakout (ORB) ranges for 5-minute, 15-minute, and 60-minute windows relative to the New York session open. It renders colored boxes, midpoints, and open lines directly on the price cha

Indicator v6 Sessions & timeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of IB/ORB Statistical Mapper (hardcoded)

Pocket Scout - SPY/QQQ

by chris-c-thomas
14 stars

Pocket Scout - SPY/QQQ is a mobile-optimized intraday bias indicator designed for major US equity ETFs and indices. It overlays a 9/21/50 EMA ribbon, session VWAP, prior day high/low/close levels, and intraday high/low lines directly on the main price chart. T

Indicator v6 TrendOscillators & momentum Repaints
Updated 6 months ago · MIT GitHub repository of Pocket Scout - SPY/QQQ

Time and schedule

by JoelPasapera
11 stars

This strategy opens a long or short position on a chosen weekday when the chart hour falls inside a user-defined start and end window. With the buy toggle on, it enters long near the window start and short near the window end; turning the toggle off reverses t

Strategy v6 Sessions & time Repaints
Updated 5 months ago · Apache-2.0 GitHub repository of Time and schedule

Test Swing Screener

by TPCharts
10 stars

This script functions as a multi-symbol swing screener calculating the Relative Strength Index across up to 40 user-selected stock tickers using security calls. It evaluates whether each symbol's RSI exceeds a specified overbought threshold level. Inputs allow

Strategy v4 Screeners & dashboardsOscillators & momentum
Updated 5 years ago · GPL-3.0 GitHub repository of Test Swing Screener
4 stars

This long-only strategy overlays a slow simple moving average and Bollinger bands on the price chart and uses RSI as a filter. It enters when the close is at or below the lower band and RSI is at or below the oversold input, and it closes when the close is at

Strategy v6 Mean reversionVolatility & bands
Updated 5 months ago · None stated GitHub repository of Tetrad Elektro BB (Long Only)

Darvas Box AL SAT

by gocaman
3 stars

Calculates Darvas Box upper and lower channel boundaries based on configurable period length to identify trend breakouts. It plots top and bottom box levels directly on the price chart and plots buy (AL) and sell (SAT) signal labels when price crosses outside

Indicator v5 Support & resistanceBreakout
Updated yesterday · None stated GitHub repository of Darvas Box AL SAT

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