Pine Library · 4,367 open-source scripts

Free Pine Script v6 Scripts (page 49)

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

ta

by ivansoft
1 stars

A Pine Script v6 library of technical analysis functions that are not built into the language. It exports many indicators, including Awesome Oscillator, Aroon, Donchian Channel, Ichimoku Cloud, SuperTrend, Klinger Volume Oscillator, Schaff Trend Cycle, Vortex,

Library v6
Updated 1 year ago · None stated GitHub repository of ta
947 stars

This indicator calculates a moving average where historical prices are weighted according to a sine function over a user-defined length. It plots directly on the price chart, coloring the line based on whether the slope is rising or falling. Optional settings

Indicator v6 Moving averagesTrend
Updated 12 days ago · GPL-3.0 GitHub repository of Sine Weighted Moving Average
228 stars

This strategy detects price breakouts above rolling highest highs or below lowest lows over a customizable lookback period. It includes optional volume spike and ATR volatility threshold filters, along with bar confirmation rules. Positions are taken upon conf

Strategy v6 BreakoutVolatility & bands
Updated 3 months ago · None stated GitHub repository of Breakout Strategy Template

Aroon Oscillator

by mihakralj
99 stars

Aroon Oscillator calculates the difference between Aroon Up and Aroon Down across a user-defined lookback period. It plots the resulting oscillator line between -100 and +100 in a separate pane, alongside horizontal reference levels at 0 and plus or minus 50,

Indicator v6 TrendOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Aroon Oscillator

MS+MACD Enhanced Tests

by iamrichardD
57 stars

This script implements an enhanced testing framework for the Market Structure MACD 4H strategy. It defines test cases with pass rates and includes mock functions simulating advanced market structure detection, MACD sensitivity analysis across trending and chop

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · Apache-2.0 GitHub repository of MS+MACD Enhanced Tests
55 stars

The script calculates and plots Parabolic SAR with default parameters on the price chart. It also computes Stochastic RSI using a 14-period RSI and 14-period Stoch with 3-period smoothing. Buy signals occur when Stochastic RSI crosses above its signal line fro

Indicator v6 Oscillators & momentumMoving averages
Updated 6 months ago · Apache-2.0 GitHub repository of Parabolic SAR + Stoch RSI

This Pine Script indicator identifies liquidity sweeps and confirms signals using a close-back candle pattern directly on the price chart. It tracks recent swing highs and lows over a customizable lookback period. A bullish signal forms when a prior bar sweeps

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · MPL-2.0 GitHub repository of Liquidity Sweep + Close-Back Confirmation
47 stars

The OHLC StatMap indicator calculates and plots statistical price levels based on historical open, high, low, and close data across up to four higher timeframes. It overlays statistical anchor lines, period open prices, manipulation levels, and distribution qu

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 8 weeks ago · None stated GitHub repository of OHLC StatMap (Multi-Timeframe)

Center of Gravity (CG)

by mihakralj
47 stars

This indicator calculates John Ehlers' Center of Gravity oscillator, which measures the balance point of price over a lookback window to identify cycle turning points with low lag. It computes a weighted price distribution ratio normalized around a zero center

Indicator v6 Oscillators & momentum
Updated 8 months ago · MIT GitHub repository of Center of Gravity (CG)
29 stars

This indicator detects swing highs and lows to plot bull and bear trendlines directly on the main price chart. It projects valid trendlines forward while applying rules for maximum slope, bar span, and average bar range tolerance to filter out invalid or broke

Indicator v6 TrendSupport & resistance
Updated 2 weeks ago · MIT GitHub repository of Zen Swing Trendlines

Harness Trivial SMA

by heyphat
26 stars

Harness Trivial SMA is a basic test indicator that calculates and plots a Simple Moving Average (SMA) of the closing price over a user-defined length. Plotted in a separate pane below the chart, it provides a straightforward visual representation of average pr

Indicator v6 Moving averages
Updated 2 months ago · AGPL-3.0 GitHub repository of Harness Trivial SMA
16 stars

This strategy implements Turtle System 1 fast trend following directly on the price chart. It opens long or short positions upon 20-bar Donchian channel breakouts and exits on opposing 10-bar Donchian extremes. Position sizing is calculated dynamically from AT

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 1: Fast Breakout (S1)

Trend Compass 4H

by chris-c-thomas
14 stars

Trend Compass 4H plots a multi-EMA ribbon (10/21/50) along with higher-timeframe reference levels on the price chart. It classifies trend phase into six states and calculates a composite weighted trend score. The script detects RSI and MACD divergences, analyz

Indicator v6 TrendMoving averages
Updated 6 months ago · MIT GitHub repository of Trend Compass 4H

The Candle Story Engine evaluates multi-candle price action dynamics, analyzing pressure, sequence persistence, deceleration, and structural exhaustion across a customizable lookback window. Incorporating optional trend context via exponential moving averages,

Indicator v6 Candlestick patternsBreakout
Updated 3 days ago · MIT GitHub repository of Candle Story Engine [WavesUnchained]
9 stars

This separate-pane indicator calculates multi-period volatility regimes by analyzing fast, medium, and slow Average True Range (ATR) metrics alongside volume integration, gap adjustments, and session weighting. It visualizes volatility states using a heat map

Indicator v6 Volatility & bandsScreeners & dashboards
Updated 2 weeks ago · Custom licence GitHub repository of QVS Pro - Raw Volatility Edition
9 stars

This indicator estimates net buying pressure from footprint buy and sell volume and plots it in a separate pane. It subtracts sell volume from buy volume, then accumulates that difference as net volume or as dollar volume using a user-selected price. A third m

Indicator v6 Volume
Updated 4 months ago · MIT GitHub repository of Net Buy Volume [theUltimator5]

Signals MA

by lunarticktrading
7 stars

The Signals MA indicator calculates a moving average of the close price using either SMA or EMA based on a user-defined length. It plots this average on the price chart. Breakout signals occur when the close crosses above the moving average from below, and bre

Indicator v6 Moving averagesBreakout
Updated 2 weeks ago · None stated GitHub repository of Signals MA
7 stars

Multi-Ticker Anchored Candles overlays up to three user-selected symbols on the price chart as candles anchored to a chosen period, which defaults to the daily timeframe. Each symbol has its own color and an on or off toggle. Optional drawings mark session bre

Indicator v6 Candlestick patternsSessions & time
Updated 3 months ago · None stated GitHub repository of Multi-Ticker Anchored Candles

This indicator plots On Balance Volume in a separate pane and can overlay a smoothing average of that series. By default it draws a 20-period SMA of OBV with Bollinger Bands set two standard deviations away, plus a fixed 10-period EMA of OBV. A fill between th

Indicator v6 VolumeVolatility & bands
Updated 5 months ago · None stated GitHub repository of On Balance Volume & Bolliner Bands
6 stars

The Capital41 Liquidity Sweep Simple indicator detects liquidity sweeps where price breaks a recent swing high or low then closes back inside the range with volume confirmation. It plots triangular shapes below the bar for bullish sweeps and above for bearish

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · MIT GitHub repository of Capital41 Liquidity Sweep Simple

Institutional CRT State Engine is an overlay indicator that combines Direction of Liquidity (DOL) bias detection with Candle Range Theory (CRT) pattern recognition. It monitors key institutional session windows—including CBDR, Asia, London, London Lunch, and N

Indicator v6 SMC / ICT / price actionSessions & time

TheStrat Suite

by 345-strategies
5 stars

TheStrat Suite is a multi-timeframe price-action indicator that implements Rob Smith's TheStrat on the price chart. It classifies bars, marks inside bars, hammers, shooters, Failed 2s and outside bars, and plots magnitude and exhaustion targets plus stop level

Indicator v6 Candlestick patternsSupport & resistance Repaints
Updated 4 days ago · MPL-2.0 GitHub repository of TheStrat Suite
5 stars

Calculates an adaptive tracking model using a Mechanical Feedback Price Model to measure price innovations. It evaluates positive and negative deviations through peak decay and saturation functions to determine dynamic intensity levels. It applies these intens

Indicator v6 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of Universal Adaptive Tracking

SuperTrend

by SiegerTerpstra
5 stars

This indicator calculates and plots dynamic SuperTrend volatility bands around median price to identify market trend direction. It signals bullish conditions when price stays above the green support line and bearish conditions when price falls below the red re

Indicator v6 TrendVolatility & bands
Updated 9 months ago · None stated GitHub repository of SuperTrend

Elton's Screener

by eltonaguiar
4 stars

Elton's Screener is an indicator that runs in a separate pane and scores one of twenty selectable strategies, or auto-selects a route from the symbol type. It filters signals by a minimum confidence level and a higher-timeframe EMA trend alignment. ATR multipl

Indicator v6 Screeners & dashboardsOscillators & momentum Repaints
Updated 2 days ago · None stated GitHub repository of Elton's Screener

Relative Liquidity Index

by InNoobWeTrust
4 stars

The Relative Liquidity Index measures market volatility and liquidity dynamics by calculating the Relative Strength Index (RSI) of the Average True Range (ATR). Displayed in a separate pane, it highlights low and high liquidity states based on configurable thr

Indicator v6 Volatility & bandsOscillators & momentum
Updated 2 days ago · None stated GitHub repository of Relative Liquidity Index
4 stars

This strategy trades exponential moving average crossovers tailored for the German DAX market during Xetra session hours. It enters long positions on bullish EMA crossovers and short positions on bearish crossovers, provided the bar falls within 09:00 to 17:30

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of DAX Germany Strategy [trugurpala]

MA Spread Histogram

by piecioshka
2 stars

MA Spread Histogram calculates the difference between two configurable moving averages and plots the result as a color-coded column histogram in a separate pane. The histogram bars highlight expanding or contracting momentum across the zero line. When the shor

Indicator v6 Oscillators & momentumMoving averages
Updated 12 days ago · MIT GitHub repository of MA Spread Histogram
2 stars

This indicator calculates RSI and identifies regular and hidden bullish and bearish divergences against price swing pivots in a separate pane. It features an early signal mode that uses a shorter lookback to detect provisional divergence earlier, tracking whet

Indicator v6 Oscillators & momentumDivergence
Updated 4 weeks ago · Custom licence GitHub repository of RSI Divergence Indicator MP v3

Price Action Toolkit

by TamTH-Dev
2 stars

The Price Action Toolkit is an indicator that combines several price action tools on the chart. It calculates the ATR with user-defined length and shows it in a table. It plots multiple Kaufman Adaptive Moving Averages (KAMA) with different lengths and sources

Indicator v6 TrendSupport & resistance
Updated 6 weeks ago · None stated GitHub repository of Price Action Toolkit
2 stars

WaveTrend Oscillator Pro calculates WT1 and WT2 lines derived from exponentially smoothed typical price channels and moving averages. Displayed in a separate pane, it visualises momentum alongside customizable overbought and oversold bands. Crossover signals b

Indicator v6 Oscillators & momentumDivergence
Updated 2 months ago · Custom licence GitHub repository of WaveTrend Oscillator Pro [Vantrade]

Monday Range (Lines)

by alvinng214
2 stars

This indicator plots key levels from historical Monday sessions, including Monday High, Low, Open, Close, and custom ratio levels such as the equilibrium line. Extending these level lines across the trading week, it draws reference levels and labels directly o

Indicator v6 Support & resistanceSessions & time Repaints
Updated 2 months ago · None stated GitHub repository of Monday Range (Lines)
2 stars

Volume Historical Patterns indicator plots volume analysis in a separate pane. It computes an SMA of volume using optional time filtering for NYC hours and identifies the highest volume bar ever seen. Bars receive custom colors based on volume relative to this

Indicator v6 VolumeMoving averages
Updated 3 months ago · Apache-2.0 GitHub repository of Volume Historical Patterns

Lakshmi Zones v3

by voletiramu
2 stars

Lakshmi Zones v3 is an overlay indicator that builds demand and supply boxes from a volume-profile histogram of recent bars, then merges nearby levels and limits how many zones appear and how far they sit from price. Optional plots include a Magic Line channel

Indicator v6 Support & resistanceVolume
Updated 6 months ago · None stated GitHub repository of Lakshmi Zones v3
2 stars

This indicator plots cumulative volume delta as candles in a separate pane. It builds volume delta from lower-timeframe intrabars, either as raw delta or as a percent of volume, and accumulates it until a chosen reset. Resets can follow a higher timeframe, a f

Indicator v6 VolumeDivergence
Updated 8 months ago · None stated GitHub repository of CVD - Cumulative Volume Delta Candles

Average True Range Percent (ATRP)

by mushroom-men-Trading
2 stars

This indicator calculates Average True Range as a percentage of the closing price and plots that value in a separate pane. True range is the largest of the bar range and the gaps from the previous close. An RMA-style average with a warmup correction smooths th

Indicator v6 Volatility & bands
Updated 9 months ago · None stated GitHub repository of Average True Range Percent (ATRP)

Solar Winds

by ankurksoni
1 stars

A separate-pane momentum oscillator that places each bar's midpoint within the highest-high to lowest-low range of a chosen period, default 35 bars. That position is smoothed twice and passed through a Fisher transform to sharpen turning points. It plots a his

Indicator v6 Oscillators & momentum
Updated 3 days ago · None stated GitHub repository of Solar Winds

Kalman vs EMA

by jayadevrana
1 stars

This indicator overlays two smoothed price lines on the chart for comparison. A one-dimensional Kalman filter estimates the current price state and velocity, adjusting based on process noise Q, measurement noise R, and velocity noise qvIn. An EMA of user-defin

Indicator v6 Moving averagesTrend
Updated 4 days ago · MPL-2.0 GitHub repository of Kalman vs EMA

SMC Draw

by skipp-dev
1 stars

This Pine Script v6 library provides drawing wrappers for smart-money chart objects. It exports types for labels, lines and boxes, plus default style arguments and factory methods that build chart points from a bar index or a bar time. Callers create, hide and

Library v6 Repaints
Updated 4 days ago · None stated GitHub repository of SMC Draw

DMI ADX Trend Following

by pineforge-4pass
1 stars

A strategy based on the Directional Movement Index. It enters long when the positive directional line crosses above the negative one and enters short on the opposite cross, reversing the position. An ADX threshold input is defined but not used in the entry con

Strategy v6 Trend
Updated 7 days ago · Apache-2.0 GitHub repository of DMI ADX Trend Following

P Err Continuation 4spaces

by GammaExpansion
1 stars

This indicator calculates the maximum of the close and open prices using the math.max function for each bar. It plots the resulting value as a line in a separate pane below the price chart. The script has no input settings and produces no trading signals, entr

Indicator v6
Updated 7 days ago · MIT GitHub repository of P Err Continuation 4spaces

A standalone test module, plotted in a separate pane, for trade cooldown rules. It implements gates by bar index arithmetic for a global cooldown after a win or loss, a per-direction cooldown after a loss and a session limit on consecutive losses. A scripted s

Indicator v6
Updated 8 days ago · GPL-3.0 GitHub repository of Delta Break and Retest Stage 3 Cooldown Module

DEPV2 B2 · DEVISSO RATIO

by YuceSezar89
1 stars

This indicator plots a Devisso ratio in a separate pane and is meant to run on the daily chart. It accumulates signed close-to-close percent changes into a running total, applies RSI to that total, then takes the absolute change in RSI divided by the change in

Indicator v6 Oscillators & momentum
Updated 13 days ago · None stated GitHub repository of DEPV2 B2 · DEVISSO RATIO

SR+Trend v9

by MuhammadMuhamid
1 stars

An earlier version of a long-only crypto spot strategy that combines multi-timeframe pivot support and resistance with optional trend filters. Entries wait for price to touch a support zone sized by ATR or ticks and then confirm within a few bars. Version 9 ad

Strategy v6 Support & resistanceTrend
Updated 13 days ago · None stated GitHub repository of SR+Trend v9
1 stars

Fractal Spiral draws a geometric spiral in a separate pane and marks price-line crossings against detected swing fractals. It searches a chosen number of bars for up and down fractals, then builds a Golden, Archimedean, or logarithmic spiral around a user-set

Indicator v6 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Fractal Spiral{Morindok}

OHLC Demo

by Alaamo7
1 stars

This script is a basic OHLC demo indicator written in Pine Script version 6. It plots the closing price of the current symbol on a separate pane below the main price chart. Additionally, it displays trading volume in another pane. This educational example help

Indicator v6 Volume
Updated 2 months ago · Custom licence GitHub repository of OHLC Demo

Mean Deviation Loop

by vedkanani123
1 stars

A separate-pane oscillator based on mean absolute deviation. It offers two signal modes: Bollinger-style bands around a chosen moving average of the deviation, or a for-loop score summed across a range of lookbacks and compared with long and short thresholds.

Indicator v6 Oscillators & momentumVolatility & bands
Updated 2 months ago · None stated GitHub repository of Mean Deviation Loop

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