Synced with GitHub · updated yesterday

Free TradingView Pine Scripts

8,340 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
8,340 scripts
1 stars

This indicator calculates a simple moving average (SMA) alongside a zero-centered symmetrized price series and its moving average. It uses Average True Range (ATR) to create a dynamic price offset, plotting a stepline translated moving average along with an up

Indicator v5 Moving averagesVolatility & bands
Updated 7 weeks ago · None stated GitHub repository of Symmetrized MA & Dynamic Offset

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

PineForge Loopback Method For

by pineforge-4pass
1 stars

The PineForge Loopback Method For is a strategy that calculates an average vote by comparing current close to historical closes across user-defined horizons. It enters a long position when the average vote crosses above a minimum threshold and price exceeds th

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Loopback Method For

Tagnet Circles

by morindok
1 stars

The Tagnet Circles indicator plots geometric time-price circle projections directly on the price chart. Users interactively select two time anchor points to establish a high-low price and time window. The script draws a central main circle with dashed upper an

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Tagnet Circles

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]

PineForge Plumbline PVT VWMA

by pineforge-4pass
1 stars

The strategy calculates a volume-weighted moving average of close prices as the volume-weighted center and a price-volume trend smoothed by EMA as the signal line. It plots the VWMA and PVT distance on the price chart. The strategy enters long positions when p

Strategy v6 TrendVolume
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Plumbline PVT VWMA

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

Parabolic SAR

by g-moe
3 stars

Parabolic SAR is a price-chart strategy that reads Commodity Channel Index and Parabolic SAR values from four user-selected timeframes. It opens a long when every timeframe’s CCI is above the entry level and price is below every SAR, and it closes that long wh

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Parabolic SAR

RSI Past

by regalouisei
2 stars

RSI Past is an indicator that plots the bar difference between the last overbought and oversold readings of a custom RSI. It calculates the distance in bars from the most recent time the RSI crossed above the overbought threshold to the last time it dropped be

Indicator v5 Oscillators & momentum
Updated 8 months ago · None stated GitHub repository of RSI Past
1 stars

This strategy calculates an ALMA smoothed version of the close price and the correlation between close and volume. It enters long trades when price crosses above ALMA and correlation exceeds the minimum threshold. It exits on price crossing below ALMA, correla

Strategy v6 Moving averagesVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Quarry ALMA Correlation
1 stars

Time Analyzer {Morindok} calculates pivot highs and lows over a user-defined length to establish structural market baselines. It supports either an alternating ZigZag mode or independent high and low swing tracking. Based on these anchor points, the script con

Indicator v5 Support & resistanceTrend
Updated 7 weeks ago · None stated GitHub repository of Time Analyzer {Morindok}

NIU-tracker

by Allen1212
303 stars

NIU Tracker overlays historical ARK Invest buy and sell transactions for Niu Technologies directly on the price chart. It plots markers indicating share volume changes and the number of participating ARK funds on specific trading dates. Traders can filter tran

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

Atrend by OTS

by hasnocool
106 stars

Atrend by OTS combines MACD histogram crossovers, RSI threshold crosses, and an ATR-based trailing trend indicator on the main price chart. The strategy triggers long entries when the MACD signal delta crosses above zero or when RSI crosses above the oversold

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Atrend by OTS
99 stars

This indicator plots the rolling midpoint of the close as an overlay on the price chart. For each bar it takes the highest and lowest close over a user-set period and draws their average, matching the TA-Lib midpoint definition of the center of that range. The

Indicator v6 Support & resistance
Updated 4 weeks ago · Apache-2.0 GitHub repository of MIDPOINT: Rolling Midpoint

V4 Essential Colors 08

by be-thomas
65 stars

This script plots the bar high, median price, and low in a separate pane using varying levels of transparency and line widths. It demonstrates the use of the color.new function in Pine Script to create visual depth and glow styling across price points. The scr

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

Parabolic SAR

by g-moe
3 stars

This strategy overlays a smoothed moving average on price and combines it with Aroon, Chaikin Money Flow and a Chaikin oscillator to define long and short conditions. Relative Vigor Index and Parabolic SAR values are calculated for exits. Entries can be limite

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Parabolic SAR

Volume Dots

by regalouisei
2 stars

This indicator highlights high volume and open interest (OI) extremities directly on the price chart. It identifies potential support and resistance zones, naked levels, and liquidation ranges using visual dots, lines, and boxes. An optional on-screen table di

Indicator v5 VolumeSupport & resistance
Updated 8 months ago · None stated GitHub repository of Volume Dots
1 stars

This strategy is a request.security parity probe. On a 15-minute chart it reads the 60-minute close with lookahead off and opens one long when that higher-timeframe close changes from the prior bar. It closes the position on the following bar and forces a flat

Strategy v6
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge RS parity 15m to 60m close

Time Machine

by morindok
1 stars

Time Machine is an indicator that plots symmetric candles mirrored across a user-selected price level within a time range set by Point 1 and Point 2. It draws a horizontal yellow line at the selected level extending from t1 to t2 on the price chart. The script

Indicator v5 Candlestick patternsSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Time Machine

NNDM-tracker

by Allen1212
303 stars

This indicator visualizes historical ARK Invest trade activity for Nano Dimension (NNDM) directly on the price chart. It plots green buy labels below bars and red sell labels above bars using hardcoded timestamped trade records, showing transaction counts or f

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

This strategy detects a pivot range using a user-defined length to calculate multiple Fibonacci retracement levels. It enters long market orders when price touches a selected retracement level. Take profit is set as a percentage of entry price, and DCA activat

Strategy v4 Support & resistance
Updated 2 years ago · GPL-3.0 GitHub repository of Automated - Fibs with Market orders
99 stars

The Midpoint Price over Period indicator calculates the center of the highest high and lowest low price range over a user-defined lookback period. It averages the maximum high and minimum low values across the chosen window, providing a TA-Lib compatible basel

Indicator v6 Support & resistance
Updated 4 weeks ago · Apache-2.0 GitHub repository of MIDPRICE: Midpoint Price over Period

Vertical line

by be-thomas
65 stars

This indicator plots a vertical line on the price chart at the most recent bar. It checks whether the current bar is the latest bar on the chart and renders a tall histogram bar using an extreme numeric value to span the chart height. Because the indicator use

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

Period VWAP

by g-moe
3 stars

Period VWAP calculates a rolling volume-weighted average price over a chosen number of bars. It multiplies the typical price by volume, sums both that product and volume across the period, and divides them to plot one line on the price chart. The period input

Indicator v5 Volume
Updated 5 months ago · None stated GitHub repository of Period VWAP

3Commas Bot

by regalouisei
2 stars

This strategy draws two moving averages on the price chart and uses their bias to open long or short trades. It places the stop beyond a swing high or low using an ATR risk multiple, then sets a limit exit from the reward-to-risk ratio. An optional ATR trail c

Strategy v5 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of 3Commas Bot
1 stars

This strategy plots a fast and a slow exponential moving average on the price chart. It enters long and closes any short when the fast average crosses above the slow average, and enters short and closes any long when the fast average crosses below the slow ave

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Switchback All-In Reversal

Time Machine

by morindok
1 stars

Time Machine plots horizontal lines on the price chart at user-defined start and end price levels. It supports two calculation bases: SMA for average price or HH/LL for high-low ranges. The time range is set by start and end timestamps, with options to auto-de

Indicator v5 Support & resistanceSessions & time
Updated 7 weeks ago · None stated GitHub repository of Time Machine

NRIX-tracker

by Allen1212
303 stars

This indicator plots historical ARK Invest transaction records directly on the price chart for NRIX. It displays green Buy labels below bars and red Sell labels above bars based on hardcoded transaction dates and ETF execution counts. The primary input setting

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

An automated trend-following investment strategy designed for Bitcoin. It compares two customizable trend lines (such as TEMA, LSMA, EMA, or SMA) to detect crossovers and filters entries using an ATR-based trailing stop channel. Positions are exited when the p

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Automated Bitcoin (BTC) Investment Strategy
99 stars

This overlay indicator plots a channel of the highest high and the lowest low over a rolling lookback. It updates both extremes with a monotonic deque so each bar is handled in amortized constant time, then draws the upper and lower lines on the price chart an

Indicator v6 Support & resistanceVolatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of Min-Max Channel (MMCHANNEL)

Visible OHLC

by be-thomas
65 stars

Visible OHLC is a Pine Script version 4 indicator drawn on the price chart. It stores the close series and plots that value only. There are no inputs, conditions, or extra calculations. Open, high, and low are not plotted, even though the title mentions OHLC.

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

Pivot Trendlines

by g-moe
3 stars

Pivot Trendlines marks confirmed pivot highs and pivot lows on the price chart and tracks small pivot highs and lows from consecutive red or green candles. It plots the count of green bars since the last pivot low and red bars since the last pivot high, and it

Indicator v5 Support & resistanceTrend
Updated 5 months ago · None stated GitHub repository of Pivot Trendlines

3D Sine Wave

by regalouisei
2 stars

This indicator plots a 3D sine wave in a separate pane. It calculates wave values using bar index, wave height and duration inputs. Lines form a wave shape with top, bottom, left and right fills based on coloring style. Regular or irregular shape option change

Indicator v5 Support & resistanceVolatility & bands
Updated 8 months ago · None stated GitHub repository of 3D Sine Wave
1 stars

This strategy overlays a fast and a slow exponential moving average on the price chart and treats their crossovers as entries. It opens a long position when the fast average crosses above the slow average and, when shorts are allowed, opens a short on the oppo

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Aurora Market Bracket

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