Pine Library · 1,047 open-source scripts

Free Stock Pine Scripts for TradingView (page 2)

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

This trend-following strategy calculates asymmetric Bollinger Bands and overlays them on the price chart alongside a central moving average. It enters long positions when the price crosses above the upper band, provided an optional benchmark trend filter (chec

Strategy v5 TrendVolatility & bands
Updated 2 years ago · MIT GitHub repository of Bollinger Band Trend Follow Strategy
3 stars

Advanced Option Price Estimator applies the Black-Scholes model to estimate call and put option prices directly on the main price chart. It uses standard normal distribution functions and Newton-Raphson iterations to calculate implied volatility across calcula

Indicator v5 Volatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Advanced Option Price Estimator

This overlay indicator draws MarketSmith-style price bars and several moving averages on the chart. Bar color follows the current close versus the open, or versus the previous close when that option is enabled. Four daily averages and four weekly averages can

Indicator v5 Moving averagesOscillators & momentum
Updated 2 years ago · None stated GitHub repository of MarketSmith Indicator Indian Market
3 stars

This Pine Script strategy plots a G-Channel and a 200-period Exponential Moving Average (EMA) directly on the price chart. It triggers buy signals when price crosses the lower G-Channel line while trading below the EMA line. Long positions are managed using Av

Strategy v4 TrendMoving averages
Updated 2 years ago · Apache-2.0 GitHub repository of G-Channel & EMA Strategy with ATR SL/TP

STA S&R v2

by balacloud
2 stars

This indicator plots support and resistance levels on the price chart based on pivot detection. It identifies potential reversal points by finding local highs and lows with specified strength. For each level, it counts how many times price has touched or appro

Indicator v6 Support & resistance
Updated 5 weeks ago · None stated GitHub repository of STA S&R v2
2 stars

ATR% Multiple from MA measures price extension relative to a moving average, expressed in multiples of Average True Range percentage. It calculates ATR as a percentage of close, evaluates the percentage distance between the price and its moving average, and no

Indicator v6 Moving averagesVolatility & bands
Updated 3 months ago · Apache-2.0 GitHub repository of ATR% Multiple from MA

HTF / Power Play Levels

by mirkothepirko
2 stars

This indicator detects High Tight Flag (HTF) and Power Play chart patterns on the price chart. It measures pole gain, flag consolidation duration, and depth, while checking for volume dry-up and moving average trend alignment. When a pattern qualifies, it plot

Indicator v6 BreakoutSupport & resistance
Updated 3 months ago · Custom licence GitHub repository of HTF / Power Play Levels
2 stars

This indicator analyzes volume character and market structure in a separate chart pane. It color-codes volume bars to identify institutional accumulation, distribution, climax volume, and volume dry-up conditions during volatility contraction patterns. The scr

Indicator v5 VolumeTrend
Updated 4 months ago · None stated GitHub repository of TJ Essentials - Daily Swing
2 stars

The Day Trading Strategy v1 indicator displays key intraday technical levels and signal markers on the main price chart. It plots standard 8 and 21 SMAs, multi-timeframe 200 SMAs (5m, 10m, 1h), session VWAP, pre-market high/low levels, and the initial 9:30–9:4

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

MTF Signal Strategy

by Flopchamp
2 stars

The MTF Signal Strategy is designed for 1-minute charts to identify trade entries using multi-timeframe EMA trends, Opening Range Breakout (ORB) levels, key daily high/low levels, and custom pivot zones. It generates trade signals on bar closes when price alig

Strategy v5 TrendBreakout
Updated 7 months ago · None stated GitHub repository of MTF Signal Strategy
2 stars

The ARCStage indicator calculates and color-codes Stan Weinstein's four market stages using the slope of the 30-week SMA and the price position relative to it. Stage 1 appears in light gray during basing consolidation, Stage 2 in light green during advancing,

Indicator v5 TrendMoving averages
Updated 7 months ago · MIT GitHub repository of Stan Weinstein Stage Analysis

Premarket Metrics Dashboard

by realanthonyc
2 stars

This indicator calculates and displays key premarket metrics in a table dashboard located on the top right of the price chart. It tracks the current price, gap percentage relative to the prior day close, overnight trend bias, premarket high and low, overnight

Indicator v6 Screeners & dashboardsSessions & time
Updated 7 months ago · MPL-2.0 GitHub repository of Premarket Metrics Dashboard
2 stars

This indicator plots the previous trading day's high and low on the price chart, together with the developing high and low of the current session. It reads the last closed daily high and low and locks those values at the start of each session. A session window

Indicator v6 Support & resistanceSessions & time
Updated 8 months ago · MPL-2.0 GitHub repository of Previous Day High-Low (PDHL)
2 stars

The Covered Calls Optimizer indicator helps traders analyze covered call option strategies directly on price charts. It calculates target strike prices and estimated yields based on stock volatility (ATR and 20-day historical volatility) and user-defined risk

Indicator v5 Volatility & bandsSupport & resistance
Updated 1 year ago · MIT GitHub repository of Covered Calls Optimizer

15M

by etnt
2 stars

15M is an intraday chart overlay designed for 15-minute timeframes. It plots a volume-weighted moving average (VWMA) alongside a simulated 5-day moving average calculated from user-defined daily trading hours. The script detects several classic candlestick pat

Indicator v6 Moving averagesCandlestick patterns
Updated 1 year ago · MPL-2.0 GitHub repository of 15M
2 stars

This indicator marks regular New York Stock Exchange (NYSE) session open (9:30 AM ET) and close (4:00 PM ET) times directly on the price chart. It draws vertical lines and descriptive text labels at historical session boundaries and projects lines forward for

Indicator v6 Sessions & time
Updated 1 year ago · MIT GitHub repository of NYSE Market Lines & Labels

Tex Santos Up Left

by scallywag41
2 stars

This indicator monitors technical conditions across up to ten user-defined ticker symbols simultaneously in a separate chart pane. For each symbol, it fetches market data and computes nine-period and two-hundred-period simple moving averages, a fourteen-period

Indicator v5 Screeners & dashboardsOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Tex Santos Up Left

ATR Reversion System

by Web3Degenerate
2 stars

The ATR Reversion System is a long-only mean-reversion strategy that plots ATR bands around a short-term EMA (20) and a long-term EMA (200) filter on the price chart. It signals entries by checking if the close is below the bottom ATR band and above the long E

Strategy v5 Mean reversionMoving averages
Updated 2 years ago · None stated GitHub repository of ATR Reversion System
2 stars

The Quantitative Stock Confluence Finder is a Pine Script v5 indicator that plots technical elements directly on the price chart to help identify potential confluence zones in stocks. It calculates and displays bands around a simple moving average with adjusta

Indicator v5 Moving averagesOscillators & momentum Repaints
Updated 2 years ago · None stated GitHub repository of Quantitative Stock Confluence Finder

Table 1m 15m 1HR

by srinivas-yarramsetti
2 stars

The Table 1m 15m 1HR indicator renders a multi-asset monitoring table overlay on the top-right of the price chart. It fetches real-time prices and calculates percentage price changes across 1-minute, 15-minute, and 1-hour timeframes relative to the prior day's

Indicator v5 Screeners & dashboards
Updated 3 years ago · None stated GitHub repository of Table 1m 15m 1HR

Mini-Project

by Core-Four
2 stars

Mini-Project is a customizable multi-indicator strategy that enables traders to combine entry signals from Linear Regression, RSI, MACD, Parabolic SAR, and Supertrend. Users can toggle individual technical filters on or off to drive trade entries or enable a c

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

Anchored VWAP

by MuMuLLC
2 stars

This indicator plots an anchored volume-weighted average price on the price chart. It accumulates the typical price (HLC3) weighted by volume and resets the calculation at the start of a session, week, month, or year. It also plots bands one, two, and three st

Indicator v5 VolumeVolatility & bands Repaints
Updated 3 years ago · MIT GitHub repository of Anchored VWAP
2 stars

The ANN MACD Future Forecast is an experimental indicator serving as a true deep learning sample on TradingView. It calculates Bollinger Bands and Squeeze Momentum using custom functions for SMA, EMA, standard deviation, highest and lowest values. The script p

Indicator v4 AI / machine learningVolatility & bands
Updated 7 years ago · MIT GitHub repository of ANN MACD Future Forecast (SPY 1D)
1 stars

A regime-first signal engine for the price chart. It classifies the market stage with a long moving average on an automatically chosen timeframe, then looks for setups: trend pullback, base breakout, stage-two entry, and two bottom-reversal types after heavy s

Indicator v6 TrendBreakout Repaints
Updated yesterday · None stated GitHub repository of Institutional Buy & Sell v9.4

Matrix Trend BTR

by natalivm
1 stars

A price-chart overlay that draws an Ichimoku-style cloud and a moving average, then prints buy and sell triangles from a chosen engine: RSI crossing its average in the cloud trend direction, EMA trend reversals, or manual price-level rules. Extra optional sign

Indicator v6 TrendOscillators & momentum
Updated yesterday · None stated GitHub repository of Matrix Trend BTR
1 stars

A price-chart indicator for leveraged turbo and mini products on stocks, built on the daily 14-period RSI. It computes the price at which today's close would take the daily RSI below the oversold level, using the previous day's averages, and works on intraday

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

NSE Swing v6 Pro UI

by Tilak004
1 stars

A trend-following swing strategy for Indian stocks. Longs need an EMA 21, 50 and 200 alignment with rising slopes, then enter on a pullback to the 21 EMA or a breakout above a recent swing high, filtered by ADX, volume against its average, RSI and an optional

Strategy v5 TrendBreakout
Updated yesterday · None stated GitHub repository of NSE Swing v6 Pro UI
1 stars

A long-only dip signal indicator that combines a 200-bar Bollinger Band filter with MACD crossovers. A buy marker appears when price has touched the lower band and, by default, still closes below the midline, then a standard or Impulse MACD crossover confirms.

Indicator v6 Mean reversionOscillators & momentum
Updated 2 days ago · None stated GitHub repository of Dip Mafia BB(200) Gate + MACD

This indicator evaluates and visualizes institutional banker, hot money, and retail trader strength inspired by the MCDX model. It measures RSI-based momentum across daily, weekly, and monthly timeframes, combining them into a weighted composite strength score

Indicator v6 Oscillators & momentumTrend

NSE Algo Trading System v1

by ArunTelegramBot
1 stars

A strategy for Indian stocks that lets the user choose one of five rule sets: SuperTrend with an EMA, an EMA crossover, RSI with MACD, a Bollinger Band squeeze, or a VWAP pullback. A time window in UTC limits trading to exchange hours. Risk management sizes by

Strategy v5 TrendOscillators & momentum
Updated 10 days ago · None stated GitHub repository of NSE Algo Trading System v1

ATR Expansion with Trend

by quantxaashish
1 stars

This indicator identifies potential bullish breakout opportunities by detecting volatility expansions in the direction of an established trend. It calculates the Average True Range (ATR) and determines if volatility is expanding by comparing ATR to its moving

Indicator v5 TrendVolatility & bands
Updated 13 days ago · MIT GitHub repository of ATR Expansion with Trend

LOKEN Bullish MCDX v2.2

by kdricha0602
1 stars

A separate-pane money-flow oscillator that is a custom variant of the MCDX indicator, written in Pine version 4. It rescales two RSI readings into a Banker series, drawn as a histogram, and a Hot Money series, drawn as an area, each clamped to a fixed range. S

Indicator v4 Oscillators & momentumVolume
Updated 2 weeks ago · MIT GitHub repository of LOKEN Bullish MCDX v2.2

FVG Prob TW Strategy

by gplee789-afk
1 stars

This strategy trades Taiwan-stock fair value gaps on the price chart. It marks gaps that pass an ATR size and displacement filter, tracks inverse FVGs, internal order-block retests and sweeps, and scores enabled triggers with fixed weights. A signal confirms o

Strategy v6 SMC / ICT / price actionSessions & time
Updated 3 weeks ago · MPL-2.0 GitHub repository of FVG Prob TW Strategy

RSI Oversold Recovery

by vamseeachanta
1 stars

Tracks RSI recovery from oversold territory on the price chart. RSI is calculated on the average of open, high, low and close, with a moving average of the RSI. When RSI drops below the oversold level the script shows a watch label, marks an alert after RSI cr

Indicator v5 Oscillators & momentumMean reversion
Updated 5 weeks ago · MIT GitHub repository of RSI Oversold Recovery

Investment Master Indicator

by diwakarsingh01-tech
1 stars

A multi-module overlay aimed at stock investing, with a master toggle panel for each part. Modules include a percentage envelope, 52-week high and low, Bollinger Bands, Knoxville divergence, a set of four SMA lines, automatically merged support and resistance

Indicator v6 Support & resistanceVolatility & bands
Updated 6 weeks ago · None stated GitHub repository of Investment Master Indicator

Aggressive Scalper

by femibol
1 stars

An open-source momentum scalping strategy for intraday charts of fast-moving stocks. It trades fast and slow EMA lines with a volume surge, a minimum momentum over a lookback, an optional VWAP condition and optional pullback re-entries, capped at a set number

Strategy v6 ScalpingOscillators & momentum
Updated 6 weeks ago · None stated GitHub repository of Aggressive Scalper

AQR TSMOM Pro Strategy

by cagriKarakulak
1 stars

A Pine v5 strategy that applies time-series momentum, taking the sign of past returns over about one, three and twelve months and averaging them into a long or short score. Position size is scaled to a target annual volatility with a maximum leverage cap, with

Strategy v5 TrendOscillators & momentum
Updated 7 weeks ago · MIT GitHub repository of AQR TSMOM Pro Strategy

BIST MTF Signal System

by Baran-Ozkann
1 stars

This indicator scores each bar of a BIST equity with a weighted confluence of thirteen layers and plots the result in a separate pane. Daily ADX, SMA and EMA alignment lock direction and can veto a candidate. The one-hour timeframe needs a PAC touch plus a con

Indicator v6 TrendOscillators & momentum Repaints
Updated 8 weeks ago · None stated GitHub repository of BIST MTF Signal System
1 stars

Shows a position-sizing table on the price chart for an options-style account where each contract covers 100 units. Inputs are portfolio value, target premium, contracts allowed, active contracts and average cost. It reports a risk amount per trade, taken as o

Indicator v6 Screeners & dashboards
Updated 8 weeks ago · MIT GitHub repository of DCP Daily Contract Position

MKUMARAN RRMS Strategy

by shadowmarketai
1 stars

A long and short strategy that finds the lowest low and highest high over a swing lookback of 20 bars. It enters long near the low or short near the high when the reward-to-risk ratio meets a minimum, sizing each trade from a capital figure and a risk percenta

Strategy v5 Support & resistanceMean reversion
Updated 2 months ago · None stated GitHub repository of MKUMARAN RRMS Strategy

Alpha Forge Core Elite

by vedkanani123
1 stars

A price-chart indicator that plots a basis line with volatility bands and graded buy and sell setups. Presets for Scalping, Day, Swing or Custom, plus an auto market profile that detects forex, gold, crypto, stocks or futures, set trend length, band width and

Indicator v6 TrendSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of Alpha Forge Core Elite

Anish TB Foster Fix

by nishpa800
1 stars

Overlay indicator for stock-style charts that flags pocket pivot candles: a large percentage body whose volume beats the highest opposite-colour volume over a lookback. It also tests trend stages using 50, 150 and 200 period EMAs plus distance from the 52-week

Indicator v6 TrendVolume
Updated 2 months ago · None stated GitHub repository of Anish TB Foster Fix

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