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
114 stars

This indicator plots two Hull moving average variants on the price chart and colors them by which line is above the other. When the Kahlman option is on, both averages pass through a simple Kahlman-style smoother controlled by the gain setting. Optional labels

Indicator v4 TrendMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of Hull Trend with Kahlman

Bjorgum Double Tap

by hasnocool
106 stars

Bjorgum Double Tap is a price-chart strategy that detects double-bottom and double-top patterns from pivots. It enters long or short when those patterns form, and it can flip into the opposite direction while a position is open. Targets and stops are Fibonacci

Strategy v5 Support & resistanceBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of Bjorgum Double Tap
99 stars

The Ehlers Elegant Oscillator is a momentum indicator that computes a bounded oscillator value between approximately -1 and +1. It processes the input series through a 2-bar momentum calculation, normalizes the derivative by rolling RMS over 50 bars, applies t

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Elegant Oscillator (EEO)

Example 10

by be-thomas
65 stars

This indicator derives Point and Figure chart data for the current symbol using high/low price sources, a 14-period ATR box size, and a 3-box reversal threshold. It fetches the synthetic Point and Figure open and close prices using the security function and pl

Indicator v4 Trend
Updated 5 days ago · GPL-3.0 GitHub repository of Example 10
47 stars

The Price Channel indicator calculates and plots the dynamic highest high and lowest low over a user-defined lookback period, alongside a central midpoint line. Built using monotonic deques for optimized streaming runtime efficiency, it plots an upper channel

Indicator v6 Support & resistanceVolatility & bands
Updated 8 months ago · MIT GitHub repository of Price Channel (PCHANNEL)

MACD Strategy

by TWODS-CAPITAL
37 stars

This strategy plots on the price chart and builds a MACD line as the difference between a fast and a slow exponential moving average of close, then smooths that line into a signal. The histogram is their difference. It opens a long when the histogram crosses a

Strategy v5 Oscillators & momentumMoving averages
Updated 3 years ago · MIT GitHub repository of MACD Strategy
13 stars

This strategy combines Noro Trend Ribbon directional shifts with High and Low moving average price corridors and ADX momentum filtering. It evaluates market strength using configurable ADX key levels to filter trades during choppy or weak trend conditions. Use

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

This indicator plots a percentage rate of change in a separate pane. It smooths the ROC with a selectable average, draws a signal line and histogram, and colors long and short momentum around a configurable midline and stretch zones. Optional stall detection m

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

RSI + Stoch RSI Overlay

by eddiebelaval
7 stars

This indicator combines the standard Relative Strength Index (RSI) and Stochastic RSI into a single oscillator plot within a separate pane. It calculates RSI from price data and applies stochastic smoothing to derive %K and %D lines. Users can toggle individua

Indicator v6 Oscillators & momentum
Updated 3 months ago · None stated GitHub repository of RSI + Stoch RSI Overlay

CRT State Engine v7.3

by alboogycOdR
6 stars

This TradingView indicator for XAUUSD gold analyzes market structure, order blocks, liquidity pools, and volume profiles to generate entry signals on the price chart. It includes session monitoring engines and risk management modules that can be toggled via in

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 7 months ago · None stated GitHub repository of CRT State Engine v7.3

This strategy calculates double-smoothed Heikin Ashi candles and plots them directly on the price chart alongside a smoothed Relative Strength Index. It evaluates market conditions against external volatility data from an inverse symbol, generating long and sh

Strategy v5 Candlestick patternsOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Heikin Ashi with Session Wicks Strategy
2 stars

Risk-Adjusted Momentum Oscillator plots a normalized momentum oscillator in a separate pane, dynamically scaling momentum by ongoing drawdown risk. It calculates momentum via Rate of Change, Price Momentum, or Log Returns, applying Z-score normalization and ad

Indicator v6 Oscillators & momentumVolatility & bands
Updated 8 months ago · None stated GitHub repository of Risk-Adjusted Momentum Oscillator

Trade Volume Index (TVI)

by mushroom-men-Trading
2 stars

Calculates and plots the Trade Volume Index (TVI) in a separate pane. It tracks price changes relative to a configurable minimum tick threshold to determine whether volume represents buying or selling pressure, accumulating or subtracting volume accordingly. U

Indicator v6 Volume
Updated 9 months ago · None stated GitHub repository of Trade Volume Index (TVI)
1 stars

PF MTF probe - weekly SMA(10) cross is a multi-timeframe trend-following strategy designed to test weekly moving average interactions. It calculates a 10-period Simple Moving Average on a weekly timeframe using request.security without lookahead bias. When the

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PF MTF probe - weekly SMA(10) cross

RSI Reversal

by GammaExpansion
1 stars

This long-only strategy calculates an RSI and a long exponential moving average. It enters when RSI crosses above the oversold level while price is above the trend average and no position is open. It closes when RSI crosses the midline or a mirrored overbought

Strategy v6 Oscillators & momentumMoving averages
Updated 6 days ago · MIT GitHub repository of RSI Reversal

Hacim Sıralaması (ATH)

by YuceSezar89
1 stars

This indicator ranks the current bar’s volume against stored historical volume in a separate pane. On the last bar it shows all-history rank, a percentile, the ratio of current volume to the highest stored volume, and the date of that peak. A comparison window

Indicator v6 VolumeScreeners & dashboards
Updated 12 days ago · None stated GitHub repository of Hacim Sıralaması (ATH)
1 stars

Fibo Wave MA - Auto Path (Plot) is an overlay indicator that projects Fibonacci-based wave structures and moving averages onto the price chart. The script calculates a wave period from two user-selected interactive anchor points and generates a secondary movin

Indicator v5 Moving averagesSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Fibo Wave MA - Auto Path (Plot)

Liquidity Trail Matrix

by vedkanani123
1 stars

A trend indicator on the price chart built from several ATR trail bands whose width follows presets for scalping, balanced or deep trend use. The chosen flip band decides the trend, and retest signals are scored with a minimum score, retest window and cooldown

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Liquidity Trail Matrix
1 stars

A swing strategy on the price chart that takes long signals when a 9 EMA crosses above a 21 EMA with RSI above 50, and shorts on the opposite cross. An optional multi-timeframe filter checks a weekly EMA trend and four-hour RSI momentum before accepting a sign

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign Adv Swing
1 stars

Plots a double-smoothed Bressert stochastic in a separate pane, built from %K and %D lines whose smoothing type can be chosen from a long list of moving averages such as DEMA, EMA, zero-lag variants and Hull-style averages. A second line pair with its own leng

Indicator v5 Oscillators & momentumMoving averages
Updated 6 months ago · None stated GitHub repository of DSS Bressert Stochastic MTF

RiskMetrics

by ivansoft
1 stars

A Pine Script v5 library that tracks compounded monthly return percentages in an array, capped at a maximum number of periods, so that ratio calculations can be built on them. It has an overload for excess returns over a benchmark. Settings include the returns

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

A Pine v4 strategy that plots a 33-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of ZECBTC EMA Cross Strategy

CRM-tracker

by Allen1212
303 stars

This indicator plots historical ARK Invest buy and sell activity for Salesforce (CRM) on the price chart. It places green labels below bars for buys and red labels above bars for sells, using fixed calendar dates and a count of how many ARK ETFs traded that da

Indicator v4
Updated 2 years ago · None stated GitHub repository of CRM-tracker
261 stars

This indicator calculates standardized z-scores of price data across four different lookback periods (6, 14, 26, and 100). Standardizing data subtracts the moving average from the price and divides by the standard deviation. It applies a Double Exponential Mov

Indicator v5 Mean reversionVolatility & bands
114 stars

This strategy plots two Hull Moving Average variations on the main price chart, optionally smoothed with an adaptive Kalman filter algorithm. It enters long positions when the faster moving average crosses above the slower moving average and enters short posit

Strategy v4 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Hull Trend with Kahlman Strategy

Boftei's Strategy

by hasnocool
106 stars

Boftei's Strategy plots the difference between the log of the current close and the close a chosen number of bars earlier in a separate pane. It draws positive and negative histogram bars, a thin line of the same value, and dotted threshold lines. Crosses of t

Strategy v5 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Boftei's Strategy
99 stars

Calculates John Ehlers' Even Better Sinewave indicator to isolate cyclical components in price action. It applies a high-pass filter to remove low-frequency trend components, followed by a Super Smoother filter to reduce high-frequency noise, and normalizes th

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Even Better Sinewave (EBSW)
65 stars

This reference indicator demonstrates how to retrieve symbol data using Pine Script v4 syntax. It calls the security function to request the closing price of BATS:AAPL on the current timeframe with gaps enabled. The resulting values are plotted in a separate p

Indicator v4 Sessions & time
Updated 5 days ago · GPL-3.0 GitHub repository of Example 1: Regular Session Data
47 stars

Price Momentum Oscillator (PMO) calculates a double-smoothed Rate of Change (ROC) to track directional price momentum. It derives the percentage price change over a selected lookback period, applies an initial exponential smoothing pass, and refines it with a

Indicator v6 Oscillators & momentum
Updated 8 months ago · MIT GitHub repository of Price Momentum Oscillator (PMO)

Marubozu Black - Bearish

by TWODS-CAPITAL
37 stars

This indicator detects a bearish black marubozu on the price chart. It treats a candle as a match when the close is below the open, the body is longer than a 14-period exponential average of body size, and both upper and lower shadows are at most five percent

Indicator v5 Candlestick patterns
Updated 3 years ago · MIT GitHub repository of Marubozu Black - Bearish
13 stars

This strategy evaluates market trend direction using a Noro TrendRibbon and creates a price corridor based on recent moving-average extremes, plotting directly on the price chart. It executes long entries when price dips below the corridor during an upward tre

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

This indicator plots a smoothed RSI in a separate pane with a signal line, a 50 midline, and configurable overbought and oversold bands. It colors momentum long or short, fills the oscillator against the signal and the zones, and draws a histogram. Optional ma

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

CRT State Engine v7.6

by alboogycOdR
6 stars

CRT State Engine is an institutional trading framework based on Smart Money Concepts and Candle Range Theory. It plots session ranges, order blocks, Fair Value Gaps, liquidity sweeps, and Draw on Liquidity levels directly on the main price chart. The indicator

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

This strategy plots smoothed Heikin Ashi candlesticks directly on the price chart. It filters entries using CCI and Stochastic crossovers calculated on a separate higher timeframe. Long signals trigger on CCI crossing above 60 and Stochastic crossing above its

Strategy v5 Candlestick patternsSessions & time Repaints
Updated 5 months ago · None stated GitHub repository of Heikin Ashi with Session Wicks Strategy
2 stars

Rolling Z-Score Trend [QuantAlgo] calculates a rolling Z-score using mean and standard deviation over a user-defined lookback window to evaluate statistical price deviations and momentum. Plotted in a separate indicator pane, it displays the rolling Z-score li

Indicator v6 TrendOscillators & momentum
Updated 8 months ago · None stated GitHub repository of Rolling Z-Score Trend [QuantAlgo]

Triangular Moving Average (TRIMA)

by mushroom-men-Trading
2 stars

The Triangular Moving Average (TRIMA) indicator calculates a double-smoothed moving average that places greater weight on the middle values of the chosen lookback period. It dynamically generates a triangular weighting array to smooth price fluctuations and fi

Indicator v6 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of Triangular Moving Average (TRIMA)
1 stars

This strategy is a multi-timeframe parity probe that plots on the price chart. It requests the 60-minute close with lookahead off and treats a change in that value as a higher-timeframe close roll. On each roll it enters one long unit. On the next bar after a

Strategy v6
Updated 6 days ago · Apache-2.0 GitHub repository of PF MTF probe 01 — 60m close roll

S Exit Brackets

by GammaExpansion
1 stars

A backtesting verification strategy designed to test bracket exit order execution rules in Pine Script v6. It automatically triggers long and short entries at predetermined bar index cycles, applying tight and mixed exit brackets using absolute price stops, li

Strategy v6
Updated 6 days ago · MIT GitHub repository of S Exit Brackets
1 stars

Fibo Wave MA - Auto Path Plot is an indicator that calculates and plots base moving averages along with Fibonacci-extended moving averages on the price chart. Users define a custom wave period by setting start and end times t1 and t2, with an adjustable center

Indicator v5 Moving averagesSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Fibo Wave MA - Auto Path Plot
1 stars

Overlay indicator that marks candles whose volume is the highest over 100, 200 and so on up to 1000 bars, plus an all-time high volume marker and a Hot Spot signal. Each level has its own show checkbox. To avoid live-bar flicker, every comparison uses the prio

Indicator v5 Volume
Updated 2 months ago · None stated GitHub repository of High Volume Ranks to 1K
1 stars

A strategy that enters on a 9 and 21 EMA crossover, optionally confirmed by RSI above 40 for longs or below 60 for shorts. Trades must agree with a 200 EMA market filter and a weekly 20 EMA taken from the previous completed week. Position size is set so the di

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign Advanced Swing
1 stars

This Pine v5 indicator draws Future Line of Demarcation lines on the price chart: the price source is shifted forward by half a cycle for up to three cycle periods, with automatic or manual periods and bar multipliers based on the chart timeframe. Projected fo

Indicator v5 Support & resistance Repaints
Updated 6 months ago · None stated GitHub repository of FLD with Projection Simple V4
1 stars

An indicator in a separate pane that calculates Sharpe and Sortino ratios from the chart symbol's periodic returns, using up to a chosen number of monthly or other periods. The comparison can be a fixed annual rate or the returns of a benchmark symbol, in whic

Indicator v5 Screeners & dashboards
Updated 1 year ago · None stated GitHub repository of Sharpe and Sortino Ratios

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