Pine Library · 4,367 open-source scripts

Free Pine Script v6 Scripts (page 27)

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

Risk Interval Derivatives

by tqfoster1035
1 stars

Risk Interval Derivatives is an overlay indicator for E-mini S&P 500 and Nasdaq 100 futures. It detects ES or NQ from the chart symbol, takes a fixed risk interval in points (or a manual override), and plots multiples of that interval above and below the previ

Indicator v6 Support & resistanceVolatility & bands
Updated 10 months ago · None stated GitHub repository of Risk Interval Derivatives

VMC Strat Flex Corrected

by matlaenousse
1 stars

This strategy evaluates market conditions using a combination of WaveTrend, RSI, Stochastic RSI, and a custom Money Flow Index calculation inspired by VuManChu. It enters long positions when multiple oscillators hit oversold thresholds and generate an upward c

Strategy v6 Oscillators & momentumDivergence
Updated 10 months ago · None stated GitHub repository of VMC Strat Flex Corrected
1 stars

A chart-overlay indicator that plots a fast and a slow EMA, pivot-based support and resistance, and buy or sell signals. A signal needs at least four of five conditions: an EMA cross, RSI inside a middle band, price on the correct side of the fast EMA, a volum

Indicator v6 TrendOscillators & momentum
Updated 10 months ago · None stated GitHub repository of Professional Crypto Signals
1 stars

Draws support and resistance boxes from pivot highs and lows on the price chart, with box height set as a multiple of ATR. It also marks price gaps above a minimum percentage, with an option to show filled ones, and draws stop loss and two take profit lines. T

Indicator v6 Support & resistanceVolatility & bands
Updated 11 months ago · Custom licence GitHub repository of Levels S/R Boxes + Gaps + SL/TP
1 stars

Draws a Fibonacci channel on a logarithmic price scale on the price chart. The user sets two high dates and one low date; the script reads monthly highs and lows around those dates, converts them to base-10 logarithms and derives a sloped channel from the two

Indicator v6 Support & resistance Repaints
Updated 1 year ago · None stated GitHub repository of Log Scale Fibonacci (LSF)

Smoothed Heiken Ashi

by turnupdigital
1 stars

An indicator that draws smoothed Heiken Ashi candles on the price chart. Prices are smoothed with a selectable moving average type and length before the Heiken Ashi calculation and again afterwards, using an imported library of average types. Candles are shade

Indicator v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Smoothed Heiken Ashi

Momentum Trend Strategy

by yagyesh-bobde
1 stars

The Momentum Trend Strategy combines the Average Directional Index (ADX), SuperTrend, and Heikin Ashi candle colors to identify and trade trend momentum on the price chart. It enters long or short positions when ADX exceeds an entry threshold and SuperTrend al

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Momentum Trend Strategy

Lab-Doi-01

by theteelek
1 stars

An experimental strategy lab script that tracks a simulated long position between a start date and an end date, drawing dashed vertical lines at both dates and a line for the average entry price. A table at the bottom left shows position size in BTC and open p

Strategy v6
Updated 1 year ago · None stated GitHub repository of Lab-Doi-01

Channel Breakout Strategy

by Studentcodee
1 stars

A Pine v6 strategy that trades a rolling channel breakout on the price chart. It tracks the highest high and lowest low over a length setting, then places a stop order to go long one tick above the upper bound and a stop order to go short one tick below the lo

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

A strategy that trades with two EMAs. A long entry needs price above the short EMA, which is above the long EMA, plus either RSI below a level or price within a tolerance of a recent pivot low. Shorts mirror this in a downtrend near pivot highs. Exits use ATR-

Strategy v6 TrendSupport & resistance
Updated 1 year ago · None stated GitHub repository of Optimized Trading Strategy

Range

by equitymarkets
1 stars

Range calculates relative price ranges across four user-specified currency pairs by comparing high and low values against close prices from a secondary timeframe. It computes the average range across these pairs to establish a baseline volatility benchmark. Th

Indicator v6 Volatility & bandsScreeners & dashboards
Updated 1 year ago · MIT GitHub repository of Range
1 stars

Shows a compact table on the price chart counting down the time left until the next candle closes on several timeframes: 1, 5 and 15 minutes, 1 hour, 4 hours and 1 day. Each row can be switched on or off and given its own colour. The text turns to a warning co

Indicator v6 Screeners & dashboardsSessions & time

This strategy trades S50 TFEX USDTHB contracts on the price chart. It detects swing highs and swing lows with pivot points to generate long entries on swing highs and short entries on swing lows. The ATR indicator calculates dynamic stop-loss distances while t

Strategy v6 Volatility & bandsOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of S50 TFEX Strategy With ATR and Stoploss
1 stars

The IBKR Safe Forex Strategy is a Pine Script v6 strategy that trades forex pairs using crossovers of 10-period and 50-period EMAs, filtered by a 200-period EMA and restricted to London or New York session overlap. It enters long positions on fast EMA above sl

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of IBKR Safe Forex Strategy

RSI形态策略

by fuyuanyuan
1 stars

This indicator evaluates multiple Relative Strength Index (RSI) patterns combined with volume surge criteria to identify potential trend reversals and breakout entries. It tracks five distinct bullish setups, including double bottoms, hook reversals, bullish d

Indicator v6 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of RSI形态策略

COT Legacy

by ivansoft
1 stars

An indicator in a separate pane that plots Commitment of Traders legacy report metrics for the chart symbol, such as open interest, noncommercial, commercial and nonreportable positions and trader counts. Settings pick the metric, direction, data type, a selec

Indicator v6
Updated 1 year ago · None stated GitHub repository of COT Legacy

HalfTrend

by everget
947 stars

HalfTrend plots a trailing trend line on the price chart. It tracks recent highs and lows over an amplitude window and flips between up and down when a simple moving average of highs or lows crosses the tracked extreme and price confirms. The line is blue in a

Indicator v6 TrendVolatility & bands
Updated 12 days ago · GPL-3.0 GitHub repository of HalfTrend

ICT Liquidity Void Fill

by ArunKBhaskar
575 stars

This overlay indicator marks ICT liquidity void fills on the price chart and can show long and short signals. It places a Fibonacci level inside a displacement candle, defaulting to the midpoint, and draws lines in a chosen style. Optional filters limit the fi

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Liquidity Void Fill
257 stars

This overlay indicator tracks sideways consolidations on the SPX price chart and flags breaks above or below that range. It builds a zigzag from the highest and lowest bars inside a loopback window, smooths nearby highs and lows with a rational quadratic kerne

Indicator v6 BreakoutSupport & resistance Repaints
Updated 7 weeks ago · None stated GitHub repository of SPX 30M - Trading Chart
228 stars

This overlay indicator draws an event calendar as a table on the price chart. It offers a multi-month grid or a single month plus an event list. Users set how many months appear before and after the current month, how many columns are used, the reading order,

Indicator v6 Screeners & dashboards
Updated 3 months ago · None stated GitHub repository of Event Calendar [TradersPost]
99 stars

This indicator calculates Bill Williams' Accelerator Oscillator in a separate pane. It forms the median price from high and low, subtracts a slow simple moving average from a fast one to get the Awesome Oscillator, then subtracts a five-period average of that

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Accelerator Oscillator (AC)
92 stars

This indicator plots horizontal liquidation heatlines for long and short positions directly on the price chart overlay. It highlights key price levels where positions face liquidation, color-coding lines and displaying descriptive tags for estimated sizes. The

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 2 months ago · Custom licence GitHub repository of Moon Dev Liq Lines — SOL

BTC MACD Enhanced Tests

by iamrichardD
57 stars

This script provides a unit testing and validation framework designed for testing a Bitcoin MACD trading strategy. It constructs custom TestCase and TestSuite data structures to evaluate mock MACD calculations across market scenarios like bull runs, bear marke

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

This indicator calculates Bollinger Bands from the close with TradingView's built-in ta.bb function and plots them on the price chart. It draws a middle band plus upper and lower bands and fills the area between the outer bands. The length input sets the lookb

Indicator v6 Volatility & bands
Updated 6 months ago · Apache-2.0 GitHub repository of Bollinger Bands Example
53 stars

This strategy evaluates two Relative Strength Index (RSI) indicators across two user-defined timeframes to generate trading signals. The higher-timeframe RSI acts as a trend filter, enabling long trades when above 50 and short trades when below 50. Lower-timef

Strategy v6 Oscillators & momentumTrend
Updated 2 months ago · MPL-2.0 GitHub repository of Customizable Dual-Timeframe RSI Strategy
47 stars

This indicator plots jerk, described as the slope of the slope of the slope of a source series, in a separate pane. It estimates each slope with a rolling least-squares fit over the selected period, then repeats that fit on the slope and again on the resulting

Indicator v6 Oscillators & momentum
Updated 8 months ago · MIT GitHub repository of Acceleration, Slope of Slope (JERK)
46 stars

This overlay indicator draws a set of higher-timeframe candles on the price chart. The user sets the timeframe or lets it select automatically, plus candle count, size, offset, margin, and whether the candles are standard or Heikin Ashi. A table can show the a

Indicator v6 Support & resistanceCandlestick patterns Repaints
Updated 8 weeks ago · None stated GitHub repository of HTF Sweep Model with CISD Table

Price and Longitude Angles

by blueprintresearch-dev
42 stars

Price and Longitude Angles maps planetary longitude to price and plots Gann fan lines from a selected high or low pivot on the price chart. It supports one or two planets, geocentric or heliocentric positions, and single, average, or synodic calculation modes.

Indicator v6 Support & resistanceScreeners & dashboards
Updated 2 weeks ago · None stated GitHub repository of Price and Longitude Angles
38 stars

Synthesizes macroeconomic indicators for the Vietnamese economy into a multi-pillar monitoring engine and composite risk score. It tracks inflation, policy rates, interbank interest rates, GDP growth, exchange rates, and sovereign bond yields using Taylor-rule

Indicator v6 Screeners & dashboards
Updated 5 weeks ago · None stated GitHub repository of MacroAcademic - VN Economy Engine

Zen ABR Range Bands

by Zen-Tim
29 stars

Calculates an Exponential Moving Average baseline surrounded by Average Bar Range bands based on an 8-period bar range calculation. Plots upper and lower channels at 1x, 2x, 3x, and 4x ABR multiples directly on the main price chart. Includes configurable bar h

Indicator v6 TrendVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Zen ABR Range Bands
26 stars

This Pine Script v6 indicator serves as a test script for map and matrix data structures. It initializes a string-to-float map to store the current closing price and constructs a two-by-two floating-point matrix filled with the close, then assigns the current

Indicator v6
Updated 2 months ago · AGPL-3.0 GitHub repository of Feature Matrix - Map + Matrix
23 stars

This indicator detects fair value gap patterns and candle breaks across multiple user-defined timeframes using historical security data requests. It monitors price interaction with specific candle levels and triggers alerts when a break occurs. The main inputs

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 4 weeks ago · Custom licence GitHub repository of Multi-TF FVG Kerze Break Alert

Mylib

by ferranbt
21 stars

This script serves as a minimal utility library written in Pine Script v6. It provides an exported helper function that calculates the sum of two numeric arguments. As a reusable code library, it produces no visual plots, charts, or trading signals, and it con

Library v6
Updated 7 weeks ago · MPL-2.0 GitHub repository of Mylib

Bandz Po3 Profiler

by samuelharting
18 stars

Bandz Po3 Profiler draws an ICT-style power-of-three profile on the price chart. It plots higher-timeframe candles, C1 through C4 sequence boxes, T-Spot zones, CISD marks, fair value gaps, STDV projections, sweeps, midpoints, opens, and liquidity. It also mark

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 weeks ago · MPL-2.0 GitHub repository of Bandz Po3 Profiler
16 stars

This strategy trades Donchian breakouts on the price chart. It enters long or short on a longer channel break and can add further units as price advances by a fraction of ATR, up to a set maximum. Later units risk a smaller share of equity than the first. It e

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 11: Tapered Pyramid

Alighten Pattern B

by alighten-dev
14 stars

Alighten Pattern B is a price-chart indicator that scans stored ZigZag pivots for Pattern B triples and marks long and short signals. It can draw dashed Pattern B levels and an optional ZigZag that traces the structure those signals use. Users can enable or hi

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 2 weeks ago · None stated GitHub repository of Alighten Pattern B

Market Monitor - 15m

by chris-c-thomas
14 stars

Market Monitor - 15m is a directional bias chart overlay designed for 15-minute intraday chart analysis. It calculates a triple exponential moving average ribbon with EMA cloud shading, session VWAP with multiplier bands, prior day levels, a 30-minute opening

Indicator v6 TrendMoving averages
Updated 6 months ago · MIT GitHub repository of Market Monitor - 15m

Relative Strength Index

by deepentropy
13 stars

The Relative Strength Index indicator calculates momentum based on price changes over a specified length and plots the curve in a separate pane. It includes adjustable upper and lower bands, background color fills, and an optional smoothing moving average or B

Indicator v6 Oscillators & momentumMoving averages
Updated 6 months ago · MIT GitHub repository of Relative Strength Index

ICT Cursor

by dbruce1990
12 stars

ICT Cursor is a price action and Smart Money Concepts indicator that identifies 3-bar swing highs and swing lows on the main chart. It dynamically tracks and categorizes swing points into active levels, swept liquidity points, and closed-through structure brea

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of ICT Cursor

Fibonacci strategy

by JoelPasapera
11 stars

This strategy plots a Fibonacci retracement of the previous day's high-low range on the price chart. It places a single long limit order at that level when the bar hour matches the chosen entry hour and the close is below the level. Position size follows the l

Strategy v6 Support & resistanceSessions & time
Updated 5 months ago · Apache-2.0 GitHub repository of Fibonacci strategy
9 stars

Adaptive Supertrend is an overlay indicator that dynamically adjusts its Supertrend band width using a composite conviction score. Conviction is derived from ATR percentile ranking, trend force from EMA distance, and chop detection, narrowing the bands during

Indicator v6 TrendVolatility & bands
Updated 3 days ago · MIT GitHub repository of Adaptive Supertrend

ACE Squeeze

by JasonTeixeira
9 stars

ACE Squeeze plots a cycle-based squeeze oscillator in a separate pane. It builds a histogram and an optional cycle phase line from a base cycle length, sensitivity, and price source, then can adjust the reading with volatility, volume delta, relative range exp

Indicator v6 Oscillators & momentumVolatility & bands
Updated 2 weeks ago · Custom licence GitHub repository of ACE Squeeze
9 stars

Automatic Trendline [Metrify] identifies and draws dynamic support and resistance trendlines directly on the price chart. It detects swing pivots over a configurable lookback window, filtering candidate trendlines through constraints including maximum violatio

Indicator v6 Support & resistanceTrend
Updated 4 months ago · MIT GitHub repository of Automatic Trendline [Metrify]
8 stars

A minimal test script from a Pine Script linter project that checks how a conditional expression wrapped across several lines is parsed. It picks green when the close is above the open and red otherwise, then plots the close in that colour in a separate pane.

Indicator v6
Updated 4 weeks ago · Custom licence GitHub repository of Ternary Wrap Color Probe

TR Foreign Flow

by Enesp4rl4k
7 stars

This indicator plots a histogram of the daily change in foreign ownership ratio for a BIST equity in a separate pane. It loads a static snapshot of free-float ownership percentages, matches each bar to a snapshot date, and plots the difference from the previou

Indicator v6
Updated 7 days ago · MIT GitHub repository of TR Foreign Flow

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