Synced with GitHub · updated today

Free TradingView Pine Scripts

10,850 free, open-source indicators, strategies and libraries for TradingView. Copy any script and paste it into the Pine Editor to use it on your chart.

New scripts by RSS
10,850 scripts

[RS] Splinter Analysis

by ricardosantos79
261 stars

This indicator calculates rolling extreme price levels across a user-specified lookback length and plots them in a separate indicator pane. It includes custom loop functions to evaluate highest and lowest values alongside their corresponding bar indices, as we

Indicator v4 Support & resistance
Updated 4 years ago · None stated GitHub repository of [RS] Splinter Analysis
106 stars

This strategy plots modified Bollinger Bands and an exponential moving average on the price chart. It watches for closes crossing the upper or lower band, optionally filtered by the EMA trend and extra crossover or crossunder checks. Long stops use the recent

Strategy v5 Volatility & bandsMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Bands Modified (Stormer)
99 stars

This indicator calculates John Ehlers' Hilbert Transform sine wave from a chosen price source, defaulting to hlc3. It smooths price, estimates the dominant cycle with a homodyne discriminator, clamps that period between 6 and 50 bars, and extracts phase with a

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Hilbert Transform SineWave

Example 6

by be-thomas
65 stars

This overlay indicator requests the low of a Heikin Ashi series built from the symbol’s regular session and plots that value on the price chart. It builds a regular-session ticker, converts it with heikinashi, then reads the low through security on the chart’s

Indicator v4 Candlestick patterns
Updated 5 days ago · GPL-3.0 GitHub repository of Example 6
47 stars

This indicator applies a square root transform to a user-selected price series and plots the result in a separate pane. The function returns na when the source is negative and raises a runtime error if the source is na. The only input chooses the series, defau

Indicator v6
Updated 8 months ago · MIT GitHub repository of Square Root Transformation (SQRT)

Money Flow Index

by TWODS-CAPITAL
37 stars

Calculates and plots the standard Money Flow Index oscillator using typical price and volume data over a user-defined lookback period. It renders in a separate indicator pane with reference lines at 80 for overbought, 50 for the center line, and 20 for oversol

Indicator v5 Oscillators & momentumVolume
Updated 3 years ago · MIT GitHub repository of Money Flow Index
13 stars

This strategy plots a Noro trend ribbon on the price chart and uses ribbon side changes to choose long or short direction. It opens a long when price is below a high-low corridor during a long bias, and a short when price is above that corridor during a short

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon Q012

This indicator plots a Stochastic RSI in a separate pane on a 0–100 scale. It computes RSI of the source, then a stochastic of that RSI, and smooths the K and D lines with a selectable average including SMA, EMA, and JMA-style options. It marks midline and K/D

Indicator v6 Oscillators & momentum
Updated 2 days ago · MIT GitHub repository of Stoch RSI Advanced [WavesUnchained]

Swing Trade Strategy

by eddiebelaval
7 stars

Swing Trade Strategy evaluates market conditions by aggregating directional signals across ten trend and momentum indicators, including an Arnaud Legoux Moving Average, Relative Momentum Index, Double Exponential Moving Average, Directional Movement Index, and

Strategy v6 TrendOscillators & momentum
Updated 3 months ago · None stated GitHub repository of Swing Trade Strategy

ICT ORB

by alboogycOdR
6 stars

This overlay indicator marks a session opening range on the price chart and filters breakouts with relative volume. Session type, duration, and optional custom start time set the range, and historical ranges can stay on the chart. Full mode can require a liqui

Indicator v5 BreakoutSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of ICT ORB
3 stars

Calculates and plots key session reference levels directly on the price chart, specifically pre-market high and low alongside prior day high and low. Users can adjust how levels project across historical data, toggle line labels, customize spacing, and show pr

Indicator v5 Support & resistanceSessions & time
Updated 5 months ago · None stated GitHub repository of Hooplah High Low + Table
2 stars

Calculates an ATR-based z-score oscillator and normalized volume across multiple assets, screening up to 21 symbols simultaneously. Outlier detection filters extreme standard deviations before normalizing values between 0 and 100. It visualizes the comparative

Indicator v5 Screeners & dashboardsVolatility & bands
Updated 8 months ago · None stated GitHub repository of ATR OSC and Volume Screener

Volume Force (VF)

by mushroom-men-Trading
2 stars

Volume Force (VF) is an indicator that calculates the force of volume behind price movements. It measures price change multiplied by volume and smooths the result using an EMA-style formula with adjustable smoothing period. The script plots the VF line on a se

Indicator v6 VolumeOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Volume Force (VF)
1 stars

A test strategy from a reference corpus that calls a user-defined MACD histogram function on 60-minute, 4-hour and daily data with lookahead off. It goes long when all three histograms are positive and short when all three are negative, closing the opposite po

Strategy v6 Oscillators & momentumTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PF MTF Probe 08 Triple TF MACD Histogram

S_pending_entries

by GammaExpansion
1 stars

S_pending_entries is a strategy that places different types of pending buy and sell orders including limit, stop, and stop-limit orders at specific phases in a 68-bar cycle. It calculates reference price levels around the current close and plots them along wit

Strategy v6 Support & resistanceSessions & time
Updated 6 days ago · MIT GitHub repository of S_pending_entries

HV+D PBJ Bearish v1

by nishpa800
1 stars

Bearish half of a split HV+D and PBJ indicator, drawn on the price chart. It plots 36 sell-side markers that combine high-volume candles, standard deviation displacement and a PBJ moving average and Supertrend filter. Each pattern, such as the DDDD, DDD, Foxtr

Indicator v5 VolumeBreakout
Updated 2 months ago · None stated GitHub repository of HV+D PBJ Bearish v1
1 stars

This strategy plots Donchian upper and lower channels along with the midpoint on the price chart. It generates long signals on a price crossover above the upper Donchian band when volume exceeds a moving average multiple if the filter is enabled, and short sig

Strategy v6 TrendBreakout
Updated 2 months ago · None stated GitHub repository of TN Sovereign Donchian Breakout

Price Alert 2024

by mikeyhu70
1 stars

An overlay that measures how far the current bar has moved from its open, as a percentage, and sends a text alert when the move reaches one of five levels, 2.5, 5, 7.5, 10 and 12.5 percent by default. Both up and down moves are measured by size, and only the h

Indicator v5 Repaints
Updated 6 months ago · None stated GitHub repository of Price Alert 2024

Visible Fibonacci

by ivansoft
1 stars

An indicator that draws Fibonacci retracement levels on the price chart for the part of the chart currently in view. It can base the levels on the high and low of the visible range or on zig zag pivots found within it, with a pivot length setting and an option

Indicator v5 Support & resistance Repaints
Updated 1 year ago · None stated GitHub repository of Visible Fibonacci

DDD-tracker

by Allen1212
303 stars

DDD-tracker is an overlay indicator that marks historical ARK Invest purchases and sales of DDD on the price chart. It draws green buy labels below bars and red sell labels above bars at fixed dates, with a count of how many ARK funds traded the stock that day

Indicator v4
Updated 2 years ago · None stated GitHub repository of DDD-tracker

[RS]Donchian Fans

by ricardosantos79
261 stars

This indicator plots Donchian Channel boundary lines along with dynamic fan projections directly on the price chart. It calculates the highest high, lowest low, and median price over a customizable lookback period. Whenever price establishes a new channel high

Indicator v4 Support & resistanceTrend
Updated 4 years ago · None stated GitHub repository of [RS]Donchian Fans

MultiIndicator

by capissimo
114 stars

MultiIndicator combines multiple technical indicators into a single separate pane to save chart space. It calculates and displays market regime detection based on ordinary least squares regression, a Holt exponential smoothing crossover, normalized RSI, ADX, a

Indicator v4 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of MultiIndicator

This strategy calculates standard Bollinger Bands using a Simple Moving Average and standard deviation multiplier. It enters alternating long positions when price crosses above the lower band and short positions when price crosses below the upper band. Open tr

Strategy v5 Volatility & bandsMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Bands Strategy With StopLoss

This indicator implements John Ehlers' Hilbert Transform Trend vs Cycle Mode algorithm cross-checked against TA-Lib standards. It analyzes dominant cycle periods, phase changes, and sine wave components from a price input to determine whether the market is tre

Indicator v6 Trend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Hilbert Transform Trend vs Cycle Mode (HT_TRENDMODE)

Example 6.1

by be-thomas
65 stars

This indicator retrieves Heikin Ashi candle data for the current symbol and timeframe using the security function. It constructs and plots custom Heikin Ashi candlesticks, coloring them green when the Heikin Ashi close is greater than or equal to the Heikin As

Indicator v4 Candlestick patterns
Updated 5 days ago · GPL-3.0 GitHub repository of Example 6.1
47 stars

Calculates and plots the square root mathematical transformation of a chosen price or series input in a separate pane. This non-linear mapping compresses larger values, helping to stabilize variance across price data. The calculation includes built-in safety c

Indicator v6
Updated 8 months ago · MIT GitHub repository of Square Root Transformation (SQRT)

Morning Doji Star - Bull

by TWODS-CAPITAL
37 stars

The Morning Doji Star Bullish indicator identifies a three-candle bullish reversal pattern consisting of a long black candle, a gapping doji, and a long white candle closing above the midpoint of the first body. It applies optional trend filtering using SMA50

Indicator v5 Candlestick patterns
Updated 3 years ago · MIT GitHub repository of Morning Doji Star - Bull
13 stars

This strategy plots an On-Balance Volume oscillator in a separate pane and applies a fast and a slow exponential moving average to it. It enters long or short when those averages cross, with a strategy type that can reverse, stay long only, or stay short only,

Strategy v5 VolumeMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard QN OBVOsc A002

Structural Wave Field is a market structure indicator that evaluates structural flow, internal wave energy, and structural integrity across multiple time horizons. It combines momentum, velocity, and acceleration with wave segmentation and Elliott-context sequ

Indicator v6 SMC / ICT / price actionTrend
Updated 2 days ago · MIT GitHub repository of Structural Wave Field [WavesUnchained]
6 stars

This indicator tracks Opening Range Breakout (ORB) levels for selected sessions such as New York, London, or custom hours directly on the price chart. It detects market structure shifts (MSS), fair value gaps (FVG), and order blocks to signal potential trade e

Indicator v5 SMC / ICT / price actionBreakout
Updated 7 months ago · None stated GitHub repository of ICT ORB Manual Trading Companion
3 stars

This indicator draws horizontal price bands and an anchor close line directly on the price chart. It projects two tiers of upper and lower boundary lines offset from the closing price by user-specified tick amounts. Each tier allows customization of tick dista

Indicator v5 Support & resistance
Updated 5 months ago · None stated GitHub repository of Horizontal Line Bands

Average Lines

by regalouisei
2 stars

The Average Lines indicator calculates and plots average values of detected pivot highs and pivot lows directly on the price chart. It allows users to set left and right bar counts for pivot detection, choose which averages to display (pivot highs only, lows o

Indicator v5 Moving averagesSupport & resistance
Updated 8 months ago · None stated GitHub repository of Average Lines

Volume Oscillator (VO)

by mushroom-men-Trading
2 stars

This indicator calculates a volume oscillator in a separate pane. It builds short and long simple moving averages of volume with circular buffers, then plots the percentage difference of the short average relative to the long average. A further moving average

Indicator v6 Volume
Updated 9 months ago · None stated GitHub repository of Volume Oscillator (VO)
1 stars

A test strategy from a reference corpus that studies start-up behaviour of a daily 26-period EMA requested from a lower-timeframe chart without lookahead. It goes long while the daily EMA is rising and short while it is falling, closing the opposite position f

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PF MTF Probe 09 Daily EMA Warmup

S_pyramiding_any

by GammaExpansion
1 stars

This strategy acts as a test fixture designed to evaluate Pine Script execution logic around pyramiding limits, position sizing, and order management under the ANY entry closure rule. It uses bar index cycles to execute scheduled entry orders, order reductions

Strategy v6
Updated 6 days ago · MIT GitHub repository of S_pyramiding_any

Gann Octagon

by morindok
1 stars

Gann Octagon projects W.D. Gann geometric price spiral levels directly on the main chart starting from a user-selected anchor candle. The script calculates step sizes dynamically using candle height, adaptive ATR, or a user-defined manual value across up to fi

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Gann Octagon
1 stars

Tick-chart-safe bearish half of a split HV+D and PBJ overlay indicator. It plots 36 sell-side markers that combine high-volume candles, standard deviation displacement and a PBJ moving average and Supertrend filter. Guards give a tick-chart fallback bar length

Indicator v5 VolumeBreakout
Updated 2 months ago · None stated GitHub repository of HV+D PBJ Bearish v1 Tick-Friendly
1 stars

This strategy filters fakeout signals using a 4-layer causal scoring system to ensure high-conviction entries on the price chart. It computes a sovereign score based on volume exceeding a moving average multiplier, alignment with higher-timeframe EMA, minimum

Strategy v6 TrendVolatility & bands Repaints
Updated 2 months ago · None stated GitHub repository of TN Sovereign Fakeout Filter

Price Alert 2024 V2

by mikeyhu70
1 stars

An overlay that measures the percentage move of the current bar from its open and sends a text alert when it reaches one of five positive or five negative thresholds, plus or minus 2.5, 5, 7.5, 10 and 12.5 percent by default. Up and down levels are set indepen

Indicator v5 Repaints
Updated 6 months ago · None stated GitHub repository of Price Alert 2024 V2

VisibleChart

by ivansoft
1 stars

A Pine Script v5 library whose functions return values from the bars currently visible on the chart. It can test whether a bar is visible or is the first or last visible bar, and return the highest high, lowest low, their bar indexes and times, and the opening

Library v5
Updated 1 year ago · None stated GitHub repository of VisibleChart

DE-tracker

by Allen1212
303 stars

This indicator plots labels on the TradingView price chart to mark ARK Invest's buy and sell trades for the DE stock. Buy transactions appear in green with X1 or X2 multipliers showing the number of ARK ETFs involved on the same day; sells appear in red. The m

Indicator v4 Support & resistanceSMC / ICT / price action
Updated 2 years ago · None stated GitHub repository of DE-tracker

[RS]MTF Candle Sticks

by ricardosantos79
261 stars

This indicator overlays up to five higher-timeframe candlestick groups on the price chart. For each enabled timeframe it requests open, high, low, and close and can show up to five candles, offset by a spacing setting. The main inputs set the candle count, the

Indicator v4 Candlestick patternsSupport & resistance Repaints
Updated 4 years ago · None stated GitHub repository of [RS]MTF Candle Sticks
114 stars

This strategy plots a scaled one-bar price change from a chosen timeframe in a separate pane. It enters long when the change crosses above a threshold divided by a divisor and short when it crosses below the negative threshold. Volume can replace price with an

Strategy v4 Oscillators & momentumVolume Repaints
Updated 1 year ago · None stated GitHub repository of Normalized Vector Strategy

Browse by Category

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.

About the Pine Script Library

The ForexR Pine Script Library collects open-source TradingView indicators, strategies and libraries that are published on GitHub. Every script links to its repository, so you can see the author's latest version, issues and licence. Where the licence allows it, the full code is on the script's page, ready to copy into TradingView's Pine Editor. Stars, updates and licences are synced from GitHub every day, and new scripts are added every week.

Each script is read automatically before it is listed: it must declare an indicator, strategy or library for Pine Script version 4 or later, and copies of the same code are listed only once. The summaries and tags are written automatically from the code and the README. They describe what a script does; they are not a recommendation, and nothing here is tested or endorsed by ForexR.

Indicators and backtests describe the past. Check any strategy in the Strategy Tester and on a demo account before you trade with it. CFDs and leveraged forex are complex instruments with a high risk of losing money rapidly.

Pine Script Library FAQ

What is Pine Script?

Pine Script is the programming language of TradingView. Indicators, strategies and libraries written in it run directly on TradingView charts: an indicator draws lines, zones or signals, a strategy places simulated trades that the Strategy Tester reports on, and a library holds functions other scripts can import.

How do I add a Pine Script to my TradingView chart?

Open a script here and press Copy script. In TradingView, open the Pine Editor at the bottom of the chart, create a new indicator or strategy, select all of the template text and paste over it. Press Save, then Add to chart. A strategy's trades appear in the Strategy Tester tab.

Are these Pine Scripts free?

Yes. Every script listed here is published on GitHub, so you can read and use it at no cost. ForexR shows the full code only when the author published it under an open licence, such as MIT, GPL or the Mozilla Public License that TradingView adds to new scripts. For other scripts the Copy button reads the file straight from GitHub. Check the licence before reusing code in your own work.

Why are there no Pine Script v3 or older scripts?

Pine Script versions 1 to 3 are years out of date and miss most of the functions current scripts rely on. The library lists scripts written for versions 4, 5 and 6, and you can filter by version. Version 6 is the current one.

What does "Repaints" mean?

A repainting script can change its signals after the fact: on the live bar, or when it reads a higher timeframe before that bar has closed. Its history then looks better than it would have traded in real time. Scripts where the code or the author says so are marked Repaints, and the "Hide repainting" filter leaves them out.

How does ForexR choose which scripts to list?

A crawler searches GitHub every week for Pine Script files, reads each one and keeps scripts written for Pine version 4 or later in repositories with at least one star. Copies of the same code are listed once, under the most-starred repository. Repositories that ship programs, hide downloads behind passwords or show signs of bought stars are left out. Stars, updates and licences are refreshed from GitHub every day, and the summaries are written automatically from each script's code and README.

Trade on TradingView With a Regulated Broker

Compare brokers that connect to TradingView, with spreads, minimum deposits and leverage side by side.

Compare brokers