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.
This overlay indicator tracks smart-money points of interest during optional London, New York, and Asian killzones. It can detect fair value gaps, order blocks, breakers, and mitigation blocks using separate entry, point-of-interest, and structure timeframes.
Indicatorv5SMC / ICT / price actionSessions & time
Calculates and plots a multi-band envelope on the price chart based on mean reversion principles and Keltner Channel concepts. Instead of standard moving averages, it uses advanced filters such as Ehlers SuperSmoother, Butterworth, Gaussian, or traditional ave
The Linear Regression Oscillator [ChartPrime] calculates a slope and intercept using linear regression over a specified lookback period, normalizing the values with a 100-period z-score calculation. It plots the normalized oscillator in a separate pane with dy
This strategy is a validation probe that places one long at 08:00 and one short at 20:00 when flat, using a fixed quantity of one. Each entry is paired with a stop 10 price units away, a limit 20 units away, and a trailing stop of 8 points. Orders process on b
This indicator detects pivot highs and lows on the price chart using configurable left and right bars. It extends lines from recent pivots in green for lows and red for highs with Fibonacci 1.618 ratio projection. It calculates crossing points of the extended
An overlay indicator that fits a linear regression to closing prices of the previous period on a chosen timeframe, such as the prior day, and extends that line into the current period. The line is teal when the slope was up and red when it was down, candles ar
Overlays up to 46 buy and sell marker signals on the price chart, built from standard deviation displacement, pullback pockets, relative volume tiers and fair value gap structures. Inputs set three displacement multipliers, a first-bar-only switch and per-sign
TnS_ICT_V6 is a Pine Script v6 strategy that identifies liquidity sweeps and displacement moves exceeding a multiple of ATR. It detects Fair Value Gaps and Optimal Trade Entries in the 62 to 79 percent retracement zone of the displacement leg to generate buy a
INCY Tracker visualizes historical buy and sell transactions executed by ARK Invest funds for INCY stock directly on the price chart. The script generates green buy labels below price bars and red sell labels above bars at specific historical timestamps corres
This indicator calculates ZigZag swing points across multiple calculation methods, including ATR thresholds, pivot highs and lows, price action, and percent price movements. It scans the resulting price swings to identify harmonic patterns like Gartley, Bat, B
Calculates four selectable moving averages (SMA, EMA, WMA, RMA, HMA, or ALMA) with custom periods to generate crossover trading signals directly on the price chart. Signals are triggered when a selected moving average crosses another, with an optional fourth m
The Intraday Momentum Index calculates an oscillator bounded between 0 and 100 based on intraday price movement. It measures gains when the close is higher than the open and losses when the close is lower than the open over a set lookback period. Computed usin
This minimal demonstration script is an example from TradingView documentation illustrating basic drawing functionality in Pine Script v4. It creates a new drawing label on the price chart at each bar's high price using the bar index as the horizontal coordina
This overlay indicator marks a two-candle Tweezer Top bearish reversal on the price chart. It looks for a prior long bullish candle in an uptrend followed by a bearish candle whose high is nearly the same as the previous high, using an EMA of candle body size
This long-only strategy plots on the price chart and sizes entries according to how many trigger conditions are met. It manages exits by tightening the stop and extending the take profit from the price's maximum excursion, with optional take profit and risk-re
This indicator calculates rolling dollar-denominated trade volume across four preset horizons (24 hours, 12 hours, 4 hours, and 1 hour) along with Normalized Average True Range (NATR). It compares current rolling volumes to previous bar values to indicate volu
SMC Killzone State Engine (Bidirectional) is an overlay indicator that implements a state engine to identify Smart Money Concepts (SMC) points of interest during specific trading killzones. It detects higher timeframe Fair Value Gaps (FVG) and Order Blocks (OB
This strategy calculates a 10-period and a 20-period simple moving average directly on the price chart. It triggers long entries on SMA bullish crossovers and short entries on SMA bearish crossunders, formatting alert payloads into JSON string templates for we
The LOWESS indicator applies locally weighted scatterplot smoothing to price data to reduce noise and highlight trends. It calculates a smoothed line based on user-defined length. Additionally, it identifies pivot highs and lows using specified bar counts and
This strategy is a validation probe that opens one long at 08:00 and one short at 20:00 when the position is flat. Each entry sets an ATR-based stop, a limit at twice that stop distance, and a trailing stop whose trail points equal the current ATR. ATR length
The Parallel Lines Live indicator draws geometric Fibonacci-based horizontal lines on the price chart. It computes a fractal phi ratio using the user-set Fibonacci expansion multiplier and tracks historical price touches along with bullish and bearish outcomes
An always-in flip indicator on the price chart, written in Pine version 5, where BUY exits a short and enters long and SELL does the reverse. It uses a wide Supertrend-style ATR trail with a cap on how far the trail can move per bar, plus an optional volume-we
A strategy backtest version of a 46-signal study that combines standard deviation displacement, pullback pockets, relative volume tiers and fair value gap structures. Each enabled signal can trigger a buy or sell on the price chart. Inputs set three displaceme
This Pine Script strategy identifies high-confluence trading opportunities using ICT and SMC logic. It calculates a confluence score from HTF bias via EMA, FVG detection with lookback, liquidity sweep confirmation, market structure shift breaks, premium discou
INMD Tracker overlays historical ARK Invest buy and sell trade transactions directly onto the price chart using labeled markers. It places visual labels above or below price bars at specific historical timestamps to indicate institutional transaction activity
This indicator plots a ZigZag line on the price chart based on a user-defined percent reversal from the last pivot. It supports color flipping for gradient themes and real pivot visibility. Additional tools draw harmonic triangles, taps, and AB=CD patterns whe
This strategy plots four exponential moving averages on the price chart and filters trades with a smoothed Ease of Movement oscillator. In the default mode it opens a long when price and the four averages are stacked upward and Ease of Movement is positive, th
This indicator reconstructs a low-pass filtered series from the selected source using a discrete Fourier transform. It applies a Hann window over a fixed window of 32, 64, or 128 bars, keeps only the chosen number of lowest-frequency harmonics, and adds their
This indicator draws a text label directly on the main price chart above each bar at the bar high. It calculates and displays the current bar index coordinates alongside the exact high price level on separate text lines without background styling. There are no
The Ultimate Oscillator combines short-term, medium-term, and long-term price momentum into a single bounded oscillator. It calculates buying pressure and true range across three configurable period lengths, defaulting to 7, 14, and 28 bars. By applying higher
A trading strategy that combines k-nearest neighbors (KNN) classification logic with custom position management and automated Zignaly signal execution. It evaluates historical price excursions and KNN patterns to identify entry opportunities and set dynamic ex
This multi-timeframe indicator combines Smart Money Concepts (SMC) with customizable session killzones for London and New York trading. It identifies market structure points such as Break of Structure (BOS) and Change of Character (CHoCH), alongside Points of
Indicatorv5SMC / ICT / price actionSessions & time
This indicator plots price data and is designed to detect divergences between price action and the Money Flow Index (MFI). It uses pivot highs and lows to identify potential regular and hidden bullish or bearish divergence signals. By evaluating momentum shift
This indicator calculates a volatility-adaptive SuperTrend by applying k-means clustering to ATR values over a user-defined training period. It segments historical volatility into high, medium, and low clusters to dynamically adjust the SuperTrend bands to shi
This validation strategy tests position reversal mechanics via stop orders without explicit closing calls. It executes a long market entry at 00:15 when flat, then submits a short stop entry just below the bar low at 00:45 to trigger an automated position flip
This indicator plots dynamic parallel lines based on logarithmic fractal price grid levels adjusted by a phi ratio multiplier. It scores price levels using a weighted quantitative model incorporating estimated order flow delta, kinetic volatility energy, liqui
An overlay indicator that detects pivot highs and lows and marks bullish and bearish market structure breaks with dotted or dashed lines. After a break it trails a stop level that follows price, with an increment factor controlling how fast it tightens. The st
Detects opening drive moves on the price chart by combining displacement, swing structure and return-to-level checks into named bull and bear signals. Inputs set sensitivity, swing length, the displacement deviation length and multiplier, and return percentage
This Pine Script strategy detects causal reversals using a smoothed stochastic oscillator to track momentum. It identifies harmonic divergences in price versus the oscillator and applies a Kronos resonance proxy based on phase coherence. ATR dynamically sets s
This indicator marks historical ARK Invest purchases and sales of Innoviva on the price chart. It draws hardcoded labels at fixed dates: red Sell labels above bars and green Buy labels below bars, each marked X1. An ETF setting exists but only offers ALL, so i
This strategy combines three exponential moving averages with a Supertrend indicator to generate trend-following trade entries directly on the price chart. A long position is entered when the fastest EMA is above the medium EMA, the medium EMA is above the slo
Jarque-Bera Test evaluates whether price data follows a normal distribution. It constructs a rolling array of recent bars to compute sample mean, variance, skewness, and excess kurtosis through central statistical moments. The calculated statistic quantifies d
This minimal Pine Script code example demonstrates how loop iterations and conditional branches evaluate historical series functions. It iterates through a short loop based on the current bar index, conditionally retrieving the lowest value of the bar index ov
This indicator calculates and visualizes buying versus selling volume by aggregating lower timeframe data onto the current chart. It uses intrabar price movement to classify volume as positive or negative, plotting positive volume as green columns and negative
Trailering Q004 is an execution strategy that generates automated trading signals integrated with Zignaly webhooks. It uses historical statistical advice and price excursion limits to enter long or short positions based on sub-strategy trigger conditions. The
This indicator maps Smart Money Concepts (SMC) directly onto the price chart. It detects both internal and swing market structure breakouts, labeling Changes of Character (CHoCH) and Breaks of Structure (BOS). It also highlights bullish and bearish internal an
This indicator plots the Money Flow Index in a separate pane and marks bullish and bearish divergence from pivot highs and lows. It stores recent pivot prices, MFI values, and bar indexes, then checks regular or hidden divergence across a chosen number of dots
This indicator calculates a custom RSI oscillator enhanced with machine learning using the K-nearest neighbors algorithm. It combines the standard RSI with KNN predictions for improved signal generation. The script applies smoothing using ALMA and Kalman filte
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.