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

Symmetric Price with MA calculates centered and mirrored price values using moving average midpoints and user-defined slope projections. It allows users to set a time anchor and slope angle to dynamically offset price data, optionally applying Golden Ratio mul

Indicator v5 Moving averagesTrend
Updated 7 weeks ago · None stated GitHub repository of Symmetric Price with MA

MSFT-tracker

by Allen1212
303 stars

This indicator visualizes historical purchases and sales made by ARK Invest in Microsoft directly on the price chart. It plots green buy labels below bars and red sell labels above bars at hardcoded transaction timestamps. The main setting filters trades by sp

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

The Aroon Strategy Long Only is a trend-following strategy that combines the Aroon indicator with a Least Squares Moving Average filter. It enters long positions when the Aroon Up line crosses above the Aroon Down line while the closing price trades above the

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Aroon Strategy Long Only

Mean Deviation

by mihakralj
99 stars

This indicator calculates the mean absolute deviation of a chosen source from its mean over a lookback period. A circular buffer keeps a running sum, then averages the absolute distance of each stored value from that mean. It plots the result as a line in a se

Indicator v6 Volatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of Mean Deviation

Single Conditions

by be-thomas
65 stars

This educational indicator calculates a 20-period Relative Strength Index (RSI) to demonstrate various visual debugging techniques in Pine Script. When the RSI falls below the 30 threshold, it illustrates six different signal visualization methods: dynamically

Indicator v4 Oscillators & momentum
Updated 5 days ago · GPL-3.0 GitHub repository of Single Conditions

My Strategy

by g-moe
3 stars

This strategy calculates the average closing price from a lower 3-minute timeframe and plots the result in a separate pane using array sum on multi-bar aggregate data. It fetches lower-timeframe data via security lower tf and includes commented out crossover c

Strategy v5 Moving averages
Updated 5 months ago · None stated GitHub repository of My Strategy
2 stars

Calculates buying and selling pressure by evaluating high and low movements relative to a two-bar price range. Bull and bear pressures are averaged using weighted moving averages with optional pre-smoothing, and net pressure is derived through an additional sm

Indicator v5 Oscillators & momentumTrend
Updated 8 months ago · None stated GitHub repository of RedK Trader Pressure Index (TPX)

PineForge Atlas Array Rotation

by pineforge-4pass
1 stars

This strategy computes a rolling mean return over the last sampleCount bars and a price percent rank over rankLength bars. It also calculates RSI and ATR values. Long entries trigger when the price rank crosses above the entry rank threshold while the rolling

Strategy v6 Oscillators & momentumTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Atlas Array Rotation
1 stars

Symmetric Range Spiral System projects geometric mirrored price paths and spiral structures directly onto the price chart. It calculates reflection levels and symmetric price polylines relative to a user-selected price level and time window. Storing bar data i

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Symmetric Range Spiral System

MTRX-tracker

by Allen1212
303 stars

MTRX-tracker visualizes historical ARK Invest trade activity for Matrix Service Co on the price chart. The script generates chart labels at specific historical timestamps indicating when ARK funds purchased or sold shares, along with transaction counts across

Indicator v4 Screeners & dashboards
Updated 2 years ago · None stated GitHub repository of MTRX-tracker

ARR VWAP Intraday

by hasnocool
106 stars

This strategy plots VWAP on the price chart and trades only between a start hour and an end hour. It enters long when VWAP is rising and RSI is above a threshold, and short when VWAP is falling and RSI is below a threshold. If the reversal option is on, it clo

Strategy v4 Oscillators & momentumVolume Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of ARR VWAP Intraday

Mean Error (ME)

by mihakralj
99 stars

This indicator calculates the mean error between a selected price source and an exponential moving average of that source. It subtracts the EMA from the source, then averages those errors over a user-defined lookback with a circular buffer that behaves like a

Indicator v6 Moving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Mean Error (ME)
65 stars

This strategy calculates a 20-period Relative Strength Index (RSI) and generates entry orders based on crossovers and crossunders of the 50 level. When RSI crosses above 50, it places a long stop entry at the current high price with a custom alert message. Whe

Strategy v4 Oscillators & momentum
Updated 5 days ago · GPL-3.0 GitHub repository of Strategy Using Alert Message

This overlay indicator plots automatic Midas-style anchored VWAPs on the price chart. It finds the bars of the highest high and lowest low inside a user-set length, then builds volume-weighted averages of high or low and of the HLC3 midpoint back to those bars

Indicator v5 VolumeTrend
Updated 5 months ago · None stated GitHub repository of Nubia - Auto Midas Anchored VWAP [xdecow]

RedK Volume-Accelerated Directional Energy Ratio (VADER) measures directional momentum accelerated by volume activity. It calculates price change relative to the average bar range, limits the ratio, and scales it using relative, raw, or static volume weighting

Indicator v5 VolumeOscillators & momentum
Updated 8 months ago · None stated GitHub repository of RedK Volume-Accelerated Directional Energy Ratio

PineForge Breaker Method While

by pineforge-4pass
1 stars

The strategy builds a custom ThresholdLadder from RSI levels and counts how many levels the RSI value exceeds. When the required passes are reached it enters long when price crosses above the EMA trend line. It exits the position if the ladder condition breaks

Strategy v6 Oscillators & momentumTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Breaker Method While
1 stars

The Symmetrical Golden Shapes indicator draws geometric patterns directly on the price chart overlay within a user-defined time range and price level. It uses Pine Script polylines to plot customizable shapes such as diamonds, triangles, rectangles, polygons,

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Symmetrical Golden Shapes

MTTR-tracker

by Allen1212
303 stars

Plots historical buy and sell transactions executed by ARK Invest (specifically ARKQ) for Matterport Inc (MTTR) directly on the price chart. It places green upward labels below bars on buy dates and red downward labels above bars on sell dates, noting the tran

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

An intraday trading strategy that calculates daily pivot points, support and resistance levels, previous day high/low, and typical price. Designed around specific trading sessions like Indian market hours (09:15 to 15:30), it draws key reference levels directl

Strategy v4 Support & resistanceSessions & time Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of ARR-Pivote-India-Stategy
99 stars

The Mean Relative Absolute Error indicator measures forecast accuracy by comparing an actual price series against a predicted price series. For each bar, it divides the absolute difference between actual and predicted values by the absolute actual value, then

Indicator v6
Updated 4 weeks ago · Apache-2.0 GitHub repository of Mean Relative Absolute Error
65 stars

This Pine Script strategy generates trading signals using a 20-period Relative Strength Index (RSI) relative to the 50 level. It enters a long position when the RSI crosses above 50 and a short position when it crosses below 50. While in an active trade, the s

Strategy v4 Oscillators & momentum
Updated 5 days ago · GPL-3.0 GitHub repository of Strategy with Selective Alert Calls

Opening Range

by g-moe
3 stars

The Opening Range indicator combines multiple technical analysis tools onto the main price chart. It calculates MACD momentum sequences alongside Stochastic oscillator limits to generate buy and sell triangle shapes. Additionally, it evaluates trend alignment

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

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

PineForge Cascade MTF Tuple

by pineforge-4pass
1 stars

PineForge Cascade MTF Tuple is a multi-timeframe trend-following strategy designed for price charts. It uses a single security request to retrieve an Exponential Moving Average and Average True Range from a higher timeframe. The strategy plots an entry thresho

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Cascade MTF Tuple
1 stars

Symmetrical Golden Shapes plots customizable geometric shapes, including diamonds, ellipses, polygons, and stars, directly on the price chart. The indicator allows users to define time and price boundaries interactively, adjust center ratios, and mirror or rot

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Symmetrical Golden Shapes

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

This strategy identifies severe close-to-close volatility shocks and triggers an immediate exit from any open long position. It enters long when the rate of change of close crosses above a user-defined momentum threshold and the close sits above the trend EMA.

Strategy v6 TrendOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Flashpoint Immediate Close

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

PineForge Gatekeeper Risk Cap

by pineforge-4pass
1 stars

This Pine Script v6 strategy gates long trades to a user-defined session window (default 0900-1700 Asia/Taipei) and enforces a maximum daily filled orders limit. It generates entries solely on fast EMA crossover above the slow EMA while inside the session. Pos

Strategy v6 Sessions & timeMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Gatekeeper Risk Cap

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 calculates a linearly weighted moving average centerline explicitly using a while loop, accompanied by a standard deviation upper band. It enters a long position when the close crosses over the upper band. Exits occur when the price crosses back

Strategy v6 BreakoutVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge Heliograph While Channel

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