Pine Library · 1,047 open-source scripts

Free Stock Pine Scripts for TradingView (page 3)

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

Maher Hero Saudi Alerts

by maherhato1986
1 stars

A chart-overlay indicator that scores each bar out of 100 using trend versus the 20 EMA, MACD, RSI range, volume ratio, an early breakout or retest of the prior 20-bar high, distance to the next resistance and an ATR-based stop distance. Hard rejections cap th

Indicator v6 BreakoutOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Maher Hero Saudi Alerts

PineFlow v6 — ORB Risk Strategy

by loveyuanfandj-glitch
1 stars

PineFlow v6 — ORB Risk Strategy executes opening range breakout trades filtered by trend and momentum indicators. It defines an initial opening range and trades breakouts during the active trading session when aligned with fast and slow EMAs, ADX momentum, and

Strategy v6 BreakoutSessions & time
Updated 3 months ago · MIT GitHub repository of PineFlow v6 — ORB Risk Strategy

SPE Cone Bands

by SeraKah-1
1 stars

An overlay indicator that draws a fan-shaped band projecting forward from the last bar. It uses the rolling mean and standard deviation of log returns to extend a median line and upper and lower lines by a chosen number of bars, scaled by a z-value input. It i

Indicator v5 Volatility & bands Repaints
Updated 3 months ago · MIT GitHub repository of SPE Cone Bands

EMA Crossover Strategy

by jaichaturvedi88
1 stars

A simple long-only strategy written for an Indian rupee account. It buys when the close is above a short EMA, default 9, and closes the position when the high falls below a longer EMA, default 26. Order size is a fixed rupee amount divided by price, and tradin

Strategy v6 Moving averagesTrend
Updated 3 months ago · None stated GitHub repository of EMA Crossover Strategy

Elephant Bars

by FranklyBrandon
1 stars

A price chart overlay that flags unusually large candles, called elephant bars, when the candle body is at least a set multiple of the average body over a lookback, 1.5 times and 100 bars by default. It also marks small retracement bars that follow an elephant

Indicator v5 Candlestick patternsMoving averages
Updated 3 months ago · None stated GitHub repository of Elephant Bars

Pocket Pivot Volume

by mervinj3546
1 stars

A Pine v6 indicator for daily charts that marks pocket pivot days with a blue circle below the bar. A pocket pivot is an up-day whose volume is higher than the highest down-day volume in the previous lookback bars. Optional filters require the close to be abov

Indicator v6 Volume
Updated 3 months ago · None stated GitHub repository of Pocket Pivot Volume
1 stars

A comprehensive fundamental analysis dashboard overlay tailored for the Indonesian Stock Market (IDX). It evaluates stocks across up to seven dimensions: Value, Quality, Growth, Health, Income, Momentum, and an optional Indonesia macro factor. The script autom

Indicator v6 Screeners & dashboards
Updated 3 months ago · MIT GitHub repository of Saham: Papan Instrumen
1 stars

Papan Gerak is a multi-dimension technical analysis dashboard aimed at Indonesian stocks. This base module declares the indicator in a separate pane and stores the display and calculation settings used by the dashboard. It covers table position, font size, com

Indicator v6 Screeners & dashboardsTrend
Updated 3 months ago · MIT GitHub repository of Saham: Papan Gerak By. Akhmfz
1 stars

The ATR Breakout Channel strategy detects breakouts by comparing the current close price to the high or low of the previous 20 bars, forming a channel. Entries occur when the price breaks through the channel in the trend direction of a 200-period EMA if the tr

Strategy v6 BreakoutTrend
Updated 3 months ago · MIT GitHub repository of ATR Breakout Channel [QuantForge]

Research Alpha Subset

by woodstock-tokyo
1 stars

A Pine v6 indicator in a separate pane that plots seven research formulas, each as its own line. They combine drawdown from a recent high with relative volume, inverted short RSI values, a panic-sell reversal term, a five-bar return minus a share of the twenty

Indicator v6 Oscillators & momentumMean reversion
Updated 3 months ago · None stated GitHub repository of Research Alpha Subset
1 stars

BottleRocket Pivot Breakout is an intraday trading strategy designed to capture breakout moves above daily pivot levels. It derives floor trader pivots and ATR values from prior-day session data to avoid lookahead bias. Entries are filtered using a minimum sto

Strategy v6 BreakoutSupport & resistance Repaints
Updated 4 months ago · None stated GitHub repository of BottleRocket Pivot Breakout

LSC Pattern

by mrdungx2603
1 stars

LSC Pattern is an on-chart indicator designed to detect three-bar price reversal patterns known as LSC Low and LSC High. An LSC Low bullish pattern occurs when the second bar forms a local trough relative to its adjacent bars and the third bar closes above the

Indicator v6 Candlestick patterns
Updated 4 months ago · None stated GitHub repository of LSC Pattern

BB(10,2) + TP20 SameDay

by zraesdev-hub
1 stars

This strategy draws Bollinger Bands on the price chart and enters long when both the open and the close are below the lower band. Mode S1 exits the same day at a 20 percent take profit or forces a close if that target is missed. Mode S2 can hold for a set numb

Strategy v5 Volatility & bandsMean reversion
Updated 4 months ago · None stated GitHub repository of BB(10,2) + TP20 SameDay
1 stars

Plots volume as coloured columns in a separate pane with a 20-bar volume average and threshold lines for high volume and climax volume. Bars are shaded by direction and by how large volume is relative to the average. Optional volume spread analysis labels mark

Indicator v6 Volume
Updated 4 months ago · None stated GitHub repository of Volume Distribution Analyzer

BWC Mean Reversion v5

by tonimaxx
1 stars

A long-only strategy for stocks that buys when a very short RSI is below a threshold, the close is under the lower Bollinger Band, price is above a 200-period SMA, the opening gap down is small and average dollar volume clears a floor. It closes the position w

Strategy v5 Mean reversion
Updated 5 months ago · Custom licence GitHub repository of BWC Mean Reversion v5
1 stars

This Pine Script indicator computes a Confluence Score from 0 to 100 by aggregating seven breakout identification strategies based on VCP trend template, TTM squeeze, volume analysis, relative strength, MA setup, RSI momentum and price near resistance. It plot

Indicator v6 TrendOscillators & momentum
Updated 6 months ago · None stated GitHub repository of Breakout Confluence Scanner

Market Fear Gauge Pro

by wiktorjl
1 stars

A separate-pane sentiment oscillator that blends several fear and greed components into one composite score: VIX, market breadth, put/call ratio, safe-haven flows, momentum, price strength, junk bonds and an optional crypto component. Scores are shown as z-sco

Indicator v5 Oscillators & momentumScreeners & dashboards
Updated 7 months ago · None stated GitHub repository of Market Fear Gauge Pro
1 stars

This indicator screens daily price charts to identify potential parabolic snapback short and washout bounce long setups. It calculates price extension using moving averages, percentage gain lookbacks, and optional Bollinger Bands filters. Long signals require

Indicator v6 Mean reversionVolume
Updated 7 months ago · None stated GitHub repository of Parabolic Snapback & Washout
1 stars

This indicator plots a McClellan-style market breadth oscillator in a separate pane. It measures the gap between a fast and a slow exponential moving average of net advancing versus declining issues for NYSE or NASDAQ, or for custom tickers. A ratio-adjusted m

Indicator v6 Oscillators & momentum
Updated 7 months ago · None stated GitHub repository of Asymmetric McClellan Oscillator

This strategy detects low-volatility consolidation by identifying when Bollinger Bands contract inside Keltner Channels. When the squeeze releases, it evaluates linear regression momentum and optional volume spikes to confirm breakouts. Long signals occur on r

Strategy v5 Volatility & bandsBreakout
Updated 7 months ago · None stated GitHub repository of Bollinger Band Squeeze - Volatility Breakout
1 stars

A long-only strategy generated from the TrendLab research project, drawn on the price chart. It tracks the highest high over a 115-bar lookback. It buys when the close is at or above 70 percent of that high and sells when the close falls below 52 percent of it

Strategy v6 TrendBreakout
Updated 9 months ago · MIT GitHub repository of 52-Week High 115/70/52

Dual Momentum

by nxtaiapp
1 stars

An overlay indicator based on the global equity momentum approach of comparing assets over a monthly lookback. It requests monthly closes for a US equity ETF, an international equity ETF and a bond ETF, and compares their returns over a set number of months, 1

Indicator v5 Oscillators & momentumScreeners & dashboards
Updated 9 months ago · None stated GitHub repository of Dual Momentum

Dynamic DCA Equities/Gold

by LucasRibeiroCaetano
1 stars

A Pine v5 indicator that works on any chart by reading the S&P 500 to gold ratio on the weekly timeframe. It compares the ratio to its 200-week simple moving average and sets a regime only after 30 consecutive weekly closes on one side. Above the average it ti

Indicator v5 Screeners & dashboardsMean reversion
Updated 9 months ago · None stated GitHub repository of Dynamic DCA Equities/Gold
1 stars

This mean-reversion strategy identifies deep price drops following a multi-bar low, such as a 52-week low. It calculates a target threshold located a specified percentage below the period low and triggers a buy entry when price plunges to this oversold level.

Strategy v6 Mean reversionSupport & resistance
Updated 9 months ago · MIT GitHub repository of Super Oversold (52 Week Low Version)

MTF Checklist Dashboard

by eliasvictor-trading
1 stars

An overlay indicator that shows a colour-coded table of market conditions across six timeframes, 1, 5, 15, 30, 60 and 240 minutes by default, including opening range breakout status and distance from the daily high and low. It prints arrow signals when enough

Indicator v6 Screeners & dashboardsSessions & time
Updated 11 months ago · None stated GitHub repository of MTF Checklist Dashboard

Normalises USD/TWD, TSMC, the 0050 ETF, the dollar index and the SOXX semiconductor ETF against their own moving averages and plots them together. It then measures rolling correlations of USD/TWD with the dollar index, SOXX and TSMC, and labels whichever has t

Indicator v5 Screeners & dashboards
Updated 11 months ago · MIT GitHub repository of TWD Triple-Layer Driver Detector

SamK Indicator

by samkling
1 stars

A Pine v5 overlay that combines several chart aids for stock trading. It plots selectable moving averages on all timeframes, optional daily moving averages pulled from the daily series, 50, 100 and 200 SMAs, and pivots. Further switches add average daily range

Indicator v5 Moving averagesSupport & resistance Repaints
Updated 1 year ago · None stated GitHub repository of SamK Indicator

Cuan Bungkus

by mamuncloud
1 stars

A long-only strategy for stocks that buys when the close is above a 5-period EMA, the short EMA is above a 20-period EMA, and volume exceeds a multiple of its 20-bar average. Position size is a set percent of initial capital. After entry it places a fixed perc

Strategy v6 Moving averagesVolume
Updated 1 year ago · None stated GitHub repository of Cuan Bungkus

MR First Entry Backtester

by gaurav4ever
1 stars

A strategy for 5-minute charts that builds a morning range of either five or fifteen minutes after the market open and takes the first breakout entry, with an entry buffer in ticks. An optional trend filter buys only above and sells only below the 50 EMA, and

Strategy v5 BreakoutSessions & time
Updated 1 year ago · None stated GitHub repository of MR First Entry Backtester

CCE ORB

by ylohnitram
1 stars

Marks the opening range of the US stock session on the price chart. The range starts at 9:30 New York time and lasts a set number of minutes, 15 by default, with optional extension levels projected from it. A setting limits the display to the morning or to the

Indicator v5 Sessions & timeBreakout
Updated 1 year ago · None stated GitHub repository of CCE ORB
1 stars

An overlay indicator that marks price breaks confirmed by a volume surge. A break is when price moves past the recent high or low by a set percentage, direction selectable, on volume above its average. Optional confirmations are a retest, RSI and MACD momentum

Indicator v6 BreakoutVolume Archived
Updated 1 year ago · MIT GitHub repository of High Volume Momentum Strategy
1 stars

Dynamic Anchored VWAP calculates a volume-weighted average price starting from a selected dynamic or manual anchor point, such as the chart start, daily start, weekly start, monthly start, or a specific timestamp. It calculates and plots the anchored VWAP alon

Indicator v6 VolumeSupport & resistance
Updated 1 year ago · GPL-3.0 GitHub repository of Dynamic Anchored VWAP

AAPL Best Position

by theteelek
1 stars

A long-only strategy that accumulates a fixed quantity by buying near the lower edge of a smoothed channel. The channel is an EMA of the highest high and lowest low over an adjustable range. A buy fires when price touches the lower line while RSI is rising out

Strategy v6 Mean reversion
Updated 1 year ago · None stated GitHub repository of AAPL Best Position

TICK.US Status Box

by BrayFlex
1 stars

TICK.US Status Box is an overlay indicator that reads the NYSE TICK index (TICK.US) on the chart's timeframe and shows its value in a small box. The box text reads very low, normal, high or very high depending on three adjustable level inputs, and the box colo

Indicator v6 Screeners & dashboardsOscillators & momentum
Updated 1 year ago · MPL-2.0 GitHub repository of TICK.US Status Box

Shows a table on the price chart with swing trading data such as average daily range percent, relative volume, price volume, shares float, market cap and average dollar volume. Settings choose which rows appear, the table position and size, text colour, alignm

Indicator v6 Screeners & dashboardsVolume
Updated 1 year ago · None stated GitHub repository of Swing Data ADR RVol PVol Float Avg Dollar Volume
1 stars

This indicator requests quarterly financial statement data for the current symbol and shows it in a table at the bottom right of the price chart. It groups readings under growth sustainability and solvency, including return on invested capital, reinvestment ra

Indicator v5 Screeners & dashboards
Updated 2 years ago · None stated GitHub repository of Table of Fundamental Data & Ratios

ROE / PER

by parksb
1 stars

This indicator retrieves fundamental financial metrics and calculates valuation ratios for equity analysis in a separate pane. It fetches return on equity, earnings per share, and book value per share to compute price-to-earnings, price-to-book, and the ratio

Indicator v5
Updated 3 years ago · None stated GitHub repository of ROE / PER

YIGITBOX PHL2

by hassonya
1 stars

An overlay that draws two sets of pivot levels from the previous day's range: a classic pivot with first resistance and support, and a close-based pivot with levels half a range above and below. The range comes from daily data, or weekly or monthly on higher c

Indicator v5 Support & resistanceSessions & time
Updated 3 years ago · None stated GitHub repository of YIGITBOX PHL2

Databox

by rosskevin
1 stars

Databox is an overlay indicator that fetches and displays fundamental financial data directly on the main price chart. It retrieves key corporate metrics such as book value per share, cash and equivalents, total shares outstanding, stock buyback yield, and qua

Indicator v4 Screeners & dashboards
Updated 5 years ago · AGPL-3.0 GitHub repository of Databox
575 stars

This indicator scans multiple stock symbols for ICT Displacement Candles. It detects strong price moves characterized by long candles and minimal wicks that exceed a minimum bar count and a set deviation percentage from average range. Signals for bullish and b

Indicator v6 Screeners & dashboardsSMC / ICT / price action
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Displacement Candles Scanner

This indicator identifies and plots key options expiration dates on the price chart. It calculates monthly OpEx (the third Friday of each month), quarterly OpEx (March, June, September, December), and corresponding VIX expiration dates, drawing vertical lines

Indicator v6 Sessions & time
Updated 2 months ago · MIT GitHub repository of Expiration Highlights: Opex, Quarterly Opex & VIX with Vanna/Charm

2618-Tracker

by Allen1212
303 stars

This overlay indicator marks historical ARK Invest purchases and sales of ticker 2618 on the price chart. When the ETF input is ALL, it places green Buy labels below bars and red Sell labels above bars on fixed calendar dates, with an X1 mark for the recorded

Indicator v4
Updated 2 years ago · None stated GitHub repository of 2618-Tracker

200DMA last DOM - ajh

by hasnocool
106 stars

This strategy executes a long-only trend-following system based on a simple moving average, designed primarily for daily charts. It plots the moving average directly on the price chart and evaluates trading signals strictly on a user-defined day of the month,

Strategy v5 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of 200DMA last DOM - ajh

Get 20 SMA of Apple

by PythonForForex
64 stars

This indicator requests Apple's daily closing price and calculates a 20-period simple moving average of that series. It plots the moving average on the price chart as an overlay. There are no user inputs, so the symbol, daily timeframe, and length stay fixed i

Indicator v5 Moving averages
Updated 4 years ago · None stated GitHub repository of Get 20 SMA of Apple

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