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

Bollinger Band Strategy

by might-tree
4 stars

The Bollinger Band Strategy is a mean-reversion trading strategy designed to trade bounces off Bollinger Bands. It enters long positions when the closing price crosses above the lower band and short positions when it crosses below the upper band. Upon entry, t

Strategy v5 Volatility & bandsMean reversion
Updated 3 years ago · None stated GitHub repository of Bollinger Band Strategy

COG Multi

by kachook
4 stars

This indicator calculates and plots multiple Center of Gravity lines derived from closing prices using different periods of 9, 50, and 200. The Center of Gravity is smoothed with a factor of 9. Three lines are drawn in a separate pane: one in white with a thic

Indicator v4 Oscillators & momentumMoving averages
Updated 3 years ago · None stated GitHub repository of COG Multi
4 stars

Divergence Strategy scans multiple technical oscillators to detect regular and hidden divergences against price action. It evaluates customizable indicators including MACD, RSI, Stochastic, CCI, Momentum, OBV, and Money Flow Index to trigger strategy entries o

Strategy v4 DivergenceOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Divergence Strategy
4 stars

Snag - Swing Trade Long Term calculates 13-period, 48-period, and 200-period Weighted Moving Averages to evaluate market direction for long-term swing trading. The indicator monitors price crossovers across each moving average to identify initial trend shifts,

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

One EMA Strategy

by aofwittawat
4 stars

This strategy plots one exponential moving average of the close on the price chart and colors it and the background by whether price is above or below that average. It flips from short to long when the close crosses above the EMA and from long to short when th

Strategy v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of One EMA Strategy

Moving Average

by Joshua-Chang
4 stars

This script plots two exponential moving averages on the price chart, one fast and one slow. The fast MA uses length 5 and the slow MA uses length 34. It enters a long position of fixed size 1000 when the fast MA crosses above the slow MA and enters a short po

Strategy v4 Moving averagesTrend
Updated 5 years ago · None stated GitHub repository of Moving Average

This strategy overlays Ichimoku Cloud components alongside SuperTrend and RSI indicators directly on the price chart. It evaluates trend conditions using Tenkan-Sen, Kijun-Sen, and cloud spans, combining them with SuperTrend signals and RSI momentum boundaries

Strategy v4 TrendOscillators & momentum
Updated 6 years ago · Apache-2.0 GitHub repository of Ichimoku Cloud - Kijun-Sen - RSI - SuperTrend

EMA Cross Strategy

by degenview
3 stars

This strategy enters a long position when a fast EMA crosses above a slower EMA and closes that long when the fast EMA crosses back below. While a long is open, it places an ATR-based stop and a profit target measured from the average entry price. The main set

Strategy v6 TrendMoving averages
Updated yesterday · GPL-3.0 GitHub repository of EMA Cross Strategy
3 stars

ATD+ST+T3 Kripto Tarama is a chart overlay indicator and cryptocurrency scanner that combines AlphaTrend, SuperTrend, and T3 moving average signals. It plots trend lines, fills, and buy/sell label shapes directly on the main price chart while providing configu

Indicator v5 TrendVolatility & bands
Updated yesterday · None stated GitHub repository of ATD+ST+T3 Kripto Tarama

ATR Pip Control

by ricksimpsontrading
3 stars

ATR Pip Control is a volatility indicator that computes the Average True Range over a user-specified period and plots adaptive upper and lower bands around price using coefficients for band width. It applies a minimum filter size in ticks or pips to validate s

Indicator v6 Volatility & bandsSupport & resistance Repaints
Updated 9 days ago · None stated GitHub repository of ATR Pip Control

Relative Momentum Index

by AkashSasikumar47
3 stars

The Relative Momentum Index (RMI) is a momentum oscillator calculated in a separate pane. It modifies the standard RSI formula by evaluating price changes relative to a specified momentum lookback period rather than consecutive bars. The script plots the RMI o

Indicator v6 Oscillators & momentum
Updated 2 weeks ago · MIT GitHub repository of Relative Momentum Index

Oscillator Scaffold

by jpantsjoha
3 stars

The Oscillator Scaffold calculates an RSI value using the selected source and bar length. It plots the oscillator in a separate pane along with horizontal lines for overbought and oversold levels. The script fills the region between those levels and draws cond

Indicator v6 Oscillators & momentumSupport & resistance
Updated 3 weeks ago · Custom licence GitHub repository of Oscillator Scaffold

Average True Range

by jash-git
3 stars

This indicator calculates the average true range by taking a simple moving average of the true range over a user-set length. It plots that value as a thick line in a separate pane. The only setting changes the smoothing length, which defaults to 13 bars. The p

Indicator v5 Volatility & bands
Updated 4 weeks ago · None stated GitHub repository of Average True Range

This indicator combines Supertrend for main trend filtering, DeMarker for momentum extremes, and Stochastic RSI for overbought/oversold signals on multiple timeframes. It plots buy/sell arrows and trend labels directly on the price chart. Additional filters in

Indicator v6 TrendOscillators & momentum
Updated 5 weeks ago · MIT GitHub repository of Zerith - Supertrend + DeMarker + Stoch RSI Multi-TF Signal
3 stars

This long-only strategy draws on the price chart. It uses MACD with the 21- and 52-period exponential moving averages. While the signal line is above zero and the faster average is above the slower one, it marks a histogram pullback and enters long on a bullis

Strategy v5 Oscillators & momentumMoving averages
Updated 7 weeks ago · None stated GitHub repository of MACD能量柱跳空策略

AI Trading Bot - 19 Modules

by thanhcong1211
3 stars

This strategy overlays trend, momentum, and simplified Smart Money Concepts (SMC) directly on the price chart. It evaluates market conditions using triple EMAs (20, 50, 200), MACD crossovers, RSI levels, and volume moving averages alongside simplified order bl

Strategy v5 SMC / ICT / price actionTrend
Updated 3 months ago · None stated GitHub repository of AI Trading Bot - 19 Modules

Mc War v2

by tuanmcwar
3 stars

Calculates and plots Smart Money Concepts market structure elements directly on the main price chart. It highlights bullish and bearish market structure breaks, including Change of Character and Break of Structure, alongside swing points and strong or weak lev

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

MTF Confluence Dashboard

by WiseManAlgo
3 stars

This indicator displays a multi-timeframe confluence dashboard and signal arrows directly on the main price chart. It evaluates trend and momentum across five configurable timeframes for up to three symbols using an exponential moving average and the relative

Indicator v5 Screeners & dashboardsTrend
Updated 4 months ago · None stated GitHub repository of MTF Confluence Dashboard

% Chg Lines

by g-moe
3 stars

This indicator plots the previous daily close and five pairs of price levels set a chosen percentage above and below that close. It draws the previous close and each offset as cross-style plots on the price chart, fills the span to the outermost upper and lowe

Indicator v5 Support & resistance
Updated 5 months ago · None stated GitHub repository of % Chg Lines
3 stars

This strategy plots a fast and a slow exponential moving average on the price chart and shades the background by which average is higher. It enters a long position when the fast average crosses above the slow average and closes that long when the fast average

Strategy v5 TrendMoving averages
Updated 7 months ago · MIT GitHub repository of EMA Crossover Trend Following
3 stars

Stella's RSI + EMA Crossover is a momentum strategy that plots exponential moving averages directly on the price chart. It generates long signals when RSI turns up from oversold levels while price trades above the fast EMA and optional 200-period trend filter

Strategy v6 TrendOscillators & momentum
Updated 8 months ago · MIT GitHub repository of Stella's RSI + EMA Crossover

Value Zones

by LucasRibeiroCaetano
3 stars

Value Zones plots a 200-week simple moving average that is further smoothed with a 20-period exponential moving average, then draws fixed multiples of that average on the price chart. Zones are filled and labeled from the average itself through one-and-a-half,

Indicator v6 Moving averagesSupport & resistance
Updated 11 months ago · Custom licence GitHub repository of Value Zones

This indicator plots the high, midpoint, and low of the previous day, week, and month as lines on the price chart. Daily levels appear on intraday charts, weekly levels on intraday or daily charts, and monthly levels on charts that are not monthly. Users can t

Indicator v6 Support & resistanceMoving averages Repaints
Updated 12 months ago · None stated GitHub repository of High/Mid/Low of the Previous Month, Week and Day + MA
3 stars

This overlay indicator recreates short-setup conditions and audits their later outcomes on the price chart. It scores optional percent-surge, RSI overbought rollover, Bollinger exhaustion, volume spike, and EMA trend filters, then marks BASE or STRONG signals

Indicator v6 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of Hedge Short Setup Outcome Auditor

Pi Cycle Top Indicator

by EngineeredSuccess
3 stars

The Pi Cycle Top Indicator calculates a 111-period simple moving average alongside a scaled 350-period simple moving average to detect potential market cycle highs, historically utilized for Bitcoin analysis. It identifies crossovers between the moving average

Indicator v6 Moving averagesTrend
Updated 1 year ago · Custom licence GitHub repository of Pi Cycle Top Indicator
3 stars

BTMM Comprehensive Risk Management is an overlay indicator that calculates position sizing, stop loss levels, and multiple take profit targets based on the Beat The Market Maker methodology. It supports various stop loss methods including ATR, EMA, Asian Range

Indicator v5 Support & resistanceScreeners & dashboards

MOTO ka AgniAstra

by HelloMoto069
3 stars

MOTO ka AgniAstra is a price-chart overlay that smooths the selected source with a Gaussian window and draws upper and lower bands from a scaled mean absolute error. When repainting smoothing is on, it recalculates the curve across recent bars and marks band c

Indicator v5 Volatility & bandsTrend Repaints
Updated 1 year ago · None stated GitHub repository of MOTO ka AgniAstra

Sapphire FiboBands Strategy

by sapphire-edge
3 stars

This strategy plots Fibonacci Bollinger Bands on the price chart. It generates buy and sell signals based on selected Fibonacci ratios (1.618, 2.618, or 4.236) combined with Bollinger Band calculations using a configurable source and length. Trades enter on ma

Strategy v5 Volatility & bandsSupport & resistance
Updated 1 year ago · None stated GitHub repository of Sapphire FiboBands Strategy

This indicator marks bullish and bearish engulfing candlestick patterns on the price chart. A bullish signal needs a bullish candle after a bearish candle, a high-low range that covers the previous bar, and a floored body that covers the previous body. A beari

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Engulfing Bullish/Bearish (Candlestick Pattern)

Supertrend Strategy

by imzeeshan
3 stars

This systematic trend-following strategy executes long trades based on Supertrend indicator flips. Entry occurs when the Supertrend direction turns bullish, provided the date range and optional benchmark filter are satisfied. The benchmark filter verifies whet

Strategy v5 TrendVolatility & bands
Updated 2 years ago · MIT GitHub repository of Supertrend Strategy

This time-based strategy trades overnight holding periods on the New York Stock Exchange, plotting execution labels directly on the price chart. It triggers a fixed long entry ten minutes before the regular session ends at 15:50 New York time. The strategy exe

Strategy v5 Sessions & time
Updated 2 years ago · GPL-3.0 GitHub repository of Buy Before Close, Sell After Open (NYSE)

This indicator plots the Relative Strength Index and Money Flow Index together in a separate pane. It calculates both oscillators using user-defined lookback lengths and price source inputs. Horizontal reference lines mark standard levels at twenty, fifty, and

Indicator v5 Oscillators & momentumVolume
Updated 2 years ago · MIT GitHub repository of Relative Strength Index And Money Flow Index

The Bitcoin Wallet Transaction Volume indicator plots Bitcoin on-chain wallet transaction volume from Quandl BCHAIN/MWTRV in a separate pane. It calculates BWTV and colors volume bars lime when above EMA(periodo)*fator on up days or red on down days. An option

Indicator v4 VolumeMoving averages
Updated 3 years ago · Apache-2.0 GitHub repository of Bitcoin Wallet Transaction Volume (QUANDL:BCHAIN/MWTRV)

This strategy overlays a linear regression channel and two moving averages on the price chart. It uses the regression deviation and optional Supertrend ATR filter to qualify direction, and can enter on a moving-average cross when that option is enabled. Long t

Strategy v5 TrendMoving averages Repaints
Updated 3 years ago · None stated GitHub repository of Fedra Algotrading Strategy Trailing Stop

Forex Boxes

by maxits
3 stars

This indicator overlays custom session boxes and time markers directly on the price chart based on specified GMT-4 hours. It identifies distinct intraday timestamps including 4pm and the 3am to 3pm window while tracking volume and plotting one-minute closing p

Indicator v4 Sessions & time
Updated 4 years ago · None stated GitHub repository of Forex Boxes

Currency Strength Chart

by itmakesyousick
3 stars

Calculates and plots the relative strength of eight major forex currencies in a separate pane using logarithmic price differences across currency pairs. It visually displays relative currency performance using customizable lines, histograms, or dynamic table o

Indicator v5 Screeners & dashboardsOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Currency Strength Chart
3 stars

Greeffer's Hedge Mode Study is an indicator that plots multiple EMAs along with Donchian channels directly on the price chart. It calculates EMAs from 8, 17 and 72 periods using higher timeframe data from 240 minutes. The script monitors price action against t

Indicator v5 Moving averagesSupport & resistance
Updated 4 years ago · CC0-1.0 GitHub repository of Greeffer's Hedge Mode Study
3 stars

The Moving Averages Crossover Bot calculates two configurable moving averages directly on the price chart using selectable types such as SMA, EMA, WMA, RMA, HMA, DEMA, or TEMA. It identifies signals when the first moving average crosses above or below the seco

Strategy v4 Moving averagesTrend Repaints
Updated 5 years ago · None stated GitHub repository of Moving Averages Crossover Bot

HPI

by blackcat1402
3 stars

HPI marks a bar on the price chart when its open is the highest open over a configurable lookback and the bar is red, meaning the open is above the close. It plots a small red label reading HPI above that bar. The only setting, HPI Recent Bar, sets how many ba

Indicator v4 Candlestick patternsSupport & resistance Repaints
Updated 5 years ago · MIT GitHub repository of HPI

QQQ 1min Pure Runner

by yalili8521
2 stars

This intraday strategy enters long or short positions on 1-minute charts of QQQ based on a triple moving average stack. It filters entries by requiring an accumulation or distribution sequence of consecutive rising or falling bars while rejecting bars exceedin

Strategy v6 TrendMoving averages
Updated 8 days ago · None stated GitHub repository of QQQ 1min Pure Runner

3x MA = Moving Average

by piecioshka
2 stars

The 3x MA indicator plots three moving averages on the price chart: a short-term, medium-term, and long-term average. Users can customize the period lengths, the type of moving average (including SMA, EMA, WMA, VWMA, and RMA), and the colors for each. Optional

Indicator v6 Moving averagesTrend
Updated 11 days ago · MIT GitHub repository of 3x MA = Moving Average

MA Spectrum 7

by vtnhqw
2 stars

MA Spectrum 7 plots up to seven configurable moving averages directly on the price chart across two distinct groupings. The faster tier calculates 20, 50, 100, and 200-period averages using a selectable calculation method, including SMA, EMA, RMA, WMA, and VWM

Indicator v6 Moving averagesTrend
Updated 11 days ago · None stated GitHub repository of MA Spectrum 7

Sukepoyo Sub

by Pesci1134
2 stars

This indicator plots two ZigZag lines and five EMAs on the price chart. ZigZag 1 uses depth 12, deviation 5 and backstep 3 for the main trend. ZigZag 2 uses depth 5, deviation 3 and backstep 2 for the fast trend. Five EMAs with lengths 20, 30, 40, 75 and 200 a

Indicator v6 Moving averagesTrend
Updated 2 weeks ago · None stated GitHub repository of Sukepoyo Sub

Calculates Gaussian kernel moving averages adjusted by directional price alignment and normalized by ATR. The indicator applies fast and slow smoothing lengths with custom kernel bandwidth and directional weighting settings to smooth price action while minimiz

Indicator v6 TrendMoving averages
Updated 2 weeks ago · MIT GitHub repository of Directional Kernel Filter [BackQuant]

Key Levels MP

by midngtpickle
2 stars

Key Levels MP draws session and higher-timeframe reference prices on the price chart. It plots the Asia session high, low, and midpoint, the Monday range high, low, and open, the daily open, previous-day high, low, and midpoint, and current-week high, low, and

Indicator v6 Support & resistanceSessions & time
Updated 4 weeks ago · Custom licence GitHub repository of Key Levels MP

Forex Trading Strategy

by AmjadSaidam
2 stars

Forex Trading Strategy is an overlay indicator designed for multi-timeframe session analysis on forex markets. It calculates open, high, and low values across 1-hour, 4-hour, and 8-hour timeframes to identify key session ranges. The script filters valid candle

Indicator v6 Support & resistanceSessions & time
Updated 5 weeks ago · MIT GitHub repository of Forex Trading Strategy

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