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

Institutional HFT Engine - QuantAlgo

by thesenegalesehitch
4 stars

This strategy evaluates trading opportunities using a probabilistic scoring model combined with Smart Money Concepts (SMC) pattern detection, including Break of Structure (BOS), Fair Value Gaps (FVG), and Order Blocks. It overlays signals directly on the price

Strategy v6 SMC / ICT / price actionSessions & time
Updated 4 months ago · Custom licence GitHub repository of Institutional HFT Engine - QuantAlgo
4 stars

Momentum Rotation (Top 3) ranks ten large-cap US tech stocks by their six-month returns using daily closes. It rebalances monthly and holds the top three performing stocks long only on the price chart. A ranking table shows the current order. Main settings adj

Strategy v6 Oscillators & momentumTrend
Updated 5 months ago · None stated GitHub repository of Momentum Rotation (Top 3)

RSI Mean Reversion

by LePotoRico2105
4 stars

This strategy executes mean-reversion trades when the Relative Strength Index rebounds from overbought or oversold zones in the direction of a higher-period trend EMA. It calculates indicators using confirmed bar closes to prevent live-bar recalculation. Entri

Strategy v5 Mean reversionOscillators & momentum
Updated 6 months ago · MIT GitHub repository of RSI Mean Reversion

Parabolic RSI

by YooooungLee
4 stars

This indicator calculates the RSI oscillator using a user-defined length. It then applies a custom Parabolic SAR function to the RSI values to generate dynamic trend levels that function as support and resistance zones. The SAR levels are plotted in a separate

Indicator v6 Oscillators & momentumSupport & resistance
Updated 10 months ago · Apache-2.0 GitHub repository of Parabolic RSI

Date/Time Filters [Lab]

by mitchell-917
4 stars

This overlay indicator combines several time filters so later logic can keep only bars that pass them. It checks an exchange session window, optional weekday presets or custom days, and an optional calendar date range. Separate switches skip a chosen number of

Indicator v5 Sessions & time
Updated 11 months ago · Custom licence GitHub repository of Date/Time Filters [Lab]
4 stars

This indicator serves as a test script for Pine Script v6 to demonstrate and validate user-defined functions that return tuples. It defines custom functions returning numeric arithmetic pairs, boolean price conditions, mixed-type tuples, and technical indicato

Indicator v6
Updated 1 year ago · Custom licence GitHub repository of User Function Tuple Test
4 stars

This strategy plots a 10-period and a 30-period simple moving average on the price chart. It opens a long position when the faster average crosses above the slower one and closes that long when the faster average crosses back below. Green and red markers and p

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Simple Auto Buy/Sell Strategy

Improvisando [Alorse]

by Hugs-4-Bugs
4 stars

This strategy combines candlestick price action with Exponential Moving Average, RSI, and MACD filters to identify short-term trend trades. A long signal occurs when a bullish candle engulfs the previous open while price remains above the EMA, RSI stays below

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Improvisando [Alorse]

EMA Trend Meter

by ShabbirHasan1
4 stars

Calculates three exponential moving averages and compares them against a faster 13-period baseline exponential moving average. It displays three horizontal rows of circular plots in a separate pane to represent each moving average length comparison. A circle t

Indicator v5 TrendMoving averages
Updated 1 year ago · Custom licence GitHub repository of EMA Trend Meter
4 stars

The script is a Pine Script v4 strategy that generates buy and sell signals from crossovers of fast EMA (period 5) and slow EMA (period 10). It overlays signals directly on the price chart for cryptocurrency trading. Additional filters check for hammer candles

Strategy v4 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of EMA Cross Crypto Strategy

Dereköy-Darvas

by Kalumur
4 stars

The Dereköy-Darvas indicator combines Darvas Box boundary levels with dual Bollinger Bands plotted directly on the main price chart. It calculates top and bottom box lines based on recent high and low extremes to outline price consolidation zones. Simultaneous

Indicator v5 Volatility & bandsSupport & resistance
Updated 2 years ago · None stated GitHub repository of Dereköy-Darvas
4 stars

This indicator plots scheduled macroeconomic calendar events directly onto the price chart using vertical lines. It categorizes events into five user-defined groups, such as central bank meetings, PMI releases, retail sales, inflation data, and other announcem

Indicator v5 Sessions & time
Updated 3 years ago · None stated GitHub repository of Economic Calendar [DojiEmoji]

Dead Cross Over

by might-tree
4 stars

Dead Cross Over is a trend-following strategy that calculates a 10-period fast EMA and a 100-period slow EMA directly on the price chart. It enters a long position when the fast EMA crosses above the slow EMA while price sits above the slow EMA. The position i

Strategy v5 Moving averagesTrend
Updated 3 years ago · None stated GitHub repository of Dead Cross Over

This indicator scores price from a basket of moving averages and oscillators and plots the result as pump waves in a separate pane. Users can base the rating on moving averages, oscillators, or both, and toggle the total, moving-average, and oscillator waves p

Indicator v4 Oscillators & momentumMoving averages
Updated 3 years ago · None stated GitHub repository of Technical Ratings Pro - Pump Wave
4 stars

Divergences (Brahim) identifies regular and hidden divergences between price pivots and up to ten technical indicators, including RSI, MACD, Stochastic, CCI, and OBV, along with an optional external source. Plotted directly on the price chart, it renders conne

Indicator v4 DivergenceOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Divergences (Brahim)

This indicator identifies long-term trend directions and momentum shifts using weighted moving averages. It plots 13, 48, and 200-period WMAs directly on the price chart. The script evaluates price crossovers relative to each average as well as moving average

Indicator v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of Snag - Swing Trade Long Term V2

Regime HA on EMA

by aofwittawat
4 stars

This indicator classifies a market regime by comparing a Heikin Ashi close with an exponential moving average of that close. It requests Heikin Ashi open, high, low, and close from a user-selected timeframe, then plots no lines and colors the pane background g

Indicator v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of Regime HA on EMA
4 stars

This strategy enters long or short when a moving average of open prices crosses a moving average of close prices. It plots those averages and optional trend-coloured bars on the price chart. Settings choose the average type and length, an alternate-resolution

Strategy v4 TrendMoving averages Repaints
Updated 5 years ago · None stated GitHub repository of Open Close Cross Strategy R5.1

This overlay study is a boilerplate template for building TradingView studies. Entry logic is left as false placeholders, so it does not generate trades by itself. It can restrict signals to longs or shorts, swap long and short opens, and count consecutive sig

Indicator v4
Updated 6 years ago · Apache-2.0 GitHub repository of StrategyNameHere - BuildABot-DRR

Higher Timeframe Trend

by degenview
3 stars

This indicator plots an exponential moving average taken from a selected higher timeframe and colors both the line and the chart background by whether the close is above or below that average. It requests the EMA through request.security and, when the chosen t

Indicator v6 TrendMoving averages
Updated yesterday · GPL-3.0 GitHub repository of Higher Timeframe Trend

BOLL-20-50 TARAMA

by gocaman
3 stars

Calculates 50-period and 200-period Exponential Moving Averages alongside standard and wide Bollinger Bands. It generates buy and sell signal labels on the chart when the Bollinger Band basis crosses above or below the 50 EMA. The script also includes volume-w

Indicator v5 Moving averagesVolatility & bands
Updated yesterday · None stated GitHub repository of BOLL-20-50 TARAMA

ZigZag OrderBlock Retracement

by ricksimpsontrading
3 stars

ZigZag OrderBlock Retracement plots multi-layer ZigZag swing structures, order blocks, breaker blocks, and optimal trade entry (OTE) zones directly on the price chart. It supports up to four distinct ZigZag depth layers to analyze both short-term and long-term

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 9 days ago · None stated GitHub repository of ZigZag OrderBlock Retracement

Supertrend

by AkashSasikumar47
3 stars

This script plots up to three ATR-based Supertrend lines directly on the price chart. Each line uses customizable ATR periods and multipliers to establish trailing support or resistance levels based on median price calculations. Green lines below price indicat

Indicator v6 TrendVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Supertrend

Overlay Scaffold

by jpantsjoha
3 stars

This indicator plots a fast and a slow exponential moving average on the price chart. It marks bullish and bearish crosses with optional labels and circle markers, and it shades the background according to which average is higher. Users can change both lengths

Indicator v6 Moving averagesTrend
Updated 3 weeks ago · Custom licence GitHub repository of Overlay Scaffold
3 stars

This indicator plots a stop-loss price on the main chart as green crosses. It compares the previous bar's high-low range with a 13-period ATR and offsets the current open by one, two, or three ATR multiples, or by the previous low plus ATR. Length variables na

Indicator v5 Volatility & bands Repaints
Updated 4 weeks ago · None stated GitHub repository of Complex ATR Stop Loss Strategy
3 stars

This indicator draws Smart Money Concept (SMC) elements directly on the price chart. It detects swing highs and lows, swing structure points, and order blocks (bullish and bearish OBs), displaying them using boxes and labels. It also features customizable wate

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 4 months ago · None stated GitHub repository of Mc War V2 + V3 + Session

3MA Average

by g-moe
3 stars

The 3MA Average indicator calculates three separate moving averages using customizable lengths and types, including SMA, EMA, WMA, HMA, and VWMA. It then computes the arithmetic mean of these three values to create a composite moving average plotted directly o

Indicator v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of 3MA Average

Debug Code Coverage

by monch1962
3 stars

This Pine Script v5 indicator tracks code coverage for debugging TradingView scripts. It monitors execution of functions, conditions, loops, and lines using internal arrays and counters triggered by debug functions. Coverage metrics are shown in a table on a s

Indicator v5
Updated 7 months ago · None stated GitHub repository of Debug Code Coverage

Strategy Template

by AlnurM
3 stars

This Pine Script v5 file is an overlay strategy skeleton rather than a finished trading system. It sets initial capital, percent-of-equity order size, and a percent commission, then leaves placeholders for inputs, indicator calculations, entry and exit conditi

Strategy v5
Updated 7 months ago · MIT GitHub repository of Strategy Template

Stella's Smart Money Proxy

by stella-entry
3 stars

This indicator detects institutional or large-scale market activity using candle body size and trading volume. It compares current candle bodies against a 20-period simple moving average and checks for volume spikes above an adjustable moving average filter. I

Indicator v6 VolumeCandlestick patterns
Updated 8 months ago · MIT GitHub repository of Stella's Smart Money Proxy

Market Regime - 50W SMA

by LucasRibeiroCaetano
3 stars

This indicator classifies market conditions into Bull Market, Correction, or Bear Market regimes using a 50-week Simple Moving Average (SMA). It requests weekly timeframe data to track consecutive weekly closes relative to the 50W SMA. A Bear Market regime is

Indicator v5 TrendMoving averages
Updated 11 months ago · Custom licence GitHub repository of Market Regime - 50W SMA
3 stars

This indicator computes Root Mean Square Error (RMSE) relative to benchmark moving averages such as EMA or ALMA and applies Bollinger Band envelopes or iterative loop thresholds. It plots the RMSE metric and threshold bands in a separate pane to signal trend c

Indicator v6 Volatility & bandsMoving averages
Updated 12 months ago · None stated GitHub repository of RMSE Bollinger Bands + Loop | Lyro RS

Spot Buy Marker + PnL

by shitcoding
3 stars

The Spot Buy Marker + PnL indicator tracks manual spot trading positions directly on the price chart. Users specify a buy price, entry timestamp, and either coin quantity or total USD investment. The script computes real-time profit and loss as a percentage of

Indicator v6 Support & resistanceScreeners & dashboards
Updated 1 year ago · None stated GitHub repository of Spot Buy Marker + PnL

SPX/Gold Ratio Bubble Detector

by EngineeredSuccess
3 stars

Calculates the price ratio between the S&P 500 (defaulting to SPY) and Gold (defaulting to GLD) to evaluate macro valuation extremes. It tracks the ratio alongside a simple moving average and evaluates market status across customizable warning, danger, and ext

Indicator v6 Moving averagesSupport & resistance
Updated 1 year ago · Custom licence GitHub repository of SPX/Gold Ratio Bubble Detector

BTMM Core Foundation

by jcortes254
3 stars

This indicator plots five exponential moving averages on the price chart using lengths of 5, 13, 50, 200 and 800, labeled as a food system. It scores directional bias against a user threshold, includes an optional 15-minute-and-above rule, and shows the result

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of BTMM Core Foundation

MOTO ka AnjalikaAstra

by HelloMoto069
3 stars

MOTO ka AnjalikaAstra is an overlay indicator that combines Ichimoku Cloud concepts with Average True Range volatility filters. It calculates custom Tenkan-Sen, Kijun-Sen, and Senkou Span components using ATR bands rather than standard high and low price chann

Indicator v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of MOTO ka AnjalikaAstra
3 stars

Sapphire Fibonacci Strategies is a multi-mode strategy that combines Momentum Breakout, Mean Reversion, and Fibonacci Retracement models built on Fibonacci-period moving averages. It generates long and short trade signals based on price crossovers and moving a

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Sapphire Fibonacci Strategies

This indicator identifies the classic three-bar bearish evening star reversal pattern directly on the price chart. It checks for a strong initial bullish candle, followed by a middle doji or weak candle, and completes when a subsequent bearish candle closes be

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Evening Star Pattern (Candlestick Pattern)
3 stars

This strategy implements a trend-following system based on Donchian breakout channels and volatility-adjusted position sizing. It generates long entry signals when the close price breaks above the multi-bar highest high, provided an optional benchmark trend fi

Strategy v5 TrendBreakout
Updated 2 years ago · MIT GitHub repository of Turtle Trend Follow Strategy

Combined Liquidity, Channels, RSI, and VWAP is an overlay indicator that plots multiple technical analysis metrics directly on the price chart. It calculates Keltner and Donchian Channels, volume-based metrics like cumulative volume delta (CVD), VWAP with stan

Indicator v5 Volatility & bandsOscillators & momentum Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Combined Liquidity, Channels, RSI, and VWAP

Scalp Agiota - By H7

by leocairos
3 stars

The Scalp Agiota strategy calculates RSI and MFI values to identify overbought and oversold conditions for cryptocurrency scalping trades. It plots upward triangles on the price chart below the bar when RSI drops to 20 or lower and MFI to 10 or lower, signalin

Strategy v5 Oscillators & momentumScalping Repaints
Updated 2 years ago · MIT GitHub repository of Scalp Agiota - By H7

Cross SMA - DataCrypto Analytics

by datacrypto-analytics
3 stars

This overlay indicator plots a 30-period and a 100-period simple moving average of close on the price chart and fills the space between them. It marks a sell label when the slower average crosses above the faster one and a buy label when it crosses below, and

Indicator v4 Moving averages
Updated 3 years ago · Apache-2.0 GitHub repository of Cross SMA - DataCrypto Analytics

MA & DMI

by maxits
3 stars

MA & DMI is a strategy that combines moving average crossovers with Directional Movement Index filters to identify trade setups. It calculates a slow SMA, a medium EMA, and a fast EMA alongside ADX and DI values. Trade risk management uses an ATR-based multipl

Strategy v4 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of MA & DMI

Currency Strength Chart

by itmakesyousick
3 stars

Currency Strength Chart measures and compares relative strength across major fiat currencies and optional commodities. It aggregates price data for major Forex pairs from selected brokers and plots smoothed strength lines for each currency in a separate chart

Indicator v5 Oscillators & momentumScreeners & dashboards
Updated 4 years ago · None stated GitHub repository of Currency Strength Chart
3 stars

Plots Donchian Channels and identifies trading setups based on price testing the channel extremes during high volume spikes. In long mode, it places limit buy orders when the low touches the lower Donchian band with volume exceeding a volume moving average mul

Strategy v4 Mean reversionVolatility & bands
Updated 4 years ago · CC0-1.0 GitHub repository of Greeffer's Long Strategy

RSI Bounce

by blackcat1402
3 stars

RSI Bounce calculates custom Relative Strength Index levels scaled back onto price, creating nine price-equivalent RSI band series centered around a median RSI baseline. It combines short-term RSI extreme checks with customized MACD signal line crossovers to i

Indicator v4 Oscillators & momentumMoving averages
Updated 5 years ago · MIT GitHub repository of RSI Bounce

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