Synced with GitHub · updated yesterday

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

Relative Bandwidth Filter

by regalouisei
2 stars

Calculates normalized bandwidth readings across various volatility channel types including Bollinger Bands, Keltner Channels, and Donchian Channels. It compares bandwidth values against a secondary band baseline to evaluate relative volatility expansion or con

Indicator v5 Volatility & bandsMoving averages
Updated 8 months ago · None stated GitHub repository of Relative Bandwidth Filter

PF probe wunder-scalper-probe-02-alert-message-templates is a strategy that generates long and short signals using a fast EMA of 5 crossing above a slow EMA of 13 on the price chart. It places fixed-size entries of 1 share on each crossover signal and emits al

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe wunder-scalper-probe-02-alert-message-templates

Super Mirror Guide

by morindok
1 stars

Projects two vertical guide lines forward from a pivot time the user selects, drawn on the price chart. It builds a Fibonacci number sequence between a minimum and maximum bar count, finds the next number in that progression, and places one line at 0.618 of th

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Super Mirror Guide

ZZC Market Structure Sovereign v6 is a trend-following strategy that combines directional pivot tracking with Keltner-style volatility corridors. It calculates pivot highs and lows alongside an EMA baseline bounded by ATR corridors. A long entry is triggered w

Strategy v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of ZZC Market Structure Sovereign v6

MYNA-tracker

by Allen1212
303 stars

This indicator visualizes historical buy and sell transactions executed by ARK Invest exchange-traded funds for the ticker MYNA. Plotted directly on the price chart, it renders green labels below bars for buy orders and red labels above bars for sell execution

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

This strategy implements a custom Parabolic SAR algorithm modified with Average True Range (ATR) to measure volatility steps. It calculates the SAR line, acceleration factors, and extreme points directly on the price chart. When a trend reversal occurs and per

Strategy v4 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of ATR Parabolic SAR Strategy [QuantNomad]
99 stars

The Mean Squared Error indicator calculates the mean of squared differences between a source series and its EMA, averaged via a rolling buffer acting as SMA. This error metric plots as a filled red area on a separate pane, while the EMA overlays as a yellow li

Indicator v6 Volatility & bandsMean reversion
Updated 4 weeks ago · Apache-2.0 GitHub repository of Mean Squared Error (MSE)

Test

by be-thomas
65 stars

This indicator plots the closing price of each bar in a separate pane. It stores the close series in a variable and plots that series. There are no user inputs, alerts, or trading signals. Comments in the source do not affect the calculation. It does not defin

Indicator v4
Updated 5 days ago · GPL-3.0 GitHub repository of Test

Opening Range

by g-moe
3 stars

This indicator overlays a Directional Sentiment Line ribbon on the price chart using moving averages of high, low, open, and close prices. It combines higher-timeframe MACD and RSI filters with standard deviation volume heatmap thresholds to assess directional

Indicator v5 TrendOscillators & momentum Repaints
Updated 5 months ago · None stated GitHub repository of Opening Range

Renko Candles Overlay

by regalouisei
2 stars

This indicator calculates and displays a Renko brick overlay directly on the main price chart. It supports multiple brick size calculation methods, including traditional fixed values, percentage-based sizing, and ATR-derived variations (ATR, ATR/2, and ATR/4).

Indicator v5 TrendCandlestick patterns
Updated 8 months ago · None stated GitHub repository of Renko Candles Overlay
1 stars

Calculates fast and slow Exponential Moving Averages (EMAs) to identify trend shifts on the price chart. When the fast EMA crosses above the slow EMA, any open short position is closed before opening a long trade. When the fast EMA crosses below, any open long

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe Wunder-Scalper-Probe-Integration

Super Mirror v2

by morindok
1 stars

Mirrors price around a baseline between two user-chosen levels and times, drawn on the price chart. The baseline can be one of nine types: golden-ratio cloud, moving average, highest-high and lowest-low range, ATR bands, Bollinger Bands, Ichimoku cloud, RSI, C

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Super Mirror v2

NDAQ-tracker

by Allen1212
303 stars

This overlay indicator marks ARK Invest trade activity on the NDAQ price chart. It places red labels above bars on recorded sell dates, using fixed timestamps and a short sell note. An ETF input is present but only offers ALL, so the script does not switch bet

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

ATR Stop Buy Strategy

by hasnocool
106 stars

This strategy calculates breakout thresholds around the previous bar's close using a 14-period Average True Range multiplier. It plots dynamic upper buy lines and lower stop-loss lines directly on the price chart. Long entries trigger when price breaches the u

Strategy v4 Volatility & bandsBreakout Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of ATR Stop Buy Strategy

This indicator calculates the Mean Squared Logarithmic Error (MSLE) between a selected price source and its exponential moving average over a specified lookback period. It evaluates prediction error by computing the squared difference of natural logarithms, sm

Indicator v6 Moving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Mean Squared Logarithmic Error (MSLE)

Test

by be-thomas
65 stars

This strategy is a TradingView documentation example named Test. For the first one hundred bars it submits a long entry of ten units when the position is flat or short, and a short entry of ten units when the position is long. It has no inputs, no stop loss, a

Strategy v4
Updated 5 days ago · GPL-3.0 GitHub repository of Test

ORB Hooplah

by g-moe
3 stars

The ORB Hooplah indicator calculates the opening range high and low for a user-selected session such as 0930-1000 in New York time. It plots the OR band on the price chart, fills the area between high and low, and colors candles accordingly based on whether th

Indicator v5 BreakoutSessions & time
Updated 5 months ago · None stated GitHub repository of ORB Hooplah

Risk Management Chart

by regalouisei
2 stars

Risk Management Chart simulates theoretical equity curves using a Monte Carlo approach based on user-defined risk parameters. It models multiple potential account trajectories across a specified number of consecutive trades using starting equity, win probabili

Indicator v5
Updated 8 months ago · None stated GitHub repository of Risk Management Chart
1 stars

A test strategy from a reference corpus that fills orders at the close of the signal bar. It goes long when a 9-period EMA crosses above a 21-period EMA while RSI is below 70, and closes the long when the EMAs cross back down. One unit is traded, with no stop

Strategy v6 Moving averagesOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PF Process Orders 02 On Close True

Super Mirror v3

by morindok
1 stars

Mirrors price around a selectable baseline between two points of time and price that the user picks on the chart. This version adds two reflection ratios, a source and timeframe selection read through security calls, and a Fibo Wave baseline with a symmetry ce

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Super Mirror v3

NET-tracker

by Allen1212
303 stars

This indicator overlays historical ARK Invest trade markers for NET on the price chart. It places green buy labels below bars and red sell labels above bars on fixed calendar dates, using the label text to mark the trade direction and a same-day ETF count such

Indicator v4
Updated 2 years ago · None stated GitHub repository of NET-tracker
106 stars

This strategy calculates fast and slow average true range trailing stops directly on the price chart. It enters long positions when the fast trailing stop crosses above the slow trailing stop, and enters short positions when it crosses below. It paints price b

Strategy v4 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of ATR Trailing Stop Strategy by ceyhun

Median

by mihakralj
99 stars

Calculates the rolling statistical median of a chosen price or indicator series over a specified lookback period. For each bar, the script gathers valid data points across the window into an array, sorts them, and determines the midpoint value, averaging the t

Indicator v6 Moving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Median

Using var

by be-thomas
65 stars

This indicator demonstrates a persistent array declared with var. It creates an empty float array once, then appends the closing price on every bar so the array grows with the chart history. On the last bar it draws a large label that reports the current array

Indicator v4
Updated 5 days ago · GPL-3.0 GitHub repository of Using var
3 stars

This strategy detects Opening Range Breakouts in a specified session. It calculates the high and low of the opening range bar then plots these levels on the price chart and fills the area between them. Candles are colored based on their relation to the ORB hig

Strategy v5 BreakoutSupport & resistance
Updated 5 months ago · None stated GitHub repository of ORB Hooplah Strategy

RSI Bar Chart v2

by regalouisei
2 stars

This indicator plots multiple RSI oscillators calculated from various price sources and timeframes in a separate pane. It renders the RSIs as customizable lines with different colors, widths, and styles. Colored bars highlight overbought and oversold zones bas

Indicator v5 Oscillators & momentum Repaints
Updated 8 months ago · None stated GitHub repository of RSI Bar Chart v2
1 stars

This strategy serves as a validation probe to test default order execution timing where orders are processed on the open of the following bar. It implements a simple long-only system using a 9-period and 21-period exponential moving average crossover filtered

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PF process-orders 01 - on_close=false

The Super Mirror indicator plots spiral symmetry patterns on the price chart using user-specified start and end points along with reflection ratios. It calculates mirrored price levels and spiral growth factors for upward and downward movements based on input

Indicator v5 Support & resistanceSMC / ICT / price action

NFLX-tracker

by Allen1212
303 stars

NFLX-tracker plots historical ARK Invest buy and sell labels on the Netflix price chart. Green labels mark purchases below bars and red labels mark sales above bars, with a multiplier showing how many ARK ETFs traded the stock on the same day. An ETF input swi

Indicator v4
Updated 2 years ago · None stated GitHub repository of NFLX-tracker
106 stars

This strategy plots an ATR trailing stop on the price chart. It builds the stop from the highest value of high minus a multiple of ATR over a lookback window, and colors bars green, red, or black relative to that line. It enters long when close crosses above t

Strategy v4 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of ATR Trailing Stoploss Strategy

Median Absolute Error

by mihakralj
99 stars

This indicator calculates the median absolute error between an actual series and a predicted series over a rolling window. On each bar it takes the absolute difference of the two sources, then applies a median of that length. It plots the result as a line in a

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Median Absolute Error

V4 Essential Alerts 11

by be-thomas
65 stars

This script calculates a 14-period Relative Strength Index (RSI) based on closing prices and plots the oscillator in a separate indicator pane. It tracks when the RSI crosses above the 50 level to detect a potential bullish shift. The indicator configures a bu

Indicator v4 Oscillators & momentum
Updated 5 days ago · GPL-3.0 GitHub repository of V4 Essential Alerts 11

ORB Twisted M

by g-moe
3 stars

This strategy builds an opening range during a user-defined morning session and trades breakouts of that range during a later trade window. It enters long above the range high and short below the range low, then manages exits with two range-size extensions, a

Strategy v5 BreakoutSessions & time
Updated 5 months ago · None stated GitHub repository of ORB Twisted M

RSI direction bias - JD

by regalouisei
2 stars

This indicator calculates an RSI and holds a directional bias until the oscillator crosses the opposite threshold. A regular RSI uses the selected source and length, while the future-smoothed option uses a projected Heikin Ashi open. Bias turns long above the

Indicator v5 Oscillators & momentum Repaints
Updated 8 months ago · None stated GitHub repository of RSI direction bias - JD
1 stars

This strategy tests deferred position flips under pyramiding. It enters long at market when a 9-period EMA crosses above a 21-period EMA and RSI stays below 70, and it queues short stop entries when RSI crosses under 50, with the stop placed a quarter of ATR b

Strategy v6 Oscillators & momentumMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PF Pyramid carry 01 - deferred flip

NICE-tracker

by Allen1212
303 stars

This indicator visualizes historical ARK Invest transactions for NICE directly on the price chart. It places text labels at specific historical timestamps indicating ARK buying or selling activity, along with the count of participating funds. The input setting

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

ATR+EOM+Vortex Strat

by hasnocool
106 stars

This strategy combines ATR, Ease of Movement, and the Vortex indicator on the price chart. It enters long when ATR is above its EMA, Ease of Movement is positive, and the average of the Vortex lines is above one. It closes that long when ATR is below its EMA,

Strategy v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of ATR+EOM+Vortex Strat
99 stars

The Median Absolute Percentage Error (MdAPE) indicator calculates and plots the rolling median of percentage forecast errors between an actual price series and a predicted series over a user-defined window. For each bar, it computes the absolute percentage err

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Median Absolute Percentage Error

V4 Essential Arrays 16

by be-thomas
65 stars

Demonstrates array creation and string joining functions in Pine Script v4. It creates string, float, and integer arrays with initial values, pushes additional elements, and converts array contents into formatted, delimited text strings using array.join(). The

Indicator v4
Updated 5 days ago · GPL-3.0 GitHub repository of V4 Essential Arrays 16

ORB_twisted_m

by g-moe
3 stars

This strategy executes opening range breakout trades on the price chart during New York market hours. It tracks the high and low of a customizable opening session and enters long or short positions when price breaks above or below the range. Position sizing de

Strategy v5 BreakoutSessions & time
Updated 5 months ago · None stated GitHub repository of ORB_twisted_m
2 stars

This indicator analyzes and visualizes the statistical price impact following specific Relative Strength Index (RSI) trigger conditions. When the RSI crosses over or under a defined threshold level, the script measures post-trigger price movements across a spe

Indicator v5 Oscillators & momentumVolatility & bands
Updated 8 months ago · None stated GitHub repository of RSI Impact Heat Map [Trendoscope]
1 stars

This Pine Script strategy evaluates fast and slow exponential moving average crossovers gated by an RSI boundary to enter long positions. It utilizes fixed cash position sizing and permits up to three pyramided entries, converting cash to fractional contract a

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PF Pyramid Carry 02 - Cash Fractional

NIO-tracker

by Allen1212
303 stars

NIO-tracker is an overlay indicator that marks historical ARK Invest purchases and sales of NIO on the price chart. It places green labels below bars for buys and red labels above bars for sells, using fixed calendar dates rather than live calculations. An ETF

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

ATR_Trade_strategy

by hasnocool
106 stars

This strategy plots daily ATR bands, an optional midline, and an exponential moving average directly on the price chart. It executes long trades when price breaks above the upper ATR band and opens short positions when price falls below the lower band, with an

Strategy v4 Volatility & bandsBreakout Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of ATR_Trade_strategy

MEDPRICE: Median Price

by mihakralj
99 stars

This indicator calculates the median price of each bar as the average of the high and the low, matching the TA-Lib MEDPRICE definition and the built-in HL2 source. It plots that single series on the price chart as an orange line of width two. There are no user

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of MEDPRICE: Median Price

V4 Essential Colors 00

by be-thomas
65 stars

This indicator demonstrates different syntax methods for setting color transparency in Pine Script v4. It calculates and plots five simple moving averages with lengths of 10, 30, 50, 70, and 90 periods directly on the main price chart. Each moving average line

Indicator v4 Moving averages
Updated 5 days ago · GPL-3.0 GitHub repository of V4 Essential Colors 00

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