Pine Library · 4,367 open-source scripts

Free Pine Script v6 Scripts (page 62)

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

This indicator estimates a risk score and suggested position size from capital, a user win rate, a profit ratio, and historical price range. It tracks each year's high and low, converts that range into a drawdown percentage, and plots a weighted average of the

Indicator v6 Volatility & bands
Updated 8 months ago · None stated GitHub repository of Nasan Risk Score & Postion Size Estimator

Signal Forge

by jayadevrana
1 stars

Signal Forge is a multi-filtered trend-following indicator displayed on the main price chart. It calculates an ATR trailing stop line alongside a long-term EMA baseline to identify market direction. Raw signal flips are filtered through ADX chop detection, a v

Indicator v6 TrendVolatility & bands
Updated 4 days ago · MPL-2.0 GitHub repository of Signal Forge

SMC Setup Check

by skipp-dev
1 stars

SMC Setup Check is a diagnostic utility indicator designed to verify chart-link bindings between the chart and the SMC Long-Dip Suite. It inspects external source inputs including schema version, state code, armed status, quality score, trigger, and invalidati

Indicator v6 Screeners & dashboardsSMC / ICT / price action
Updated 4 days ago · None stated GitHub repository of SMC Setup Check

Input Source History Subscript

by pineforge-4pass
1 stars

This strategy detects momentum turns by subtracting consecutive values of an input source. It defines src as a user-configurable source defaulting to hl2, the average of high and low prices. Momentum is calculated as the current src minus src one bar ago, and

Strategy v6 Oscillators & momentum
Updated 7 days ago · Apache-2.0 GitHub repository of Input Source History Subscript

P_err_request_financial

by GammaExpansion
1 stars

This indicator requests the quarterly total revenue figure for the chart symbol through request.financial and plots that series in a separate pane. It uses the symbol ticker and the TOTAL_REVENUE field on a fiscal-quarter timeframe. There are no user inputs, n

Indicator v6
Updated 7 days ago · MIT GitHub repository of P_err_request_financial

Market Structure Physics Lab

by rosijay17-cmd
1 stars

An overlay indicator that marks confirmed swing pivots and builds ATR-width structure zones around them. It adds CUSUM change-point markers, relative volume, lower-timeframe delta pressure, compression and trend-efficiency readings, then labels how each zone t

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 8 days ago · GPL-3.0 GitHub repository of Market Structure Physics Lab

DEPV2 Debug S12

by YuceSezar89
1 stars

DEPV2 Debug S12 is a multi-symbol research indicator designed to analyze market signals across up to 20 configurable cryptocurrency pairs. It evaluates conditions using four distinct categories: trend, momentum, volatility, and volume. Users can configure sing

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 Debug S12

Volatility Momentum Score

by vedkanani123
1 stars

A separate-pane oscillator that combines a Z-score of price with a Z-score of volatility into one score, then applies bands from a band length with separate positive and negative multipliers. A signal type setting chooses how it is read, and optional signs mar

Indicator v6 Oscillators & momentumVolatility & bands
Updated 2 months ago · None stated GitHub repository of Volatility Momentum Score

Draws volume order block zones with asymmetric signals on the price chart, then adds a proximity layer that checks how close those signals sit to high-volume, displacement and tier conditions. Version 1.1 is a tick-friendly build. It is an indicator only.

Indicator v6 SMC / ICT / price actionVolume
1 stars

Tn Adaptive Risk Regime v6 is a strategy that switches between mean reversion and breakout modes based on volatility regime. It compares ATR to its SMA over a lookback to classify high or low volatility. Low volatility triggers mean reversion by fading range e

Strategy v6 Volatility & bandsMean reversion
Updated 2 months ago · None stated GitHub repository of Tn Adaptive Risk Regime v6

Greedy Strategy

by ivansoft
1 stars

A strategy that places stop entry orders around price gaps and recent candles. It buys on a stop above the previous high after an upward gap, sells on a stop below the previous low after a downward gap, and adds same-direction entries when the open position's

Strategy v6 Breakout
Updated 1 year ago · None stated GitHub repository of Greedy Strategy
228 stars

This indicator plots market structure on the price chart by identifying swing highs and lows. It connects these points with lines to visualize trend direction and detect Break of Structure (BOS) when price breaks a prior swing in the current trend. Change of C

Indicator v6 TrendSupport & resistance
Updated 3 months ago · None stated GitHub repository of Market Structure - BOS & CHoCH

Bollinger %B (BBB)

by mihakralj
99 stars

This indicator calculates the Bollinger Bands %B oscillator, measuring the position of price relative to the upper and lower Bollinger Bands. A value of 1 represents the upper band, 0 represents the lower band, and 0.5 indicates the middle band. Standard refer

Indicator v6 Oscillators & momentumVolatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of Bollinger %B (BBB)
47 stars

This indicator applies the exponential transformation y equals e to the power x to a user selected input series. The function computes the transformed values using a runtime validated implementation that errors on non numeric data. The result series plots in a

Indicator v6
Updated 8 months ago · MIT GitHub repository of Exponential Transformation (EXP)
16 stars

This strategy trades Donchian channel breakouts and can go long or short. It sizes the first unit from a percent of equity and an ATR stop, then adds smaller fractional units only when RSI confirms momentum. It exits with an ATR initial stop, a chandelier trai

Strategy v6 TrendOscillators & momentum
Updated 12 months ago · None stated GitHub repository of Seykota Alt 34: Fract + Momentum
9 stars

FlowBias calculates a composite market momentum metric using Chaikin Money Flow, volume delta, Stochastic, and the Ultimate Oscillator. Plotted in a separate pane, it identifies trend pullbacks and market exhaustion reversals through visual signals and labels.

Indicator v6 TrendOscillators & momentum
Updated 3 days ago · MIT GitHub repository of FlowBias [WavesUnchained]
7 stars

Aivance Opening Range & Vol Factor identifies the first candle of each new trading day, plotting its high, low, open, and close levels with colored boxes and lines directly on the chart. It calculates a Volume Factor percentage by comparing the opening bar vol

Indicator v6 Sessions & timeVolume
Updated 3 months ago · None stated GitHub repository of Aivance Opening Range & Vol Factor
4 stars

This strategy combines a standard Moving Average Convergence Divergence (MACD) crossover signal with an exponential moving average (EMA) trend filter. Long positions are entered when the MACD crosses above its signal line while price is above the trend EMA. Sh

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · MIT GitHub repository of MACD Strategy [trugurpala]

Options Max Pain Calculator [BackQuant] estimates options max pain theory levels, pin risk zones, and market maker gamma exposure directly on the price chart. It models strike prices, put/call volume ratios, implied volatility, and dealer hedging parameters to

Indicator v6 Support & resistance
Updated 8 months ago · None stated GitHub repository of Options Max Pain Calculator [BackQuant]

Garman-Klass Volatility (GKV)

by mushroom-men-Trading
2 stars

The Garman-Klass Volatility indicator measures market volatility using open, high, low, and close prices on a logarithmic scale. By accounting for intraday high-low range alongside opening and closing prices, it offers a more detailed volatility measure than s

Indicator v6 Volatility & bands
Updated 9 months ago · None stated GitHub repository of Garman-Klass Volatility (GKV)

Signal Forge

by jayadevrana
1 stars

This indicator calculates an ATR-based trailing stop and combines it with a 200-period baseline EMA to identify trend reversals on closed candles. To eliminate false breakouts, it filters signals through an ADX chop detector, a relative volume threshold, and a

Indicator v6 TrendMoving averages
Updated 4 days ago · MPL-2.0 GitHub repository of Signal Forge

SMC Structure Context

by skipp-dev
1 stars

The SMC Structure Context indicator overlays visual elements on the price chart to represent the current market structure state. It displays a state label indicating bullish, bearish, or neutral conditions, along with markers for change of character (CHoCH) an

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 4 days ago · None stated GitHub repository of SMC Structure Context

Input Source Runtime Override

by pineforge-4pass
1 stars

This strategy computes two simple moving averages on a selectable price source and plots them on the price chart. The source defaults to close but can be overridden at runtime via the input panel, for example to high. It signals long entries on fast SMA crossi

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of Input Source Runtime Override

P_err_request_security

by GammaExpansion
1 stars

P_err_request_security is a minimal Pine Script v6 test fixture designed to evaluate multi-timeframe security requests. It retrieves the daily closing price of the current ticker symbol using request.security and plots the resulting value in a separate indicat

Indicator v6
Updated 7 days ago · MIT GitHub repository of P_err_request_security
1 stars

A strategy for MNQ futures that trades with the trend only when a regime score allows it. The score blends higher-timeframe EMA bias, ADX, choppiness, efficiency ratio and persistence, with separate enter and hold thresholds. Four switchable triggers can open

Strategy v6 TrendSessions & time Repaints
Updated 8 days ago · GPL-3.0 GitHub repository of MNQ Multi-Trigger Trend Continuation

DEPV2 DEBUG S13

by YuceSezar89
1 stars

This multi-symbol indicator monitors up to twenty cryptocurrency pairs and evaluates signals across four core dimensions: trend, momentum, volatility, and volume. It allows traders to configure signal generation through individual dimensions, simultaneous mult

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S13

Symmetric Attraction

by morindok
1 stars

Symmetric Attraction is an indicator that plots mirrored candles on the price chart by reflecting OHLC data around a regression basis line. The basis is computed using linear regression on the selected source with an optional logarithmic transformation. It als

Indicator v6 Candlestick patternsSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Symmetric Attraction

Volatility Momentum Suite

by vedkanani123
1 stars

A separate-pane momentum tool built on a smoothed rate of change with a signal line and standard deviation bands. It also measures acceleration of that momentum with its own moving average and smoothing length. Display options include classic or Heikin Ashi va

Indicator v6 Oscillators & momentumVolatility & bands
Updated 2 months ago · None stated GitHub repository of Volatility Momentum Suite

Draws volume order block zones with asymmetric signals on the price chart, then adds a proximity layer that checks how close those signals sit to high-volume, displacement and tier conditions. Version 1.2 is a tick-friendly build. It is an indicator only.

Indicator v6 SMC / ICT / price actionVolume
1 stars

A strategy that switches logic by volatility regime, measured as the percentile rank of ATR as a percent of price over 200 bars. In low volatility it buys RSI below 30 and sells above 70. In the middle regime it follows a 20 and 50 EMA crossover, with longs al

Strategy v6 Volatility & bandsMean reversion
Updated 2 months ago · None stated GitHub repository of TN Adaptive Vol Regime
1 stars

A strategy built on Keltner Channels. The middle line is a simple or exponential moving average and the bands sit a multiple of the average true range, true range or high-low range away. When the source crosses above the upper band it places a long stop order

Strategy v6 Volatility & bandsBreakout
Updated 1 year ago · None stated GitHub repository of Keltner Channels Strategy
228 stars

The Mean Reversion Strategy Template calculates a baseline mean using SMA, EMA, or VWAP alongside upper and lower deviation bands based on standard deviation, ATR, or percentage offsets. It generates long and short entries when price touches, bounces from, or

Strategy v6 Mean reversionMoving averages
Updated 3 months ago · None stated GitHub repository of Mean Reversion Strategy Template
99 stars

This overlay indicator calculates Bollinger Bands from a rolling mean and standard deviation and Keltner Channels from a simple moving average plus ATR-smoothed true range. A dedicated function returns whether a squeeze is on, the bandwidth, and the band and c

Indicator v6 Volatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of Bollinger Band Squeeze (BBS)
47 stars

Exponential Transformation (EXP) applies a natural exponential function to a selected price or indicator series. Calculated using Pine Script's built-in exponential math function, it transforms the input source into an exponentially scaled series plotted in a

Indicator v6
Updated 8 months ago · MIT GitHub repository of Exponential Transformation (EXP)
16 stars

This price-chart strategy enters long when close breaks the prior Donchian high and short when it breaks the prior low, after a volume check and an optional moving-average regime filter. The first unit risks a percent of price against an ATR stop. Later units

Strategy v6 TrendBreakout Repaints
Updated 12 months ago · None stated GitHub repository of Seykota Alt 35: Fract + Time

This daily-timeframe indicator provides futures market context by evaluating open interest and term structure without altering chart price scales. It requests front-month and next-month futures contracts to measure spread relationships like contango or backwar

Indicator v6 VolumeScreeners & dashboards
Updated 3 days ago · MIT GitHub repository of Futures Context Module [WavesUnchained]

MTF EMA [trugurpala]

by trugurpala
4 stars

This indicator plots exponential moving averages of close from the daily, weekly, and monthly timeframes on the price chart. Each series uses the same user-set length and is requested with a one-bar historical offset. Toggles show or hide the daily, weekly, an

Indicator v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of MTF EMA [trugurpala]

Prime Numbers

by regalouisei
2 stars

Prime Numbers is a mathematical indicator that performs prime number calculations directly on the chart. It provides modes for prime factorization, listing prime numbers, and finding specific prime numbers using either the security's close price or custom inte

Indicator v6 Repaints
Updated 8 months ago · None stated GitHub repository of Prime Numbers

High-Low Volatility (HLV)

by mushroom-men-Trading
2 stars

This indicator calculates High-Low Volatility using the Parkinson estimator based on high and low prices. It smooths the raw estimator with a running moving average and optionally annualizes the result using a specified number of periods per year. The resultin

Indicator v6 Volatility & bands
Updated 9 months ago · None stated GitHub repository of High-Low Volatility (HLV)

Simple Trend Painter

by jayadevrana
1 stars

Simple Trend Painter is an overlay indicator that colors chart candles based on their position relative to a simple moving average. Candles are painted green when closing above the moving average and red when closing below it. The script plots the SMA line on

Indicator v6 TrendMoving averages
Updated 4 days ago · MPL-2.0 GitHub repository of Simple Trend Painter

SMC Utils

by skipp-dev
1 stars

SMC Utils is a Pine Script library providing helper functions for Smart Money Concepts indicators and strategies. It features functions for value range checks, range overlap determination, lower-timeframe selection, formatting price levels and trend states, dy

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

Leverage Margin Call Perp 5x

by pineforge-4pass
1 stars

This strategy is a validation probe that opens one oversized long on the first flat bar at or after bar index 50 and never issues a close or exit. It sets required margin to 20 percent, which corresponds to 5x leverage, and sizes quantity from a five-million n

Strategy v6
Updated 7 days ago · Apache-2.0 GitHub repository of Leverage Margin Call Perp 5x

P_err_strategy_risk

by GammaExpansion
1 stars

This minimal strategy demonstrates Pine Script risk management functions by enforcing a maximum drawdown limit of ten percent of equity. The script enters a long position whenever a candle closes higher than its opening price. It plots the current position siz

Strategy v6 Candlestick patterns
Updated 7 days ago · MIT GitHub repository of P_err_strategy_risk

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