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

Simple Pullback Strategy

by Web3Degenerate
2 stars

This strategy executes long trades during pullbacks within an established uptrend, plotting moving averages, entry prices, and stop levels on the price chart. It buys when the close is above the long-term simple moving average and below the short-term moving a

Strategy v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Simple Pullback Strategy

Bollinger ZigZag ++

by WISEPLAT
2 stars

Bollinger ZigZag ++ combines Bollinger Band percent B calculations, pivot points, and a ZigZag filter to mark potential support and resistance levels directly on the price chart. It detects overbought and oversold thresholds relative to the bands and draws vis

Indicator v4 Volatility & bandsSupport & resistance Repaints
Updated 3 years ago · None stated GitHub repository of Bollinger ZigZag ++
1 stars

An extended version of the JAT+BSM strategy that adds a strategy preset, a risk aggression choice and a pattern type filter to the AlphaTrend style core, MACD, consolidation layers, volume profile and candlestick and macro pattern drawings. Forecasts use kinem

Strategy v5 TrendOscillators & momentum
Updated yesterday · None stated GitHub repository of JAT+BSM Pro v13 Extended
1 stars

This mean-reversion strategy implements Larry Connors' 2-period RSI system. It enters long positions when price trades above a long-term simple moving average (default 200) and the 2-period RSI drops below 10. Optional short positions enter below the trend ave

Strategy v6 Mean reversionOscillators & momentum
Updated 3 days ago · MPL-2.0 GitHub repository of RSI-2 (Larry Connors) [JR]

SMC Profile Context

by skipp-dev
1 stars

SMC Profile Context is an indicator that operates as a decision-support companion overlay in a separate pane. It imports pre-calculated fields from an external micro-profiles library to display ticker quality metrics and market context. The indicator visualize

Indicator v6 SMC / ICT / price actionScreeners & dashboards
Updated 3 days ago · None stated GitHub repository of SMC Profile Context

ES point-value 9/21 SMA cross

by pineforge-4pass
1 stars

This strategy isolates ES futures point-value PnL scaling using a nine-period and twenty-one-period simple moving average cross. It enters one long contract when the fast average crosses above the slow average and closes that long when the fast average crosses

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of ES point-value 9/21 SMA cross

P_err_input_in_function

by GammaExpansion
1 stars

This v6 indicator defines a function f that accepts an integer input and plots the function result. The plot appears on a separate pane. No trading signals or position rules exist. The script tests input handling inside functions and draws a constant value on

Indicator v6
Updated 6 days ago · MIT GitHub repository of P_err_input_in_function

A strategy that uses ADX to decide between two sub-strategies. In ranging conditions it fades asymmetric Bollinger Band extremes with a 200 EMA trend filter. In trending conditions it trades Donchian channel breakouts, protected by optional volume, candle rang

Strategy v6 Mean reversionBreakout
Updated 7 days ago · GPL-3.0 GitHub repository of Hierarchical Trading System v6 Fakeout Protected

DEPV2 DEBUG S0

by YuceSezar89
1 stars

DEPV2 DEBUG S0 monitors 20 major cryptocurrencies on Binance including BTC, ETH, SOL, XRP, DOGE and others. It generates signals using four methods: TREND, MOMENTUM, VOLATILITY and VOLUME. Users choose from same-time confirmation, sequential confirmation or au

Indicator v6 TrendOscillators & momentum Repaints
Updated 12 days ago · None stated GitHub repository of DEPV2 DEBUG S0
1 stars

This indicator plots mirrored price and parallel lines on the chart. It defines a base line using two input points and calculates the maximum deviation for a price channel by reflecting the close price around the base line. Users can apply the reflection to th

Indicator v6 TrendSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Mirrored Price & Parallel Lines

Terminal Velocity Stop

by vedkanani123
1 stars

An ATR trailing stop drawn on the price chart. The stop chases a target set at a multiple of ATR below price in an uptrend and above price in a downtrend, but its travel per bar is capped at a terminal velocity setting measured in ATR, 0.3 by default. This kee

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Terminal Velocity Stop
1 stars

Finds volume order blocks, zones where heavy volume built up around a moving average crossover, and draws them on the price chart as support or resistance areas. Six sensitivity tiers each produce buy and sell tier signals with mutually exclusive handling, plu

Indicator v6 SMC / ICT / price actionVolume
Updated 2 months ago · None stated GitHub repository of VOB v11 Full HW Coincidence

FUTURES-IWBADT Trading Bot

by GreyssonEnterprises
1 stars

A Pine v4 indicator that judges trend by comparing a 9 and an 18 period EMA on three higher timeframes (1 hour, 4 hour and daily by default) and optionally the chart timeframe. Background colours show when all or most timeframes agree on direction. Settings in

Indicator v4 TrendMoving averages Repaints
Updated 2 months ago · MIT GitHub repository of FUTURES-IWBADT Trading Bot

V9 Watchlist Ranker

by kevinesk
1 stars

Evaluates intraday trading rules across ten ticker symbols simultaneously using multi-symbol data requests. It monitors 5-minute volume surges, price breakout pivots, moving average positioning, and session time filters customized for Bursa Malaysia trading ho

Indicator v5 Screeners & dashboardsScalping
Updated 4 months ago · None stated GitHub repository of V9 Watchlist Ranker

Support and Resistance

by rubbermetal
1 stars

Support and Resistance finds pivot highs and lows using configurable left and right bar counts and keeps the most recent levels, merging nearby pivots into one zone and counting touches. Zones are drawn as boxes and lines with optional labels, plus break and t

Indicator v6 Support & resistance
Updated 4 months ago · MPL-2.0 GitHub repository of Support and Resistance
1 stars

Corpus Switch And Strings is a multi-asset strategy that calculates the price spread between two configurable symbols on a set timeframe. It evaluates the spread using a string switch selection to compute either a 9-period Exponential Moving Average, a 9-perio

Strategy v5 Moving averagesOscillators & momentum
Updated 4 months ago · MIT GitHub repository of Corpus Switch And Strings

Supertrend

by shubhamtaywade82
1 stars

Plots the built-in Supertrend line on the price chart as a single blue line. It has two settings, the ATR length with a default of 10 and the ATR multiplier with a default of 3. The line trails price and flips side when price closes through it. There are no al

Indicator v6 TrendVolatility & bands Archived
Updated 5 months ago · None stated GitHub repository of Supertrend
1 stars

This indicator marks swing highs and lows from pivot bars on the price chart and projects dates ahead using Gann and Hurst cycle timing ideas. Tables show the pivot dates and nearby future dates, with colours for bullish and bearish pivots. The left and right

Indicator v5 Support & resistance
Updated 6 months ago · None stated GitHub repository of Gann Hurst Pivot HL 2024 V1.1

Rainbow EMA & SMMA

by ymlee1104
1 stars

This script plots a rainbow ribbon overlay composed of eight Exponential Moving Averages ranging from 10 to 50 periods alongside two Smoothed Moving Averages on the main price chart. It evaluates complete moving average alignment across all calculated lengths

Indicator v6 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of Rainbow EMA & SMMA
1 stars

This volume divergence indicator detects bullish and bearish divergences on the price chart. Bullish divergence occurs when price forms a lower low but volume forms a higher low, and bearish divergence when price forms a higher high but volume forms a lower hi

Indicator v5 DivergenceVolume
Updated 8 months ago · None stated GitHub repository of VolDivAlgo (Volume Divergence)
1 stars

This indicator plots a standard MACD line, signal line, and color-coded histogram in a separate pane, with a zero line. It finds pivot highs and lows on both price and the histogram using a shared pivot length. Alerts fire when a histogram pivot high or low is

Indicator v5 Oscillators & momentumDivergence
Updated 9 months ago · None stated GitHub repository of MACD Histogram Divergence

V5 Combination by yzz

by webcrack4
1 stars

V5 Combination by yzz is a composite chart indicator that integrates a Volume Profile and Market Profile (TPO) tool with a MACD oscillator overlay. The profile section calculates price distribution across configurable range modes, plotting the Point of Control

Indicator v5 VolumeSupport & resistance
Updated 9 months ago · None stated GitHub repository of V5 Combination by yzz

Elder Force Index

by ivansoft
1 stars

Plots the Elder Force Index in a separate pane: the change in close multiplied by volume, smoothed with an exponential moving average of 13 bars by default. A zero line separates positive from negative readings. The script raises an error when the data vendor

Indicator v6 VolumeOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Elder Force Index

Voss Predictive Filter

by amico1234
1 stars

The Voss Predictive Filter indicator calculates a custom Voss filter and plots it alongside the Voss line in a separate pane. It processes the selected source to produce filtered output and Voss values based on length, predict, and bandwidth settings. The main

Indicator v4 Moving averagesVolatility & bands
Updated 2 years ago · None stated GitHub repository of Voss Predictive Filter

A Pine v4 overlay that plots simple moving averages of 50, 100 and 200 periods on a chosen source, with progressively thicker lines. Each line is green while it is rising and red while it is falling. An optional background colour is available, and the three le

Indicator v4 Moving averagesTrend
Updated 3 years ago · None stated GitHub repository of QS Institutional Moving Averages

PR Index

by JohnsonHsiao
1 stars

This indicator calculates a normalized price range oscillator in a separate pane. It computes the position of the current close relative to the highest and lowest close over a configurable lookback period. The output values range between zero and one, compleme

Indicator v5 Oscillators & momentum
Updated 3 years ago · None stated GitHub repository of PR Index
1 stars

A Pine v4 strategy that plots a 27-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of LINKWETH EMA Cross Strategy
948 stars

The Derivative Oscillator calculates a double-exponentially smoothed Relative Strength Index (RSI) and subtracts its Simple Moving Average (SMA) to form the main oscillator line. A secondary signal line is plotted using an SMA of the main oscillator values. Th

Indicator v4 Oscillators & momentumMoving averages
Updated 11 days ago · GPL-3.0 GitHub repository of Derivative Oscillator
330 stars

This strategy combines triple exponential moving averages with a TTM Squeeze oscillator to capture trend-following momentum. It enters long or short positions when price aligns with all three EMAs (125, 680, and 2500 period) and the oscillator turns in the tre

Strategy v5 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Improvising [Alorse]

ALMDG Tracker

by Allen1212
303 stars

ALMDG Tracker visualizes historical buy and sell transactions executed by ARK Invest funds for the ALMDG ticker directly on the main price chart. It plots visual labels at specific trade dates, indicating transaction types and the count of participating ARK ET

Indicator v4
Updated 2 years ago · None stated GitHub repository of ALMDG Tracker

Function K-Means Clustering

by ricardosantos79
261 stars

Calculates K-Means clustering on two-dimensional float data arrays directly within Pine Script. The script initializes cluster centers randomly from data points and iteratively assigns points to clusters based on Euclidean distance calculations. User settings

Indicator v5 AI / machine learning
Updated 4 years ago · None stated GitHub repository of Function K-Means Clustering
257 stars

This overlay strategy is named for one-minute gold. It requests the daily low and several higher-timeframe opens with lookahead enabled, builds a synthetic source from recent opens, and plots a volume-weighted moving average of a higher-timeframe open with sta

Strategy v5 Moving averagesVolatility & bands Repaints
Updated 6 weeks ago · None stated GitHub repository of GOLD 1M - No repaint
218 stars

This strategy enters long when a faster moving average crosses above a slower one and short when it crosses below, unless long-only mode is on. An optional volume filter requires volume above a 20-bar average times a multiplier. Exits use a percentage stop los

Strategy v6 TrendMoving averages
Updated 3 months ago · None stated GitHub repository of MA Cross Strategy Template
114 stars

This indicator implements a binary logistic regression classification model retrained on each bar using gradient descent optimization. It processes normalized price features through a sigmoid activation function to classify market direction and generate direct

Indicator v4 AI / machine learningTrend Repaints
Updated 1 year ago · None stated GitHub repository of Machine Learning: Logistic Regression

Accumulate

by hasnocool
106 stars

Accumulate identifies potential market accumulation and breakdown phases by combining four Simple Moving Averages (21, 50, 90, and 200 periods) with a Price Volume Trend (PVT) MACD indicator. Green buy arrows plot on the main price chart when price is above a

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Accumulate

Bias (BIAS)

by mihakralj
99 stars

This indicator calculates Bias as the relative deviation of a chosen source from its simple moving average, using (source minus average) divided by the average. It maintains a circular buffer and running sum so the average updates bar by bar, and it refuses a

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Bias (BIAS)
65 stars

This strategy calculates the 20-period RSI and detects bullish and bearish crosses at the 50 level. On a bullish crossover it enters a long position using a stop set to the high price and sends a custom alert message with the stop value. On a bearish crossunde

Strategy v5 Oscillators & momentum
Updated 5 days ago · GPL-3.0 GitHub repository of Strategy using alert_message
55 stars

This indicator plots horizontal support and resistance from confirmed pivot lows and pivot highs, using ten bars on each side. When a new pivot appears, it replaces the previous line and extends it ten bars beyond the current bar. A translucent gray fill marks

Indicator v5 Support & resistanceVolume
Updated 6 months ago · Apache-2.0 GitHub repository of AAPL Structural Lines & Fills
47 stars

Ehlers Phasor Analysis calculates the phasor angle, derived cycle period, and market trend state using John Ehlers' cycle analysis techniques. It uses correlation against cosine and sine waveforms over a customizable lookback period to extract in-phase and qua

Indicator v6 TrendOscillators & momentum
Updated 8 months ago · MIT GitHub repository of Ehlers Phasor Analysis (PHASOR)
46 stars

This indicator draws colored boxes for six four-hour New York sessions, from 6pm through 2pm, and tracks each window's open, high, low, and close. It marks the high of day and low of day and records whether those extremes are later eliminated. A checkpoint tab

Indicator v5 Sessions & timeSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of 4H HOD/LOD Checkpoint Analysis

Chande Momentum Oscillator

by TWODS-CAPITAL
37 stars

This indicator plots the Chande Momentum Oscillator in a separate pane. It splits bar-to-bar changes of a chosen source into positive and negative parts, sums each over a lookback length, and scales the difference of those sums by their total into a percentage

Indicator v5 Oscillators & momentum
Updated 3 years ago · MIT GitHub repository of Chande Momentum Oscillator

Zen Z Bars V1

by Zen-Tim
29 stars

Zen Z Bars V1 analyzes bar-by-bar price action, candle range expansion, and internal bar strength (IBS). It identifies breakouts, inside and outside bars, climax candles based on range expansion factors, and tiered range multiple bars. The indicator draws brea

Indicator v5 Candlestick patternsBreakout
Updated 2 weeks ago · MIT GitHub repository of Zen Z Bars V1
16 stars

This strategy enters long or short on Donchian channel breakouts and adds units only while RSI remains beyond its momentum thresholds. Size is based on a percentage of equity per unit, up to a set maximum. An ATR initial stop and a chandelier trail manage open

Strategy v6 TrendOscillators & momentum
Updated 12 months ago · None stated GitHub repository of Seykota Alt 30: Momentum Pyramid

Diverlong D002

by ruckard
13 stars

Diverlong D002 is a trading strategy designed for crypto assets that detects momentum divergences using state changes in the Squeeze Momentum Indicator. It triggers long or short entries when price and momentum diverge across indicator sections. Trade exits ar

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Diverlong D002

Exhaustion Scanner is an overlay indicator that measures overextension and reversal risk by evaluating price stretch, momentum exhaustion, and candle triggers. It combines distance from moving averages and Bollinger Bands with momentum oscillators, divergence

Indicator v6 Oscillators & momentumVolatility & bands
Updated 2 days ago · MIT GitHub repository of Exhaustion Scanner [WavesUnchained]

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