Pine Library · 1,047 open-source scripts

Free Stock Pine Scripts for TradingView (page 5)

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

MACD Crossover Strategy

by jaichaturvedi88
1 stars

This strategy plots on the price chart and trades long when the MACD line crosses above its signal line. It closes the long when the MACD line crosses back below the signal. Position size is the number of shares that a fixed ten thousand Indian rupees can buy

Strategy v6 Oscillators & momentum
Updated 3 months ago · None stated GitHub repository of MACD Crossover Strategy
1 stars

A variant of the Elephant Bars overlay that considers only one-bar retracements. It flags candles whose body is at least a set multiple of the average body, then marks a following bar as a retracement when its body is small relative to the elephant bar and its

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

SPY Elliott Wave Count

by fededamis
1 stars

This indicator overlays a precomputed Elliott Wave count for SPY on the price chart. It draws primary and alternate impulse and corrective waves as colored lines and price labels, including optional subwaves, projected points, invalidation levels, and Fibonacc

Indicator v6 Support & resistance
Updated 3 months ago · None stated GitHub repository of SPY Elliott Wave Count

Saham: Papan Instrumen By. Akhmfz is a fundamental analysis dashboard tailored for Indonesian equities on the IDX. It calculates a multi-dimensional score across valuation, business quality, growth, financial health, dividend income, momentum, and an optional

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

This technical analysis dashboard aggregates market data across four dimensions: trend, momentum, volatility, and volume. It evaluates multiple technical indicators including exponential moving averages, SuperTrend, ADX, RSI, MACD, Stochastic, Bollinger Bands,

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

Dollar Cross Play

by majohnst
1 stars

The Dollar Cross Play strategy detects price breakouts above a user-defined dollar threshold. It qualifies long entries by verifying that the previous day's close was at or below a maximum ceiling, aiming to capture fresh crosses rather than overextended moves

Strategy v6 BreakoutSupport & resistance
Updated 4 months ago · None stated GitHub repository of Dollar Cross Play

BB(10,2) MTF Confirm

by zraesdev-hub
1 stars

This overlay strategy trades a close and open below the lower Bollinger Band, using a period and multiplier set on the chart timeframe. An optional higher-timeframe Bollinger Band can confirm entries before orders are placed. Mode S1 exits at a percentage take

Strategy v5 Volatility & bandsMean reversion
Updated 4 months ago · None stated GitHub repository of BB(10,2) MTF Confirm

Unified Trade Signal

by ashishgkwd
1 stars

Unified Trade Signal is an overlay indicator that prints a buy or sell label only when several conditions agree on the same bar. For a buy, price must break above a Nadaraya-Watson envelope upper band, the fast EMA must be above the slow EMA, an adaptive trend

Indicator v6 TrendOscillators & momentum Repaints
Updated 4 months ago · None stated GitHub repository of Unified Trade Signal
1 stars

This indicator plots the Parabolic Stop and Reverse (SAR) on the price chart with customizable acceleration start, increment, and maximum values. It highlights trend reversals where the price crosses the SAR line, marking flip points with directional triangula

Indicator v6 TrendScreeners & dashboards
Updated 5 months ago · None stated GitHub repository of SAR with tweakable aparameter

BWC Momentum v5

by tonimaxx
1 stars

A long-only strategy for stocks that enters when the close is above both a 50-period and a 200-period SMA, RSI is above a set minimum, volume exceeds a multiple of its average, price has stayed above the 50 SMA for several bars and dollar volume passes a floor

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · Custom licence GitHub repository of BWC Momentum v5

Breadth Dip Buying

by AlanGuo
1 stars

A long-only strategy that combines a market breadth index, the percentage of stocks above their 50-day average, with a long moving average of 225 periods. When price is above the average, it buys if breadth drops below 25. In bear mode, which is off by default

Strategy v6 Mean reversionMoving averages
Updated 7 months ago · None stated GitHub repository of Breadth Dip Buying

Precious Metals Dashboard

by TehbynDFRNT
1 stars

Overlays fast, slow and trend EMAs with an optional cloud, cross triangles and volume spike markers on the price chart, and pulls spot gold, silver and a list of ASX gold and silver miners through security requests. A table summarises daily change, RSI, volume

Indicator v6 Screeners & dashboardsMoving averages
Updated 7 months ago · None stated GitHub repository of Precious Metals Dashboard

WirezardStrategyTester

by udhansingh
1 stars

A stock-oriented strategy that scores each bar from minus 100 to plus 100 by combining RSI, an impulse MACD, VIDYA, volume spikes, a spread and wick proxy for market depth, and sector ETF strength against a benchmark. Buy entries need the score above a thresho

Strategy v6 Oscillators & momentumTrend Repaints
Updated 7 months ago · MIT GitHub repository of WirezardStrategyTester
1 stars

This indicator serves as a validation test suite for the McClellan Oscillator. It fetches NYSE advancing and declining issues data and computes the oscillator using ratio-adjusted net advances. The script cross-checks manual EMA calculations against ta.ema for

Indicator v6 Screeners & dashboardsOscillators & momentum
Updated 7 months ago · None stated GitHub repository of McClellan Oscillator Tests
1 stars

This strategy implements the classic Turtle Trading System using Donchian channels. It enters long when the price breaks above the upper entry channel and short when it breaks below the lower channel, with an optional filter that skips signals following a winn

Strategy v5 BreakoutTrend
Updated 7 months ago · None stated GitHub repository of Donchian Channel - Turtle Trading
1 stars

A monthly rotation strategy based on the global equity momentum approach. It requests monthly closes for a US equity ETF, an international equity ETF and a bond ETF, compares their returns over a lookback in months and checks the stronger equity against a manu

Strategy v5 Oscillators & momentum
Updated 9 months ago · None stated GitHub repository of Dual Momentum Strategy
1 stars

Advanced ICT Theory - A-ICT identifies institutional market structure patterns based on Smart Money Concepts directly on the price chart. It detects displacement candles, order blocks, fair value gaps, trap zones, and reversal zones, tracking their mitigation

Indicator v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 11 months ago · None stated GitHub repository of Advanced ICT Theory - A-ICT

ezTrend Lines

by ezPappi
1 stars

ezTrend Lines calculates selected oscillator indicators, including RSI, CCI, Momentum, OBV, or MACD, and displays them in a separate pane. It identifies pivot highs and pivot lows on the chosen oscillator line using configurable pivot periods and checks up to

Indicator v6 Oscillators & momentumSupport & resistance
Updated 1 year ago · GPL-3.0 GitHub repository of ezTrend Lines
1 stars

Measures how far price has moved from its 50-period moving average in multiples of ATR percent, using daily data. A dot is plotted when the distance exceeds a chosen multiple, with ten as the default, and an optional info table shows the readings. Settings cha

Indicator v5 Volatility & bandsMean reversion
Updated 1 year ago · None stated GitHub repository of ATR% Multiple from 50-MA

Imbalance Strategy

by creatidy
1 stars

A stock strategy that combines a trend template with relative strength against a reference index. It builds smoothed moving averages scaled for daily or weekly charts, 52-week high and low, and an IBD-style relative strength measure against a reference symbol.

Strategy v5 TrendOscillators & momentum
Updated 3 years ago · GPL-3.0 GitHub repository of Imbalance Strategy
1 stars

A stock-oriented overlay that weighs the current price against fundamental data. The settings let the user pick factor groups such as earnings price, per-share book value, earnings, revenue and free cash flow, EBIT and EBITDA, profit margins, returns on assets

Indicator v5 Screeners & dashboards
Updated 4 years ago · None stated GitHub repository of Discounted Price Probability

1DTE

by tyler314
1 stars

1DTE is an overlay indicator designed for 1-day-to-expiration option trading analysis. It evaluates market conditions using Average True Range (ATR), consecutive green or red daily streaks, and CBOE Volatility Index (VIX) levels. Users can filter evaluation wi

Indicator v5 Volatility & bandsSessions & time
Updated 4 years ago · None stated GitHub repository of 1DTE
1 stars

Mansfield Relative Strength indicator computes relative strength by dividing the current close price by a daily index value selected from Nasdaq Composite, NYSE Composite, ARCA Composite, or Coinbase BTCUSD based on the symbol prefix. It calculates the percent

Indicator v4 Oscillators & momentum
Updated 5 years ago · AGPL-3.0 GitHub repository of Mansfield Relative Strength
575 stars

This indicator scans a pasted list of symbols for ICT fair value gaps and lists long and short matches in an on-chart table. It draws gap boxes on the price chart and can close them partially when price fills part of the gap. The user chooses among six scannin

Indicator v6 SMC / ICT / price actionScreeners & dashboards
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Fair Value Gap (FVG) Scanner

3402 Tracker

by Allen1212
303 stars

3402 Tracker plots historical transaction markers on the price chart to visualize buy and sell trades executed by ARK Invest for stock 3402. The indicator places colored labels on bar timestamps corresponding to dates when ARK funds opened, adjusted, or closed

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

Macro VN Indices Research

by Thanhtran-165
38 stars

This indicator maps a composite macro risk score onto Vietnamese indices and sectors in a separate pane. It combines liquidity stress, curve shape, the international yield spread, and the ten-year versus policy-rate spread, then groups regimes with hysteresis.

Indicator v6 Screeners & dashboards
Updated 5 weeks ago · None stated GitHub repository of Macro VN Indices Research
16 stars

This strategy plots Donchian channels, trailing stops, and profit targets directly on the price chart. It enters breakout trades using a 55-bar Donchian channel and sizes positions according to an ATR-based risk percentage per unit. The system adds units as pr

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 10: Profit Targets

P/E, P/BV, EPS

by msongkiet
16 stars

Calculates and plots key financial metrics including the Price-to-Earnings ratio, Price-to-Book Value ratio, and Earnings Per Share in a separate pane. The script retrieves financial data through standard financial requests based on customizable reporting peri

Indicator v5
Updated 2 years ago · None stated GitHub repository of P/E, P/BV, EPS

Estrategia EMA and BARS

by JoelPasapera
11 stars

This strategy generates long trade entries based on an exponential moving average crossover on the main price chart. It calculates two customizable EMAs and executes a buy order when the shorter moving average crosses above the longer moving average. Rather th

Strategy v6 TrendMoving averages
Updated 5 months ago · Apache-2.0 GitHub repository of Estrategia EMA and BARS
10 stars

This indicator plots three sets of multi-timeframe moving averages on the price chart to assist with top-down macro trend analysis. It renders two configurable fast and slow moving averages on a 610-minute timeframe, a 21-period weekly ribbon comparing EMA and

Indicator v4 Moving averagesTrend Repaints
Updated 5 years ago · None stated GitHub repository of Magicks (e)mas Indicator

Asset Drift Model

by MeridianAlgo
9 stars

Asset Drift Model is a separate-pane statistical indicator that collects non-overlapping logarithmic returns over a fixed 60-bar horizon and summarizes them with sample statistics. It classifies drift using t-critical and z-score thresholds plus a minimum econ

Indicator v6 TrendScreeners & dashboards
Updated 4 months ago · MIT GitHub repository of Asset Drift Model
8 stars

This indicator detects contrarian inflection points and potential market reversals by combining sentiment, volume, and price action metrics directly on the price chart. It evaluates overbought and oversold conditions with the RSI and Stochastic oscillators, hi

Indicator v5 Oscillators & momentumVolatility & bands
Updated 7 weeks ago · None stated GitHub repository of GCR Inflection Point Scanner

TR Basis Monitor

by Enesp4rl4k
7 stars

This indicator calculates the cost-of-carry fair value between futures and spot prices, measuring the basis and fair value deviation in basis points. Operating in a separate pane, it computes a rolling Z-score of deviation using moving averages and standard de

Indicator v6 Mean reversionVolatility & bands
Updated 6 days ago · MIT GitHub repository of TR Basis Monitor

C41 Oscillator

by damianpitt
6 stars

The C41 Oscillator is a separate pane composite momentum indicator designed to companion the C41 Core Strategy. It combines a moving average trend filter with RSI and Williams %R overbought or oversold reversal conditions into a normalized 0 to 100 score. The

Indicator v6 Oscillators & momentumTrend
Updated 8 weeks ago · MIT GitHub repository of C41 Oscillator

MarketMerge v1.5

by mgnyc11
6 stars

MarketMerge is a price-chart overlay that plots moving averages, a relative strength line, and an S&P 500 comparison. Users can show a 21-period EMA and 50-, 150-, and 200-period simple averages. The relative strength line divides price by a chosen benchmark,

Indicator v6 Moving averagesTrend
Updated 8 months ago · MIT GitHub repository of MarketMerge v1.5

This indicator calculates daily 90-period Bollinger Bands and plots them directly on a lower timeframe chart, such as M15. It queries higher-timeframe daily data using request.security and updates the upper, middle, and lower band values at the start of each n

Indicator v6 Volatility & bandsMoving averages Repaints
Updated 1 year ago · MIT GitHub repository of D1 Bollinger Bands (Period 90) on M15 (Forward Shifted)
4 stars

This strategy translates Python backtesting logic into Pine Script for intraday momentum trading. It calculates forced Heikin-Ashi candles and 1-minute moving averages to evaluate market trends and assign a signal strength score from 0 to 10. Entries execute w

Strategy v5 TrendMoving averages
Updated 2 days ago · None stated GitHub repository of Xiao Tang System v2 Strategy

EMA Trail (Long Only)

by Jaden300
4 stars

This long-only strategy enters when the fast EMA crosses above the slow EMA and fills at the next bar open. It sets an initial percentage take profit and stop loss from the entry price. Once price rises by the trail trigger, both levels and the reference price

Strategy v6 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of EMA Trail (Long Only)

MOTO ka AgniAstra

by HelloMoto069
3 stars

MOTO ka AgniAstra is a price-chart overlay that smooths the selected source with a Gaussian window and draws upper and lower bands from a scaled mean absolute error. When repainting smoothing is on, it recalculates the curve across recent bars and marks band c

Indicator v5 Volatility & bandsTrend Repaints
Updated 1 year ago · None stated GitHub repository of MOTO ka AgniAstra

This time-based strategy trades overnight holding periods on the New York Stock Exchange, plotting execution labels directly on the price chart. It triggers a fixed long entry ten minutes before the regular session ends at 15:50 New York time. The strategy exe

Strategy v5 Sessions & time
Updated 2 years ago · GPL-3.0 GitHub repository of Buy Before Close, Sell After Open (NYSE)

QQQ 1min Pure Runner

by yalili8521
2 stars

This intraday strategy enters long or short positions on 1-minute charts of QQQ based on a triple moving average stack. It filters entries by requiring an accumulation or distribution sequence of consecutive rising or falling bars while rejecting bars exceedin

Strategy v6 TrendMoving averages
Updated 8 days ago · None stated GitHub repository of QQQ 1min Pure Runner
2 stars

Implements a strategy combining Oliver Kell's Cycle of Price Action with Mark Minervini's Volatility Contraction Pattern (VCP). It identifies breakout setups such as wedge pops and EMA crossbacks aligned with EMA 10/20/50/200 and an optional Minervini Trend Te

Strategy v6 TrendBreakout
Updated 3 months ago · Custom licence GitHub repository of Kell + Minervini VCP Backtest

LTP Levels v1

by mhs54
2 stars

LTP Levels v1 plots key day-trading support and resistance boundaries directly on the price chart. It projects pre-market high and low levels from recent trading sessions alongside buffer zones and automatically calculated target levels extracted from historic

Indicator v6 Support & resistanceSessions & time Repaints
Updated 6 months ago · None stated GitHub repository of LTP Levels v1

SUMMARY

by ryangaraygay
2 stars

This indicator aggregates multiple technical signals into an on-chart summary table. It calculates a session-based VWAP, a triple-EMA-smoothed price-volume oscillator, an EMA 9/21 trend spread, multi-timeframe Donchian channel breakouts, and an opening range h

Indicator v6 Screeners & dashboardsSessions & time
Updated 1 year ago · MIT GitHub repository of SUMMARY

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