Pine Library · 4,367 open-source scripts

Free Pine Script v6 Scripts (page 23)

Scripts written for Pine Script version 6, the current version of TradingView's language. They paste into the Pine Editor and run as they are.

Pine scripts4,367
Code shown here2,412open licence
Updated in a year4,021
No repaint flag3,857

Pine Script v6: Indicators, Strategies and Libraries

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

A tiny test script from a Pine Script linter project that checks how a string literal continued over two indented lines is handled. It assigns the two-line text to a variable and uses it as the title of a plot of the closing price in a separate pane. It has no

Indicator v6
Updated 4 weeks ago · Custom licence GitHub repository of Multiline String Title Probe

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 7 days ago · MIT GitHub repository of TR Basis Monitor

Engulfing Off BB

by lunarticktrading
7 stars

This indicator plots Bollinger Bands on the price chart and highlights engulfing candles that touch a band. A bullish engulfing bar that reaches the lower band is colored with the bullish color, and a bearish engulfing bar that reaches the upper band is colore

Indicator v6 Volatility & bandsCandlestick patterns
Updated 2 weeks ago · None stated GitHub repository of Engulfing Off BB

Commodity Channel Index

by eddiebelaval
7 stars

This indicator calculates and plots the Commodity Channel Index (CCI) alongside a configurable moving average in a separate pane. The CCI line dynamically changes color based on whether its value is above or below a threshold level of 50, accented by gradient

Indicator v6 Oscillators & momentumMoving averages
Updated 3 months ago · None stated GitHub repository of Commodity Channel Index

CVD: Architect

by s4mn0v
7 stars

This indicator calculates cumulative volume delta by aggregating directional intrabar volume from lower-timeframe data and plots the accumulated values in a separate pane. It tracks volume progression with high and low wick tracking across each bar. The main s

Indicator v6 Volume
Updated 5 months ago · None stated GitHub repository of CVD: Architect

Engulf 1v1 + 2v2

by chargersfan47
7 stars

This Pine Script indicator detects and plots 1v1 and 2v2 engulfment candlestick patterns on the price chart. It identifies bullish and bearish engulfment patterns based on candle open, high, low, and close values, checking conditions where a candle engulfs pre

Indicator v6 Candlestick patternsSupport & resistance
Updated 5 months ago · None stated GitHub repository of Engulf 1v1 + 2v2
7 stars

The EMA 9/26/52 Cross Strategy is a trend-following strategy overlay that plots three Exponential Moving Averages (9, 26, and 52 periods) on the price chart. It generates long entry signals when the 9 EMA crosses above the 26 EMA while the price remains above

Strategy v6 TrendMoving averages
Updated 1 year ago · MPL-2.0 GitHub repository of EMA 9/26/52 Cross Strategy

K-SESSION-WINDOWS session flags

by pineforge-4pass
6 stars

The strategy enters long positions on even bars and short positions on odd bars of every chart bar. It records session flags such as market session, premarket, postmarket, first bar, last bar, first regular bar and last regular bar in the trade comment. Proces

Strategy v6 Sessions & time
Updated 2 days ago · Custom licence GitHub repository of K-SESSION-WINDOWS session flags

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 2 months ago · MIT GitHub repository of C41 Oscillator

CRT State Engine

by alboogycOdR
6 stars

This overlay indicator tracks an institutional CRT state machine on the price chart. It detects draw-on-liquidity bias from swing pivots, watches 1AM, 5AM and 9AM CRT models, and marks session states for CBDR, Asia, London, London lunch and the New York open.

Indicator v6 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of CRT State Engine

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)

HTF Timestamp Probe

by 345-strategies
5 stars

HTF Timestamp Probe is a diagnostic utility indicator that inspects how TradingView timestamps higher-timeframe bar open times. It requests open timestamps for weekly, monthly, quarterly, and yearly bars using lookahead security calls and displays the results

Indicator v6 Screeners & dashboards Repaints
Updated 4 days ago · MPL-2.0 GitHub repository of HTF Timestamp Probe
5 stars

This strategy tracks pivot-constrained structural boundaries and executes breakout and retest trades directly on the price chart. It fits robust trendline boundaries using pivot points, evaluates structural quality via a Q-Score metric, and filters entries thr

Strategy v6 BreakoutSupport & resistance
Updated 8 weeks ago · None stated GitHub repository of RG Structure Trading v4.0

日内关键价位

by forecho
5 stars

This indicator calculates and plots key intraday session levels directly on the price chart. It tracks the regular trading hours (RTH) open, previous day close, previous day high, and previous day low, along with the high and low ranges for both the Asian and

Indicator v6 Support & resistanceSessions & time
Updated 8 weeks ago · None stated GitHub repository of 日内关键价位

SMA Cross 50/200

by durdenbtc
5 stars

This strategy calculates a 50-period simple moving average and a 200-period simple moving average using closing prices. It enters a long position whenever the fast moving average crosses above the slow moving average, and closes the trade when it crosses below

Strategy v6 TrendMoving averages
Updated 5 months ago · MIT GitHub repository of SMA Cross 50/200

MACD Divergence

by chaise-cogent
5 stars

This indicator calculates the Moving Average Convergence Divergence (MACD) and signal line in a separate pane to detect regular bullish and bearish divergences. It identifies price pivot highs and lows using a configurable lookback length and compares them aga

Indicator v6 Oscillators & momentumDivergence
Updated 7 months ago · MIT GitHub repository of MACD Divergence

Double Smoothed Stochastic MTF

by SiegerTerpstra
5 stars

This indicator plots a multi-timeframe Double Smoothed Stochastic in a separate pane. It combines an exponential moving average ratio with stochastic normalization and optional moving-average smoothing, producing values from 0 to 100. Rising and falling values

Indicator v6 Oscillators & momentum
Updated 9 months ago · None stated GitHub repository of Double Smoothed Stochastic MTF

Antigravity Elite

by eltonaguiar
4 stars

Antigravity Elite is an overlay indicator that screens price with seven selectable components: Mercury Fear, Connors RSI-2, volatility-spike reversal, EMA stack, Supertrend, multi-sigma bands, and an optional funding proxy. Auto-Detect chooses one method, whil

Indicator v6 Oscillators & momentumMoving averages
Updated 2 days ago · None stated GitHub repository of Antigravity Elite

Commonlib

by InNoobWeTrust
4 stars

Commonlib is a Pine Script v6 library of bar-geometry helpers that draws nothing by itself. It measures the longer wick as a share of the high-low range, signed when the lower wick is longer, and the candle body as a signed share of that range. It combines tho

Library v6
Updated 2 days ago · None stated GitHub repository of Commonlib
4 stars

OptionX Noisy Test Signals calculates a short-period Relative Strength Index (RSI) and plots buy or sell shape markers on the main price chart when the RSI crosses above or below a chosen center level. It generates JSON-formatted alert payloads with symbol, pr

Indicator v6 Oscillators & momentum Repaints
Updated 3 days ago · MIT GitHub repository of OptionX Noisy Test Signals
4 stars

An all-in-one chart indicator combining Smart Money Concepts (SMC) and technical level analysis. It identifies Order Blocks, market structure shifts like CHoCH and BOS, KOLA support and resistance levels, SIDO chart patterns, and Fibonacci Optimal Trade Entry

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 weeks ago · MIT GitHub repository of GOM KOLA SIDO Full Integration
4 stars

Calculates and renders Time Price Opportunity (TPO) market profiles, Initial Balance (IB) ranges, and value distributions directly on the price chart. It determines key auction levels including the Point of Control (POC), Value Area High (VAH), Value Area Low

Indicator v6 Support & resistanceSessions & time
Updated 7 weeks ago · MPL-2.0 GitHub repository of Meridian - Futures Profile

ATR Levels

by trugurpala
4 stars

This indicator calculates the Average True Range and a Simple Moving Average of closing prices. It plots a central basis line along with dynamic support and resistance levels derived from multiples of the ATR. The main settings control the ATR length and the m

Indicator v6 Support & resistanceVolatility & bands
Updated 2 months ago · MIT GitHub repository of ATR Levels

Liquidity Magnet

by VolodymyrFilias
4 stars

Liquidity Magnet scores active liquidity pools on the price chart and highlights the pool most likely to be reached. It detects swing highs, swing lows, and equal high or low clusters, then ranks them using strength, proximity, age decay, and momentum bias. Eq

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 4 months ago · MIT GitHub repository of Liquidity Magnet

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)

MACD

by YooooungLee
4 stars

This indicator calculates and plots the standard Moving Average Convergence Divergence oscillator in a separate pane. It computes a fast exponential moving average and a slow exponential moving average from the chosen price source, taking the difference as the

Indicator v6 Oscillators & momentumMoving averages
Updated 10 months ago · Apache-2.0 GitHub repository of MACD

Calculates top and bottom reversal signals for oscillator indicators based on dynamic cycle detection, overbought and oversold thresholds, and price confirmation. It tracks indicator cycles using centerline crossovers, verifies overbought or oversold condition

Indicator v6 Oscillators & momentumSupport & resistance
Updated 1 year ago · Custom licence GitHub repository of Universal High-Low Detection Example

EMA Cross Strategy

by degenview
3 stars

This strategy enters a long position when a fast EMA crosses above a slower EMA and closes that long when the fast EMA crosses back below. While a long is open, it places an ATR-based stop and a profit target measured from the average entry price. The main set

Strategy v6 TrendMoving averages
Updated 2 days ago · GPL-3.0 GitHub repository of EMA Cross Strategy

ATR Pip Control

by ricksimpsontrading
3 stars

ATR Pip Control is a volatility indicator that computes the Average True Range over a user-specified period and plots adaptive upper and lower bands around price using coefficients for band width. It applies a minimum filter size in ticks or pips to validate s

Indicator v6 Volatility & bandsSupport & resistance Repaints
Updated 10 days ago · None stated GitHub repository of ATR Pip Control

Relative Momentum Index

by AkashSasikumar47
3 stars

The Relative Momentum Index (RMI) is a momentum oscillator calculated in a separate pane. It modifies the standard RSI formula by evaluating price changes relative to a specified momentum lookback period rather than consecutive bars. The script plots the RMI o

Indicator v6 Oscillators & momentum
Updated 2 weeks ago · MIT GitHub repository of Relative Momentum Index

Oscillator Scaffold

by jpantsjoha
3 stars

The Oscillator Scaffold calculates an RSI value using the selected source and bar length. It plots the oscillator in a separate pane along with horizontal lines for overbought and oversold levels. The script fills the region between those levels and draws cond

Indicator v6 Oscillators & momentumSupport & resistance
Updated 4 weeks ago · Custom licence GitHub repository of Oscillator Scaffold

This indicator combines Supertrend for main trend filtering, DeMarker for momentum extremes, and Stochastic RSI for overbought/oversold signals on multiple timeframes. It plots buy/sell arrows and trend labels directly on the price chart. Additional filters in

Indicator v6 TrendOscillators & momentum
Updated 5 weeks ago · MIT GitHub repository of Zerith - Supertrend + DeMarker + Stoch RSI Multi-TF Signal
3 stars

Stella's RSI + EMA Crossover is a momentum strategy that plots exponential moving averages directly on the price chart. It generates long signals when RSI turns up from oversold levels while price trades above the fast EMA and optional 200-period trend filter

Strategy v6 TrendOscillators & momentum
Updated 8 months ago · MIT GitHub repository of Stella's RSI + EMA Crossover

Value Zones

by LucasRibeiroCaetano
3 stars

Value Zones plots a 200-week simple moving average that is further smoothed with a 20-period exponential moving average, then draws fixed multiples of that average on the price chart. Zones are filled and labeled from the average itself through one-and-a-half,

Indicator v6 Moving averagesSupport & resistance
Updated 11 months ago · Custom licence GitHub repository of Value Zones

This indicator plots the high, midpoint, and low of the previous day, week, and month as lines on the price chart. Daily levels appear on intraday charts, weekly levels on intraday or daily charts, and monthly levels on charts that are not monthly. Users can t

Indicator v6 Support & resistanceMoving averages Repaints
Updated 12 months ago · None stated GitHub repository of High/Mid/Low of the Previous Month, Week and Day + MA
3 stars

This overlay indicator recreates short-setup conditions and audits their later outcomes on the price chart. It scores optional percent-surge, RSI overbought rollover, Bollinger exhaustion, volume spike, and EMA trend filters, then marks BASE or STRONG signals

Indicator v6 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of Hedge Short Setup Outcome Auditor

Pi Cycle Top Indicator

by EngineeredSuccess
3 stars

The Pi Cycle Top Indicator calculates a 111-period simple moving average alongside a scaled 350-period simple moving average to detect potential market cycle highs, historically utilized for Bitcoin analysis. It identifies crossovers between the moving average

Indicator v6 Moving averagesTrend
Updated 1 year ago · Custom licence GitHub repository of Pi Cycle Top Indicator

This overlay indicator plots a 20-period Bollinger Band envelope with a two-standard-deviation width on the price chart. It marks a long bounce when price reclaims the lower band, 14-period RSI is between 30 and 70, 14-period ADX is above 25, and Binance BTCUS

Indicator v6 Volatility & bandsOscillators & momentum

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 9 days ago · None stated GitHub repository of QQQ 1min Pure Runner

3x MA = Moving Average

by piecioshka
2 stars

The 3x MA indicator plots three moving averages on the price chart: a short-term, medium-term, and long-term average. Users can customize the period lengths, the type of moving average (including SMA, EMA, WMA, VWMA, and RMA), and the colors for each. Optional

Indicator v6 Moving averagesTrend
Updated 12 days ago · MIT GitHub repository of 3x MA = Moving Average

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