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

CRNT-tracker

by Allen1212
303 stars

This overlay indicator marks recorded ARK Invest activity on the CRNT price chart. In the provided code it places a green buy label below the bar at a fixed historical date, with the text Buy and X1. An ETF input is present but offers only ALL, so it does not

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

Function Markov Process

by ricardosantos79
261 stars

Function Markov Process is a Pine Script indicator function that models market state transitions using a three-by-three Markov chain transition matrix. It evaluates historical data categorized into bullish, bearish, or stagnant regimes (represented by values 1

Indicator v5 AI / machine learning
Updated 4 years ago · None stated GitHub repository of Function Markov Process
114 stars

This indicator plots a trend-following band directly on the price chart by comparing two variations of the Hull Moving Average, with an optional Kahlman filter applied to both. Line A calculates a standard Hull MA on selected price data, while Line B calculate

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

Boilerplate

by hasnocool
106 stars

Boilerplate is a foundational framework designed for automated strategy development. It integrates multi-timeframe Exponential Moving Average (EMA) and Average Directional Index (ADX) filters to avoid trading counter-trends or choppy markets, along with a sess

Strategy v5 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Boilerplate
99 stars

Calculates John Ehlers' Fisher Transform oscillator and a delayed signal line. The indicator normalizes price data within a lookback period to a bounded scale, applies exponential smoothing, and uses logarithmic transformation to convert price distributions in

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Fisher Transform (FISHER)

Example 2

by be-thomas
65 stars

This indicator renders custom OHLC bars in a separate chart pane using the plotbar function. It determines the color of each bar dynamically based on price action: bars where the closing price is greater than or equal to the opening price are colored lime, whi

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

This indicator calculates price relative strength as the ratio of a base price series to the close of a comparison symbol. It plots the raw ratio and an exponentially smoothed ratio in a separate pane. Smoothing length controls the EMA and hides the smoothed p

Indicator v6 Oscillators & momentum
Updated 8 months ago · MIT GitHub repository of Price Relative Strength (PRS)

Marubozu White - Bullish

by TWODS-CAPITAL
37 stars

This indicator detects a bullish white Marubozu on the price chart. It marks a white candle whose body is longer than a 14-bar exponential moving average of body size and whose upper and lower shadows are each no larger than five percent of that body. When the

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

This strategy pairs the Noro Trendribbon directional filter with price corridors formed by high and low moving averages. In an uptrend, it initiates long trades when price pulls below the upper band corridor, while in a downtrend it enters short positions when

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

This indicator calculates and plots multi-timeframe support and resistance zones using ATR-based reversal structure swings. It builds zones across configurable higher timeframes and the current chart timeframe, applying scoring based on touch quality, rejectio

Indicator v6 Support & resistance
Updated 2 days ago · MIT GitHub repository of S/R Zones MTF [WavesUnchained]

Session Volume Averages

by eddiebelaval
7 stars

This indicator plots trading volume bars in a separate pane alongside historical volume benchmarks for up to three user-defined trading sessions. For each active session, it calculates two benchmarks over a selectable sample size of past sessions: an overall s

Indicator v6 VolumeSessions & time
Updated 3 months ago · None stated GitHub repository of Session Volume Averages
6 stars

This indicator draws the high and low of one selected higher-timeframe candle as horizontal lines on the price chart. It reads the 4-hour or 1-hour candle that starts at a chosen New York hour (1 AM, 5 AM, or 9 AM) and extends both levels for a user-set number

Indicator v5 Support & resistanceSessions & time Repaints
Updated 7 months ago · None stated GitHub repository of Dual-Mode CRT Levels (Corrected)
3 stars

Hercules Indicator 1.7 is a multi-filter trade signal generator designed to overlay entry conditions directly on the price chart. It evaluates engulfing candle patterns alongside multiple configurable filters, including trading session windows (Sydney, Tokyo,

Indicator v5 Candlestick patternsSessions & time
Updated 5 months ago · None stated GitHub repository of Hercules Indicator 1.7

3D Engine

by regalouisei
2 stars

This indicator draws a projected three-dimensional mesh on the price chart. It builds vector, face, mesh, camera and 4x4 matrix types, then applies scale, rotation and view transforms before projecting the scene with a field of view and near and far planes. In

Indicator v5
Updated 8 months ago · None stated GitHub repository of 3D Engine
1 stars

This strategy monitors two higher timeframes of 60 minutes and 240 minutes. It calculates whether the close on each timeframe exceeds the prior bar close, then checks if both are rising. When both conditions hold and no position exists, it enters a long trade

Strategy v6 Trend
Updated 6 days ago · Apache-2.0 GitHub repository of PF MTF probe 02 — dual TF closes
1 stars

This strategy tests and demonstrates TradingView risk management using strategy.risk.max_intraday_filled_orders. It tracks the bar count within each day, triggering long entries and position exits across the initial bars of a trading session. Once the maximum

Strategy v6
Updated 6 days ago · MIT GitHub repository of S Risk Max Intraday Filled Orders

Devis'So Ratio Label

by YuceSezar89
1 stars

Devis'So Ratio Label draws a small numeric label on the price chart. It accumulates percentage moves between consecutive closes, runs an RSI on that series, and divides the RSI change by the change in the cumulative series. Each label shows the ratio and a sho

Indicator v5 Oscillators & momentum
Updated 12 days ago · None stated GitHub repository of Devis'So Ratio Label

Meridian Flow

by vedkanani123
1 stars

A market structure indicator on the price chart. It finds swing pivots, labels them HH, HL, LH and LL, and marks break of structure and change of character events using close or wick confirmation. Order blocks can be created from those events, tracked until mi

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of Meridian Flow

HUB 1020 1153am

by nishpa800
1 stars

A signal hub indicator that bundles many detection groups into plots on the price chart. Groups include White Flag momentum, overlap and super patterns, fauna clusters, relative volume windows, first two bars, a swing bottom and a pullback-and-jump follow-up b

Indicator v5 VolumeSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of HUB 1020 1153am
1 stars

This strategy calculates fast and slow exponential moving averages alongside the Average Directional Index. It plots both moving averages on the price chart and displays an on-screen table tracking trend strength, directional bias, and volatility. A long posit

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Tn Sovereign ADX Trend

Gann Box 2024

by mikeyhu70
1 stars

This indicator draws a Gann box on the price chart between the latest swing high and swing low found within a lookback window, with Fibonacci-style percentage levels, labels and optional grid lines. Gann fans, angles and curves can be turned on, and the box ca

Indicator v5 Support & resistance
Updated 6 months ago · None stated GitHub repository of Gann Box 2024

Strategy

by ivansoft
1 stars

A Pine Script v5 library of helper functions for strategy scripts. It converts a percentage of the average entry price into ticks, price levels or currency amounts, which helps when placing percentage-based stop loss and limit exits. Inputs set a percent stop

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

CRS-tracker

by Allen1212
303 stars

This overlay indicator marks ARK Invest activity on the CRS price chart. It places a single green label below the bar at the timestamp 17 January 2020 with the text Buy and X1. An ETF input is present but only offers the option ALL, so it does not switch among

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

My Script

by ricardosantos79
261 stars

This indicator plots a normalized candle dynamic visualization inside a custom 500x500 Gann square grid within a separate pane. It normalizes each bar's open and close prices relative to its high-low range, storing the resulting coordinate pairs in fixed-size

Indicator v5 Support & resistanceCandlestick patterns
Updated 4 years ago · None stated GitHub repository of My Script

JMA-HMA-based Scalper

by capissimo
114 stars

This price-chart indicator builds a fast-minus-slow Jurik moving average of the selected price and wraps that series in upper and lower bands set by a standard-deviation multiplier and the fast lookback. It reads band direction, whether both bands rise or fall

Indicator v4 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of JMA-HMA-based Scalper

A strategy based on Bollinger Bands that enters long positions when price crosses above the lower band and short positions when price crosses below the upper band. Take-profit, stop-loss, and scale-in price levels are dynamically calculated from the position a

Strategy v5 Volatility & bandsMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Band Strategy with Split, Limit, Stop
99 stars

This indicator plots John Ehlers’s 2004 Fisher Transform in a separate pane. It normalizes the midpoint of high and low over a rolling highest-lowest range, applies recursive smoothing, and clamps the result before taking a scaled inverse hyperbolic tangent wi

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

Example 3

by be-thomas
65 stars

Example 3 is a basic demonstration indicator written in Pine Script v4 that illustrates how to plot custom candlesticks using the plotcandle function. It calculates a modified closing price by checking whether the bar is bullish, defined as the close being gre

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

Rate of Change (ROC)

by mihakralj
47 stars

This indicator plots the absolute price change between the current source value and the value a set number of bars earlier. It draws a single ROC line in a separate pane. The source series and lookback length are the main settings. During warm-up the lookback

Indicator v6 Oscillators & momentum
Updated 8 months ago · MIT GitHub repository of Rate of Change (ROC)

Mass Index

by TWODS-CAPITAL
37 stars

The Mass Index is a volatility indicator that measures price range fluctuations. It calculates the ratio of the 9-period exponential moving average of the high-low span to the 9-period exponential moving average of that span, then sums the result over the inpu

Indicator v5 Volatility & bands
Updated 3 years ago · MIT GitHub repository of Mass Index
13 stars

A trend-following strategy that combines the Noro TrendRibbon direction filter with high and low moving average corridors. It determines the dominant market direction from the trend ribbon and opens positions when price moves outside the corridor, taking long

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

Signal Quality Engine [WavesUnchained] is a range-fade indicator that identifies exhaustion at range extremes and signals potential reversals. It applies an ADX and EMA slope regime gate to stand down during strong trends. Using distance, structure, and moment

Indicator v6 Mean reversionSupport & resistance
Updated 2 days ago · MIT GitHub repository of Signal Quality Engine [WavesUnchained]
7 stars

Smart Krypto Futures Daytrade Suite is an all-in-one technical indicator tailored for intraday cryptocurrency trading. It plots higher-timeframe supply and demand zones, Fair Value Gaps with optional mitigation filtering, session VWAP, dynamic moving averages,

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 3 months ago · None stated GitHub repository of Smart Krypto Futures Daytrade Suite
6 stars

This indicator draws high and low levels from a chosen one-hour or four-hour candle that starts at a selected New York hour. It stores those prices once each New York day, plots them as lines on the price chart, and extends the lines for a user-set number of s

Indicator v5 Support & resistanceSessions & time Repaints
Updated 7 months ago · None stated GitHub repository of Dual-Mode CRT Levels (Corrected)

Hercules Rewrite

by g-moe
3 stars

Hercules Rewrite is a signal and visual trade management indicator that overlays entry setups directly on the price chart. It detects candle setups based on minimum tick movement and engulfing patterns, filtering entries through parameters like moving averages

Indicator v5 Candlestick patternsTrend
Updated 5 months ago · None stated GitHub repository of Hercules Rewrite

This indicator plots harmonic ratio levels from three user-selected points on the price chart. It reads the high, low and close at points A, B and C, then classifies the range and projects a last ratio chosen from 2.24, 2.618, 3.14 or 3.618. Labels can show AB

Indicator v5 Support & resistanceScreeners & dashboards
Updated 8 months ago · None stated GitHub repository of ABC 123 Harmonic Ratio Custom Range Interactive

True Range

by mushroom-men-Trading
2 stars

This indicator calculates and plots the standard True Range metric for each bar in a separate chart pane. The True Range measures market volatility by taking the maximum value among three price differences: current high minus current low, absolute difference b

Indicator v6 Volatility & bands
Updated 9 months ago · None stated GitHub repository of True Range

PF MTF probe 03 — 60m SMA(20)

by pineforge-4pass
1 stars

The strategy computes the 20-period SMA on the 60-minute timeframe using request.security to obtain the HTF series. It generates long signals on SMA crossovers where the HTF close crosses above the SMA from below and exits long positions on downward crossovers

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PF MTF probe 03 — 60m SMA(20)

S Trailing

by GammaExpansion
1 stars

S Trailing is a Pine Script v6 strategy that applies trailing stops to periodic cycle-based entries. It divides the bar index into cycles of 40 bars and activates at specific phases: long entry with trailing price stop at phase 0, short entry at phase 14, plus

Strategy v6 Mean reversionScalping
Updated 6 days ago · MIT GitHub repository of S Trailing

Equity Curve (SuperTrend)

by YuceSezar89
1 stars

This indicator uses the SuperTrend to generate direction changes that calculate segment returns and update a cumulative equity curve. It starts with a balance of 100 and compounds returns for each signal segment until the next direction change, then plots the

Indicator v5 TrendVolatility & bands
Updated 12 days ago · None stated GitHub repository of Equity Curve (SuperTrend)
1 stars

This indicator draws Fibonacci-based time projections as horizontal lines and price projections as vertical lines on the price chart. Users select a start time and candle, then set the number of bars for time steps and initial price gap. The script calculates

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Fibonacci Time & Price Projection

MTF Trend Signals

by vedkanani123
1 stars

A separate-pane indicator adapted from the AK MACD Bollinger Bands idea. It draws MACD-based Bollinger bands whose fill colour follows RSI against its moving average and the 55 and 45 levels. Buy and sell markers come from multi-timeframe alignment, using an a

Indicator v6 Oscillators & momentumTrend
Updated 2 months ago · None stated GitHub repository of MTF Trend Signals

HUB 1020 1153am Bear

by nishpa800
1 stars

A bearish mirror of a signal hub indicator that bundles many detection groups into plots on the price chart. Groups include White Flag momentum, overlap and super patterns, fauna clusters, relative volume windows, first two bars, a swing top and a pullback-and

Indicator v5 VolumeSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of HUB 1020 1153am Bear

TN Sovereign Audit

by raybird
1 stars

A strategy on the price chart that scores each bar from 0 to 4 using four checks: volume against its average, price against a higher-timeframe EMA, bar movement against an ATR noise level, and a fast EMA above a slow EMA. The score maps to signal grades, and a

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign Audit

Gann Box 2024

by mikeyhu70
1 stars

This indicator draws a Gann box on the price chart between the latest swing high and swing low found within a lookback window, with Fibonacci-style percentage levels, labels and optional grid lines. Gann fans, angles and curves can be turned on, and the box ca

Indicator v5 Support & resistance
Updated 6 months ago · None stated GitHub repository of Gann Box 2024

Strategy Helpers

by ivansoft
1 stars

A Pine Script v5 library of helper functions for strategy scripts. It converts a percentage of the entry price into ticks, a price level or a currency amount, converts between prices and ticks, and reports the profit of the open position as a percentage if it

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

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