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.
Donald - Test Logic Futures is an overlay strategy designed for intraday futures trading. It combines kernel regression functions with exponential moving averages to evaluate price retracements and entry timing. Trades are filtered by session execution windows
Wick Power Shift calculates and plots the smoothed average sizes of upper and lower candlestick wicks in a separate pane. It measures lower wick length (distance from the lower body to the low) and upper wick length (distance from the upper body to the high),
This educational script draws a vertical line on the price chart at 9:30 AM New York time to mark the standard US equity market open. It uses the line.new function to plot a thick, semi-transparent gray vertical line extending from above the bar high to below
This indicator detects a Bollinger Band squeeze when the bands sit inside Keltner Channels, marking low volatility. It plots red dots during a squeeze and green dots when the bands are outside, in a separate pane. An optional histogram shows momentum as the cl
22-MA Strategy plots a selectable center moving average on the price chart and marks upper and lower levels a fixed pip distance from that average. It supports twenty-two average types, from SMA, EMA, and HMA variants through filters such as Kalman and JMA-sty
This strategy plots on the price chart and enters when three smoothed moving averages are aligned, RSI is on the matching side of 50, and a Williams fractal appears. An upward stack with RSI above 50 and a down fractal opens a long; the opposite setup opens a
This indicator calculates Aroon Up and Aroon Down from the bars since the highest high and the lowest low inside a chosen period. It plots both series in a separate pane with horizontal lines at 30, 50 and 70. The period input sets the lookback used for those
This indicator estimates gamma exposure levels and intraday context for index instruments like SPY and ES. It calculates VWAP with standard deviation bands as a gamma flip proxy, highlighting market regimes through background colors. It plots prior day high, l
This educational script demonstrates Pine Script dynamic coloring techniques by plotting the closing price in a separate pane. It evaluates whether the current bar is bullish or bearish by comparing the close price to the open price. If the bar is bullish, it
This script implements an automated unit testing suite for a 4-hour swing trading system based on market structure and MACD. Utilizing a custom PineUnit framework with user-defined types, it validates mock functions for change of character, break of structure,
This indicator maps Smart Money Concepts (SMC) features directly on the price chart. It detects and visualizes internal and swing market structure breaks (BOS and CHoCH), bullish and bearish order blocks, equal highs and lows, and strong or weak swing points.
This indicator plots the Parabolic SAR on the price chart as crosses. It computes SAR with a start of 0.02, an increment of 0.02, and a maximum of 0.2, then colors each point green when the SAR value sits below the close and red otherwise. Those acceleration v
This strategy implements Larry Connors' 2-period RSI mean-reversion algorithm overlaid on the price chart. It filters trades using a long-term Simple Moving Average (SMA), entering long positions when the price trades above the SMA and the short-term RSI drops
Calculates and plots a second-order Butterworth low-pass infinite impulse response filter on the price chart. It smooths price series data by attenuating high-frequency market noise according to a specified cutoff period. Users can adjust the length setting an
NQ Stats - Initial Balance calculates and displays the Initial Balance range, including the session high, low, and midpoint, for a customizable intraday time window. Once the defined calculation period ends, the indicator overlays a shaded box and a midpoint l
This indicator calculates the Relative Strength Index using a volume-weighted moving average of the closing price as its source. It plots the resulting oscillator in a separate pane alongside configurable overbought and oversold threshold lines. The plot line
This overlay strategy is written for the SOLUSDT perpetual on the one-minute chart. It tracks confirmed pivot highs and lows as resistance and support circles, then marks strong buy or sell states when close crosses those levels. Long and short conditions comp
Planetary Retrograde Periods calculates and visualizes planetary retrograde motion directly on the price chart using geocentric ephemeris speed algorithms. It supports planets from Mercury through Pluto and divides retrograde cycles into two distinct phases wi
This indicator calculates the relative strength of the current asset compared to a benchmark symbol such as SPY. It stores the price ratio across a configurable lookback window, ranks the current ratio as a percentile from 0 to 100, and plots the result as a c
This indicator draws an automatic pitchfork on the price chart from successive pivot highs and lows. Depth sets how many bars are used to find those pivots. The type setting chooses Original, Schiff, Modified Schiff, or Inside geometry. It plots a median line
Zen rEMA is an overlay indicator that calculates an exponential or simple moving average and an ATR-normalized slope angle over a chosen lookback. Optional markers show an always-in state that turns long after two bull bars close above the average and short af
This indicator tracks intra-bar execution by accumulating ticks using a varip integer variable. It calculates the running count of price updates across bars and plots the total tick count in a separate pane below the chart. The script features no customizable
The Tri VWMA indicator calculates and plots three Volume Weighted Moving Averages on the price chart using customizable lookback periods. It displays three distinct moving average lines to help users analyze price trends and relationships across multiple time
Daily Volume is an overlay indicator that displays current daily volume statistics inside an on-chart table in the top-right corner. It fetches higher-timeframe daily data to report real-time current daily volume, yesterday's total volume, and a simple moving
The Normalize Heatmap Indicator scales a chosen price source between 0 and 1 over a set lookback period using stochastic-style min-max normalization. It paints price candles on the main chart using configurable Rainbow or RGB color gradients based on the norma
This strategy combines Relative Strength Index and Bollinger Bands for short-term signal generation. It enters long positions when the price crosses below the lower Bollinger Band while the RSI falls at or below the oversold threshold. Positions are scaled dow
This trend-following strategy adapts classic Donchian breakout channels according to market volatility regimes. It calculates an ATR percentile rank across a rolling lookback period, shifting dynamically between tighter breakout channels with smaller stops dur
Follow Line Indicator X HULL combines a Bollinger Band and ATR-filtered trend line with Hull Moving Average variations (HMA, EHMA, THMA) on the price chart. It plots dynamic trend lines, visual bands, and entry or exit signal shapes on trend flips. Users can t
Trend Compass 1H provides strategic trend assessment and higher-timeframe context for 1-hour price charts. It plots an exponential moving average ribbon along with key structural reference levels from higher timeframes, including 4-hour, daily, and weekly EMAs
Divergenced A002 is a momentum divergence strategy designed to identify entry opportunities using Squeeze Momentum Indicator shifts alongside price action. It enters long when momentum reaches higher lows during lower price lows and enters short on opposite di
This overlay indicator assigns a next-candle bias from the prior candle: previous-candle high, previous-candle low, an inside-bar version of that bias, or none. Outside bars clear the bias. After each confirmed bar it records whether price tags the prior high
This strategy replays a stored sequence of Bitcoin trades on the price chart. It places long or short limit orders with fixed quantities and prices when a bar close matches a hardcoded timestamp, then closes each trade at another timestamp. Several orders can
The script calculates a variant of the Fear & Greed Index using rate of return, accumulation distribution money flow weighted by volume, and volatility from VIX. It offers display options for the raw index value or price candles scaled by the index level. Smoo
WE Alpha is an oscillator that combines a custom MACD line and histogram with a modified Chaikin Money Flow calculation scaled directly to MACD values. It plots the MACD line, signal line, histogram area, and a money flow line dynamically colored according to
TPCharts COT fetches and displays Commitment of Traders (COT) report data from Quandl CFTC in a separate pane. It automatically maps the current symbol's root to CFTC dataset codes for futures, commodities, forex pairs, and stock indices. The script calculates
The Candle Pressure Index measures buying versus selling pressure from candle geometry and relative volume. Each bar combines close location, body ratio, and volume rank into a raw pressure value. An exponential moving average of that pressure forms the CPI os
Quant RSI is an indicator that plots a Laguerre-filtered Relative Strength Index (RSI) in a separate pane. It incorporates Hull Moving Average smoothing to reduce lag, along with ATR-based volatility calculations and ADX trend tracking. The indicator evaluates
Manias, Panics and Crashes is a separate-pane market regime indicator that quantifies market sentiment and systemic risk. It processes technical metrics including RSI, moving averages, and volume alongside optional intermarket data such as VIX volatility and c
This strategy scores bullish and bearish confluence from RSI, MACD, a stochastic of RSI, and a fixed ten-bar momentum reading. It opens a long or a short only when the position is flat and the matching count reaches the minimum confirmation setting, then close
Whiplash is a separate-pane indicator that smooths the difference between close and open with a user-selected moving average, then converts that series into a Z-score over a fixed lookback. Small candle bodies near zero are treated as chop, while readings beyo
This strategy combines channel breakout concepts with an ATR-ADX volatility trailing framework and multi-timeframe moving averages. It evaluates trend conditions using configurable moving average types, including SMA, EMA, Hull MA, and Tilson T3, paired with d
This indicator draws a combined trend overlay on the price chart. It can enable a SuperTrend based on ATR length and a factor, a fast and slow moving-average cloud using SMA or EMA, and a VIDYA line. Separate switches control whether each component is calculat
The Momentum - MOM indicator calculates standard price momentum over a user-defined length and source, then smooths the momentum values using a customizable moving average. Users can choose from multiple moving average types, including EMA, SMA, RMA, WMA, VWMA
This strategy enters long trades when a fast EMA crosses above a slow EMA. Position risk and profits are managed through tiered exit stages: three custom percentage-based profit targets with partial exits, a hard percentage stop loss, and a trailing drawdown e
This indicator plots a linear regression channel on the price chart. It fits a regression line to a chosen source over a lookback length, then draws the base line plus optional upper and lower deviation bands scaled by multipliers. Fibonacci ratios mark intern
This indicator plots a modified MACD-style momentum oscillator in a separate pane. It compares a zero-lag EMA of the typical price with smoothed moving averages of the high and low, then sets the impulse to the distance outside that range or to zero when price
An Ichimoku-based trading strategy that plots the complete Ichimoku Kinko Hyo system directly on the price chart. Long signals trigger when Tenkan-Sen is above Kijun-Sen and positioned above the current Kumo cloud, exiting when Tenkan-Sen falls below Kijun-Sen
This indicator draws a volume profile on the price chart for a user-chosen start-to-end window. It splits that window into three time segments and colors buy and sell volume separately for the left, middle, and right parts. Histogram rows stack volume by price
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.