Synced with GitHub · updated today

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

VAMO Crossover Strategy

by TPTBusiness
4 stars

The VAMO Crossover Strategy is a scalping system that combines momentum and volatility into a Volatility-Adjusted Momentum Oscillator (VAMO). It calculates momentum using Rate of Change divided by ATR and generates trade signals when VAMO crosses its EMA signa

Strategy v6 Oscillators & momentumVolatility & bands
Updated 12 months ago · MIT GitHub repository of VAMO Crossover Strategy

Color Preview Test

by weaming
4 stars

Color Preview Test is an overlay indicator that samples Pine Script color expressions and applies them to the price chart. It assigns hexadecimal literals, built-in color constants, color.rgb values, and color.new transparency, then plots the close in blue, ti

Indicator v6
Updated 1 year ago · Custom licence GitHub repository of Color Preview Test
4 stars

This strategy executes trades based on simple moving average crossovers. It calculates a 10-period and a 30-period SMA, opening a long position and closing any short position when the fast SMA crosses above the slow SMA. Conversely, it opens a short position a

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

GainzAlgo V2 [Alpha]

by krishnandank
4 stars

This indicator generates buy and sell signals based on engulfing candlestick patterns, a candle stability ratio relative to true range, RSI thresholds, and a multi-bar price momentum condition. It draws visual signal labels on the chart alongside suggested tak

Indicator v5 Candlestick patternsOscillators & momentum
Updated 1 year ago · None stated GitHub repository of GainzAlgo V2 [Alpha]

Multi-Timeframe Moving Averages is an overlay indicator that calculates and plots moving averages across multiple timeframes directly on the main price chart. It supports various moving average types including SMA, EMA, WMA, HMA, RMA, and VWMA, with customizab

Indicator v6 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Multi-Timeframe Moving Averages

This strategy executes trades on gold based on a confluence of Supertrend, RSI, MACD, Bollinger Bands, and volume spikes. It enters long or short positions when trend direction aligns with momentum and price positioning relative to volatility bands, filtered b

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of XAUUSD High Probability Strategy

DAHAB+ SMC + IDMT

by Rjoubodai25
4 stars

This SMC indicator for TradingView calculates and plots Order Blocks, Fair Value Gaps, market structure trend lines, and Enhanced Inducement Detector signals on the price chart. Bullish and bearish boxes highlight Order Blocks and FVG, while trend lines extend

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 1 year ago · None stated GitHub repository of DAHAB+ SMC + IDMT
4 stars

This strategy plots three exponential moving averages on the price chart and uses RSI for exits. It opens a long when the fastest EMA crosses above the middle EMA while remaining above the slowest EMA and the bar closes above its open. Shorts use the opposite

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Tendency EMA + RSI [Alorse]
4 stars

High Volume Points draws circles at confirmed pivot highs and lows when summed volume exceeds a normalized threshold. It sums volume over twice the pivot length, compares that sum with a high percentile of recent volume, and skips quieter pivots. Circle size f

Indicator v6 VolumeSupport & resistance
Updated 1 year ago · Custom licence GitHub repository of High Volume Points [BigBeluga]

Trix Strategy V2

by CryptoRobotFr
4 stars

This strategy trades trend continuations using a triple moving average oscillator (TRIX) and a long-term moving average baseline. It opens long positions when price is above the long moving average and the TRIX histogram crosses above zero, and opens short pos

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Trix Strategy V2

UT Bot Alerts

by AntSan813
4 stars

This indicator implements the UT Bot Alerts system by tracking price action against an Average True Range trailing stop line directly on the price chart. It calculates volatility bands using user-defined ATR length and sensitivity multiplier parameters. When t

Indicator v4 TrendVolatility & bands
Updated 2 years ago · None stated GitHub repository of UT Bot Alerts

OrderEncoder

by algoboy-kevin
4 stars

This utility library formats automated trading alert messages into structured JSON strings for external execution. It provides functions to construct text payloads for opening limit orders, cancelling existing limit orders, and closing all active positions wit

Library v5
Updated 2 years ago · None stated GitHub repository of OrderEncoder
4 stars

Davids Ichimoku Cloud Break is an overlay strategy that generates trade signals based on Ichimoku Cloud breakout conditions combined with an optional MACD entry filter. It calculates and plots the Conversion Line, Base Line, Lagging Span, and Leading Spans dir

Strategy v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Davids Ichimoku Cloud Break

ARANLAR

by Kalumur
4 stars

ARANLAR is an overlay indicator that combines a Tillson T3 moving average, WMA crossover signals, price channel boundaries, and dynamic Fibonacci retracement levels. It plots a color-coded T3 line to show short-term trend direction and triggers buy (AL) or sel

Indicator v5 Moving averagesTrend
Updated 2 years ago · None stated GitHub repository of ARANLAR

Vol-Targeted Position Size

by Robot-Wealth
4 stars

This indicator calculates volatility-targeted position sizes using an exponentially weighted moving average volatility forecast. It plots the target position size along with upper and lower no-trade buffer boundaries in a separate pane. A dashboard table in th

Indicator v5 Volatility & bandsScreeners & dashboards
Updated 2 years ago · None stated GitHub repository of Vol-Targeted Position Size

Imbalance + 3EMA

by linkcla
4 stars

This overlay indicator plots three exponential moving averages on the price chart and marks imbalance zones with boxes. Each EMA has its own length, color, and visibility toggle, with defaults of 10, 50, and 200. Fair value gaps are detected across three bars

Indicator v5 Moving averagesSMC / ICT / price action
Updated 2 years ago · None stated GitHub repository of Imbalance + 3EMA

Supertrend EMA Strategy

by mohammad95labbaf
4 stars

Supertrend EMA Strategy is a chart overlay indicator that combines Supertrend trailing levels with an Exponential Moving Average filter to identify entry signals. Buy signals occur when the Supertrend turns bullish while price trades above the specified EMA, w

Indicator v4 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Supertrend EMA Strategy

POC & Volume Profile

by ChiefTechDev
4 stars

Calculates and plots a horizontal volume and price distribution profile across user-defined row bins directly on the price chart. It measures price activity between high and low boundaries, tallies price occurrences or volume per level, and draws color-gradien

Indicator v5 VolumeSupport & resistance Repaints
Updated 2 years ago · None stated GitHub repository of POC & Volume Profile
4 stars

This strategy executes trend-following trades based on Bollinger Band breakouts confirmed by a long-term moving average filter. A long position opens when the price crosses above the upper Bollinger Band, provided the band spread meets a minimum threshold and

Strategy v5 Volatility & bandsTrend
Updated 2 years ago · None stated GitHub repository of Bollinger Trend - Strategy V1

STPP20 + ADX

by rKv4dr4t
4 stars

This strategy combines a Pivot Point SuperTrend with an Average Directional Index (ADX) filter and a 21-period simple moving average. It enters long positions when the close crosses above the SuperTrend trailing band while remaining above the moving average an

Strategy v4 TrendMoving averages
Updated 2 years ago · MIT GitHub repository of STPP20 + ADX
4 stars

This overlay strategy combines a Supertrend with a k-nearest-neighbors filter. It smooths price and the Supertrend with weighted moving averages, then uses neighbor count and lookback length to form an AI trend signal. Traders can allow long, short, or both di

Strategy v5 TrendVolatility & bands
Updated 2 years ago · None stated GitHub repository of AI Volume Supertrend Strategy

3 Bar Gap

by kevinhhl
4 stars

The 3 Bar Gap indicator identifies fair value gaps and price imbalances across a three-bar pattern directly on the price chart. It calculates displacement between the price boundaries of two bars ago and the current bar. To filter out market noise during quiet

Indicator v5 SMC / ICT / price actionVolatility & bands
Updated 3 years ago · None stated GitHub repository of 3 Bar Gap
4 stars

This TradingView indicator provides scalping money management tools by displaying a customizable panel on the chart. It shows risk management details such as deposit size, maximum risk per trade as a percentage, and commission adjustments. The indicator plots

Indicator v5 ScalpingScreeners & dashboards
Updated 3 years ago · MIT GitHub repository of Scalping Money Management
4 stars

Calculates a 5-period Exponential Moving Average (EMA) to identify short and long trade setups based on price distance from the average. It triggers entries when price breaks the high or low of an alert candle that formed completely outside the 5 EMA. The stra

Strategy v5 Moving averagesBreakout
Updated 3 years ago · None stated GitHub repository of 5 EMA Strategy: Power of Stocks
4 stars

This indicator plots a separate-pane oscillator from a user-selected source. Named presets and a custom mode set the low-pass period, lookback, and Tr values used by the oscillator. The period is then scaled by hour, day, week, or month multipliers selected fr

Indicator v5 Oscillators & momentum
Updated 3 years ago · None stated GitHub repository of Boom Hunter - Oscillator

Bollinger Bands

by bfoura
4 stars

This indicator calculates standard Bollinger Bands using a simple moving average and standard deviation multiplier. Instead of plotting continuous band lines, it evaluates whether the current price trades within a configurable threshold distance of the band bo

Indicator v5 Volatility & bandsMean reversion
Updated 4 years ago · None stated GitHub repository of Bollinger Bands
4 stars

This strategy plots custom upper and lower bands on the price chart using configurable moving average types and deviation multipliers. It opens long or short positions when price crosses above or below these envelopes, with optional RSI oscillator filters for

Strategy v5 Volatility & bandsMoving averages
Updated 4 years ago · MIT GitHub repository of Bollinger Bands Strategy
4 stars

Snag - Detect Bull Bear is an indicator that identifies bull and bear market phases on the price chart. It uses a customizable ZigZag to detect trend reversals, tracking high and low points. The script applies Fibonacci-based rules to confirm breakout shifts b

Indicator v5 TrendSupport & resistance
Updated 4 years ago · None stated GitHub repository of Snag - Detect Bull Bear
4 stars

Leonidas Trend Following System is a trend following indicator that plots key, long-term, and short-term exponential moving averages directly on the price chart. It calculates trend signals through EMA crossovers and price changes relative to the center line,

Indicator v5 TrendOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Leonidas Trend Following System
4 stars

The VIX Fix Double Pleasure indicator calculates standard synthetic Williams VIX Fix to spot market bottoms and combines it with a reversed VIX Fix calculation to detect market tops. It renders both metrics as histograms and lines in a separate pane. By evalua

Indicator v4 Volatility & bandsOscillators & momentum
Updated 4 years ago · MIT GitHub repository of VIX Fix: Double Pleasure

EMA and ADX v1

by aofwittawat
4 stars

This indicator calculates an Exponential Moving Average (EMA) and an Average Directional Index (ADX) to signal trend entries and exits directly on the price chart. It triggers a long signal when the close is above the EMA and a short signal when below, optiona

Indicator v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of EMA and ADX v1

ESR-Bot (beta)

by Main-Michael-Sparks
4 stars

ESR-Bot is a Pine v4 strategy that plots in a separate pane. It combines a smoothed RSI, with adjustable overbought and oversold ranges, and two exponential moving averages. A long or short signal fires when RSI sits inside the matching range while a recent EM

Strategy v4 Oscillators & momentumMoving averages
Updated 4 years ago · MPL-2.0 GitHub repository of ESR-Bot (beta)

Bigbaldy RSI for DCA

by bigbaldy1128
4 stars

This strategy simulates Dollar Cost Averaging (DCA) trading bot behavior on the chart. It triggers an initial entry when the RSI drops below a specified oversold limit and price is under a maximum price cap. As price falls, it calculates simulated safety order

Strategy v4 Oscillators & momentumMean reversion
Updated 5 years ago · None stated GitHub repository of Bigbaldy RSI for DCA

This strategy plots three EMAs (50, 100, 200) on the price chart for crossover signals. Long entries occur when fast EMA crosses above mid EMA and close exceeds slow EMA; short entries when fast crosses below mid and close is below slow. It uses ATR trailing s

Strategy v4 Moving averagesTrend
Updated 5 years ago · MIT GitHub repository of Algo Trading Simple 3-EMA Strategy + Trailstop

Security

by Joshua-Chang
4 stars

This Pine Script v4 indicator is titled Security and is marked to draw on the price chart. No inputs are parsed, and the visible source contains no active calculation or plot. Almost every line is a comment sketching simple moving averages, color changes, cros

Indicator v4
Updated 5 years ago · None stated GitHub repository of Security
4 stars

This indicator overlays four simple moving averages and marks crosses between the short and basis averages on the price chart. It also plots Bollinger Bands around the basis average using a standard-deviation multiplier and fills the band. Separate resistance

Indicator v4 Moving averagesVolatility & bands
Updated 5 years ago · GPL-3.0 GitHub repository of Bollinger Bands/MA Cross

Supertrend MTF Heikin Ashi

by setyadhiputrad
4 stars

This indicator calculates and plots Supertrend lines based on Heikin Ashi price data for both the current chart timeframe and a higher timeframe. It determines trend direction by comparing prices against ATR-derived upper and lower bands, shifting colors and p

Indicator v4 TrendVolatility & bands
Updated 5 years ago · GPL-3.0 GitHub repository of Supertrend MTF Heikin Ashi

KuChart DayLight Basic Currencies

by Vertexstack-Code
4 stars

This indicator calculates and plots the relative performance of eight major currencies (USD, EUR, GBP, CHF, JPY, AUD, CAD, and NZD) in a separate pane. It fetches price data from major Forex currency pairs and calculates logarithmic percentage changes relative

Indicator v4 Oscillators & momentumScreeners & dashboards
Updated 6 years ago · None stated GitHub repository of KuChart DayLight Basic Currencies

Adam's RSI

by adamhelton
4 stars

Adam's RSI calculates a standard Relative Strength Index alongside a fast RSI and an EMA of the standard RSI. It plots the main RSI line colored according to whether it is above or below the 50 baseline, along with overbought and oversold levels. The indicator

Indicator v4 Oscillators & momentumMoving averages
Updated 6 years ago · None stated GitHub repository of Adam's RSI

CMYK RMI SMA

by myn
4 stars

CMYK RMI SMA is a multi-period strategy combining three distinct Relative Momentum Index (RMI) oscillators—Alpha, Beta, and Gamma—with Simple Moving Average (SMA) trend filters. It evaluates short, medium, and long-term momentum alongside SMA trend phasing to

Strategy v4 Oscillators & momentumTrend
Updated 6 years ago · Apache-2.0 GitHub repository of CMYK RMI SMA

Bollinger Squeeze

by degenview
3 stars

This indicator calculates standard Bollinger Bands using a simple moving average basis along with upper and lower volatility bands. It measures normalized band width to detect squeeze conditions where the bands contract to their narrowest point over a specifie

Indicator v6 Volatility & bandsMoving averages
Updated today · GPL-3.0 GitHub repository of Bollinger Squeeze

ALMA Tarama

by gocaman
3 stars

This indicator plots an Arnaud Legoux moving average on the price chart and colors it by slope. It marks an entry label when the average turns up and an exit label when it turns down, and it fires matching alerts. A separate exponential moving average is drawn

Indicator v5 Moving averagesTrend
Updated today · None stated GitHub repository of ALMA Tarama

OPTD ORB Strategy

by drewautomates
3 stars

The OPTD ORB Strategy detects an opening range from a user-defined session window on the chart timeframe. It waits for a specified number of consecutive closes beyond the range high or low on a separate signal timeframe to generate a long or short entry. The d

Strategy v6 BreakoutSessions & time
Updated today · Custom licence GitHub repository of OPTD ORB Strategy
3 stars

This strategy plots Bollinger Bands on the price chart and enters long only when flat. It buys on a strong bullish close above the middle band or on a small-body pullback that tags the middle band with a long lower wick. The stop sits below the signal bar by a

Strategy v5 Volatility & bandsBreakout
Updated yesterday · None stated GitHub repository of H4 布林ATR型態多單策略

GBPUSD H1 QuadLayer

by GifariKemal
3 stars

An institutional order block and EMA pullback indicator designed for GBPUSD on the 1-hour timeframe. It filters trading signals based on specific London and New York session kill zones, ATR volatility thresholds, signal quality metrics, and day or hour multipl

Indicator v5 SMC / ICT / price actionMoving averages
Updated 3 days ago · MIT GitHub repository of GBPUSD H1 QuadLayer

Zig Zag Labeler

by northis
3 stars

Calculates and plots zigzag swing lines directly on the price chart based on user-defined deviation and depth settings. It allows traders to number recent swing segments and assign specific Elliott Wave structural models, including impulses, zigzags, and diago

Indicator v6 Support & resistanceTrend Repaints
Updated 3 days ago · MIT GitHub repository of Zig Zag Labeler

Medallion Cipher

by ricksimpsontrading
3 stars

Medallion Cipher is a separate-pane indicator that combines a four-state hidden Markov model (bull, bear, range, and crisis) with weighted confluence signals. It can include mean reversion, trend, session timing, pattern matching, Hurst exponent, Shannon entro

Indicator v6 AI / machine learningMean reversion
Updated 8 days ago · None stated GitHub repository of Medallion Cipher
3 stars

The strategy plots SuperTrend and ADX indicators directly on the price chart. It generates long signals on SuperTrend bullish flips combined with ADX above the set threshold and closes positions on SuperTrend bearish flips or when stop-loss or take-profit leve

Strategy v5 TrendOscillators & momentum
Updated 11 days ago · None stated GitHub repository of OctaStack SuperTrend + ADX

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