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

MultiVolatility

by wanjo-tech
6 stars

MultiVolatility calculates and compares multiple annualized volatility metrics within a separate pane. It computes a traditional 20-day historical volatility using log returns on daily data scaled by 252 days, which displays on daily charts. Additionally, it i

Indicator v5 Volatility & bands
Updated 2 years ago · None stated GitHub repository of MultiVolatility

Edge 60

by subos2008
6 stars

This strategy executes a classic Donchian-style breakout system on the price chart. It calculates the highest high and lowest low over a user-defined lookback period offset by one bar. A long position is opened when the price breaks above the previous period h

Strategy v5 BreakoutTrend
Updated 2 years ago · Custom licence GitHub repository of Edge 60

RSI mean reversion

by broomva
5 stars

This strategy plots the relative strength index in a separate pane and trades mean reversion. It enters long when RSI crosses above the oversold level and enters short when RSI crosses below the overbought level. Opposite signals reverse the position. Size def

Strategy v5 Oscillators & momentumMean reversion
Updated yesterday · MIT GitHub repository of RSI mean reversion

HTF Timestamp Probe

by 345-strategies
5 stars

HTF Timestamp Probe is a diagnostic utility indicator that inspects how TradingView timestamps higher-timeframe bar open times. It requests open timestamps for weekly, monthly, quarterly, and yearly bars using lookahead security calls and displays the results

Indicator v6 Screeners & dashboards Repaints
Updated 3 days ago · MPL-2.0 GitHub repository of HTF Timestamp Probe

This strategy fits a binary logistic regression classification model bar by bar on the price chart to generate long trading signals. It computes model weights via iterative gradient descent based on user-defined learning rates, lookback windows, and normalizat

Strategy v5 AI / machine learningTrend Repaints
Updated 2 weeks ago · MIT GitHub repository of Xsodus Logistic Long Regression Strategy
5 stars

This strategy tracks pivot-constrained structural boundaries and executes breakout and retest trades directly on the price chart. It fits robust trendline boundaries using pivot points, evaluates structural quality via a Q-Score metric, and filters entries thr

Strategy v6 BreakoutSupport & resistance
Updated 8 weeks ago · None stated GitHub repository of RG Structure Trading v4.0

日内关键价位

by forecho
5 stars

This indicator calculates and plots key intraday session levels directly on the price chart. It tracks the regular trading hours (RTH) open, previous day close, previous day high, and previous day low, along with the high and low ranges for both the Asian and

Indicator v6 Support & resistanceSessions & time
Updated 8 weeks ago · None stated GitHub repository of 日内关键价位
5 stars

This strategy trades long when an M15 bar's low comes within a tolerance of the prior week's low and the bar closes above that level. It places a fixed point stop below entry and a take-profit at a chosen R-multiple of that stop. Entries are limited to a UTC s

Strategy v5 Support & resistanceSessions & time
Updated 5 months ago · MIT GitHub repository of WKL v2 — Prior Week Low Retest (Locked Spec)
5 stars

Calculates daily classical pivot points from the previous day's high, low, and close to identify intraday reversal setups within a defined trading session. Long signals fire when price comes within a configurable tick proximity to S1 and prints a bullish recla

Indicator v5 Support & resistanceMean reversion
Updated 5 months ago · Custom licence GitHub repository of Path C — Pivot-Point Bounce (Demo)

SMA Cross 50/200

by durdenbtc
5 stars

This strategy calculates a 50-period simple moving average and a 200-period simple moving average using closing prices. It enters a long position whenever the fast moving average crosses above the slow moving average, and closes the trade when it crosses below

Strategy v6 TrendMoving averages
Updated 5 months ago · MIT GitHub repository of SMA Cross 50/200

MACD Divergence

by chaise-cogent
5 stars

This indicator calculates the Moving Average Convergence Divergence (MACD) and signal line in a separate pane to detect regular bullish and bearish divergences. It identifies price pivot highs and lows using a configurable lookback length and compares them aga

Indicator v6 Oscillators & momentumDivergence
Updated 7 months ago · MIT GitHub repository of MACD Divergence

Double Smoothed Stochastic MTF

by SiegerTerpstra
5 stars

This indicator plots a multi-timeframe Double Smoothed Stochastic in a separate pane. It combines an exponential moving average ratio with stochastic normalization and optional moving-average smoothing, producing values from 0 to 100. Rising and falling values

Indicator v6 Oscillators & momentum
Updated 9 months ago · None stated GitHub repository of Double Smoothed Stochastic MTF

Scalping PullBack Tool R1.1

by Ahmed-GoCode
5 stars

This indicator plots a Price Action Channel (PAC) based on high, low, and close moving averages alongside fast, medium, and slow trend EMAs directly on the price chart. It detects regular and Bill Williams fractals to track market structure and identifies pull

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Scalping PullBack Tool R1.1

ATR Based Stoploss

by rubystar0512
5 stars

ATR Based Stoploss is an overlay indicator that calculates dynamic stop loss and take profit bands around a central simple moving average. It uses standard Average True Range or an ATR Surge Average derived from volatility spikes to offset profit and loss boun

Indicator v5 Volatility & bandsMoving averages
Updated 2 years ago · None stated GitHub repository of ATR Based Stoploss

Hedge Exit Algo

by jerryinyang
5 stars

Hedge Exit Algo provides position sizing and lot calculations for forex and precious metals hedging strategies. It evaluates pip values, currency conversion rates, and profit targets relative to account balance. The script defines custom lot sizing routines al

Indicator v5 Moving averages Repaints
Updated 2 years ago · None stated GitHub repository of Hedge Exit Algo

My Cipher v2

by Following-BTC
5 stars

My Cipher v2 plots a combined oscillator in a separate pane. It calculates a WaveTrend-style stochastic from Heikin Ashi prices, a volume-based money flow histogram, smoothed RSI, MACD-style lengths, and a Z-VWAP. Crosses mark WaveTrend turns; colored dots mar

Indicator v4 Oscillators & momentumDivergence
Updated 2 years ago · None stated GitHub repository of My Cipher v2

This short-only strategy identifies trend continuation setups on the price chart by combining 50 and 200 EMAs with Stochastic crossovers and RSI momentum filters. It executes short entries when the 50 EMA is below the 200 EMA, price trades below the 50 EMA, St

Strategy v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of 2 EMAs + RSI + Stochastic Short Strategy

Standard Lib

by vitahoang
5 stars

Standard Lib is a utility Pine Script library designed to assist developers with chart debugging and dynamic text display. It exports a print function that creates and updates a single text label on the price chart. The label automatically positions itself at

Library v5
Updated 3 years ago · None stated GitHub repository of Standard Lib

[CP]Pivot Boss Floor Pivots

by pranjalchaubey
5 stars

This indicator draws floor pivots and the central pivot range on the price chart. A timeframe input sets the pivot period from one hour through twelve months, and toggles control labels and next-period levels. When dynamic levels are on, an ATR threshold decid

Indicator v4 Support & resistanceMoving averages
Updated 3 years ago · None stated GitHub repository of [CP]Pivot Boss Floor Pivots

Triple Supertrend

by shyrwinsia
5 stars

This indicator calculates three distinct Supertrend lines on the main price chart, designated as short, medium, and long term. Each Supertrend line utilizes its own Average True Range period and multiplier settings to identify trend directions across different

Indicator v4 TrendVolatility & bands
Updated 5 years ago · MIT GitHub repository of Triple Supertrend

This strategy plots an eight-line exponential moving average ribbon spanning lengths 20 to 55 alongside a separate signal EMA directly on the price chart. It executes a long entry when price crosses above the signal EMA and enters short when price crosses belo

Strategy v4 TrendMoving averages
Updated 6 years ago · LGPL-3.0 GitHub repository of 35EMA Cross BuyAndSell Strategy + RIBBON [d3nv3r]

Antigravity Elite

by eltonaguiar
4 stars

Antigravity Elite is an overlay indicator that screens price with seven selectable components: Mercury Fear, Connors RSI-2, volatility-spike reversal, EMA stack, Supertrend, multi-sigma bands, and an optional funding proxy. Auto-Detect chooses one method, whil

Indicator v6 Oscillators & momentumMoving averages
Updated yesterday · None stated GitHub repository of Antigravity Elite

Commonlib

by InNoobWeTrust
4 stars

Commonlib is a Pine Script v6 library of bar-geometry helpers that draws nothing by itself. It measures the longer wick as a share of the high-low range, signed when the lower wick is longer, and the candle body as a signed share of that range. It combines tho

Library v6
Updated yesterday · None stated GitHub repository of Commonlib
4 stars

OptionX Noisy Test Signals calculates a short-period Relative Strength Index (RSI) and plots buy or sell shape markers on the main price chart when the RSI crosses above or below a chosen center level. It generates JSON-formatted alert payloads with symbol, pr

Indicator v6 Oscillators & momentum Repaints
Updated 2 days ago · MIT GitHub repository of OptionX Noisy Test Signals
4 stars

This strategy translates Python backtesting logic into Pine Script for intraday momentum trading. It calculates forced Heikin-Ashi candles and 1-minute moving averages to evaluate market trends and assign a signal strength score from 0 to 10. Entries execute w

Strategy v5 TrendMoving averages
Updated 2 days ago · None stated GitHub repository of Xiao Tang System v2 Strategy

EMA Cross + RSI Filter

by latentwill
4 stars

This strategy plots on the price chart and trades EMA crossovers filtered by RSI. It enters long when the fast EMA crosses above the slow EMA and RSI is above the minimum threshold. A cross below closes the long and opens a short without an RSI filter. Each en

Strategy v5 TrendMoving averages
Updated 7 days ago · None stated GitHub repository of EMA Cross + RSI Filter
4 stars

An all-in-one chart indicator combining Smart Money Concepts (SMC) and technical level analysis. It identifies Order Blocks, market structure shifts like CHoCH and BOS, KOLA support and resistance levels, SIDO chart patterns, and Fibonacci Optimal Trade Entry

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 weeks ago · MIT GitHub repository of GOM KOLA SIDO Full Integration
4 stars

Calculates and renders Time Price Opportunity (TPO) market profiles, Initial Balance (IB) ranges, and value distributions directly on the price chart. It determines key auction levels including the Point of Control (POC), Value Area High (VAH), Value Area Low

Indicator v6 Support & resistanceSessions & time
Updated 7 weeks ago · MPL-2.0 GitHub repository of Meridian - Futures Profile

ATR Levels

by trugurpala
4 stars

This indicator calculates the Average True Range and a Simple Moving Average of closing prices. It plots a central basis line along with dynamic support and resistance levels derived from multiples of the ATR. The main settings control the ATR length and the m

Indicator v6 Support & resistanceVolatility & bands
Updated 2 months ago · MIT GitHub repository of ATR Levels

Liquidity Magnet

by VolodymyrFilias
4 stars

Liquidity Magnet scores active liquidity pools on the price chart and highlights the pool most likely to be reached. It detects swing highs, swing lows, and equal high or low clusters, then ranks them using strength, proximity, age decay, and momentum bias. Eq

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 4 months ago · MIT GitHub repository of Liquidity Magnet

EMA Trail (Long Only)

by Jaden300
4 stars

This long-only strategy enters when the fast EMA crosses above the slow EMA and fills at the next bar open. It sets an initial percentage take profit and stop loss from the entry price. Once price rises by the trail trigger, both levels and the reference price

Strategy v6 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of EMA Trail (Long Only)

MACD 4H Rhythm

by LePotoRico2105
4 stars

MACD 4H Rhythm is a TradingView strategy that trades the price chart on a four-hour forex rhythm. It goes long when the MACD histogram crosses above zero while a 21-period EMA is above a 50-period EMA, and short on the opposite histogram turn in a bearish EMA

Strategy v5 Oscillators & momentumMoving averages
Updated 6 months ago · MIT GitHub repository of MACD 4H Rhythm

MACD

by YooooungLee
4 stars

This indicator calculates and plots the standard Moving Average Convergence Divergence oscillator in a separate pane. It computes a fast exponential moving average and a slow exponential moving average from the chosen price source, taking the difference as the

Indicator v6 Oscillators & momentumMoving averages
Updated 10 months ago · Apache-2.0 GitHub repository of MACD

Daily Loss Limit [Lab]

by mitchell-917
4 stars

This strategy example enforces a daily loss limit. It detects a new trading day, stores starting equity, and tracks the day's highest and lowest equity. Trading permission depends on whether the loss from the day's starting equity stays inside a percentage of

Strategy v5 Moving averagesSessions & time
Updated 11 months ago · Custom licence GitHub repository of Daily Loss Limit [Lab]

Calculates top and bottom reversal signals for oscillator indicators based on dynamic cycle detection, overbought and oversold thresholds, and price confirmation. It tracks indicator cycles using centerline crossovers, verifies overbought or oversold condition

Indicator v6 Oscillators & momentumSupport & resistance
Updated 1 year ago · Custom licence GitHub repository of Universal High-Low Detection Example

Harami Cross - Bullish

by Hugs-4-Bugs
4 stars

Harami Cross - Bullish detects the two-candle bullish Harami Cross pattern directly on the main price chart. It identifies a long red candle during a downtrend followed by a Doji candle contained entirely within the previous candle's body. Users can refine tre

Indicator v5 Candlestick patternsTrend
Updated 1 year ago · None stated GitHub repository of Harami Cross - Bullish

All Candlestick Patterns

by ShabbirHasan1
4 stars

All Candlestick Patterns identifies and highlights classical Japanese candlestick patterns directly on the price chart. It determines underlying market trends using configurable moving averages, including a 50-period SMA, a dual SMA 50/200 setup, or no trend f

Indicator v5 Candlestick patternsMoving averages
Updated 1 year ago · Custom licence GitHub repository of All Candlestick Patterns

Butterfly Pattern

by fox-buddy
4 stars

Butterfly Pattern plots a simple zigzag on the price chart. It treats a bar as up or down from the close versus the open, then records a turn when that direction reverses. On a downward turn it uses the highest price of the last two bars, and on an upward turn

Indicator v4 Support & resistance Repaints
Updated 2 years ago · None stated GitHub repository of Butterfly Pattern

ATCA-HO

by Kalumur
4 stars

ATCA-HO is an overlay indicator that plots six Exponential Moving Averages alongside a Simple Moving Average on the price chart. It generates visual buy and sell shape labels whenever the fastest 5-period EMA crosses above or below the 22-period EMA. Additiona

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of ATCA-HO

VolTargeting

by Robot-Wealth
4 stars

VolTargeting is a Pine Script v5 library of functions for volatility-based position sizing. ewmaVol estimates exponentially weighted annualised volatility from squared simple returns and scales it by the square root of 365 days for crypto or 252 days otherwise

Library v5 Volatility & bands
Updated 2 years ago · None stated GitHub repository of VolTargeting

Combines multiple analytical tools onto a single price chart overlay to consolidate screen space. It plots three customizable exponential moving averages, three-bar imbalance and opening gap boxes, a horizontal volume profile with point of control, and smart m

Indicator v5 SMC / ICT / price actionMoving averages Repaints
4 stars

This strategy implements a dollar-cost averaging (DCA) trading framework using Volume-Weighted Moving Average (VWMA) values and price percentage changes. It enters an initial base order and places up to a configurable number of safety orders as price declines

Strategy v5 Moving averagesScreeners & dashboards
Updated 2 years ago · None stated GitHub repository of SRP Strategy [ZCrypto]

Drift [DojiEmoji]

by kevinhhl
4 stars

This indicator calculates market drift using logarithmic returns adjusted for variance over a configurable lookback period. It measures underlying directional movement and plots a continuous line in a separate pane, colored blue when drift is positive and red

Indicator v5 TrendVolatility & bands
Updated 3 years ago · None stated GitHub repository of Drift [DojiEmoji]

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