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.
Multi Risk Demo is an educational strategy script demonstrating Pine Script risk management functions. It attempts to enter long positions on every bar after the year 2014 up to a pyramiding limit of ten positions. The strategy applies intraday order managemen
This indicator plots the rate of change of a chosen price source in a separate pane. It calculates the percentage difference between the current source value and the value a set number of bars earlier, then draws that series as a line together with a horizonta
Sergdi A002 is a directional strategy designed for crypto trading. It generates long entry signals when the 4-hour DI+ crosses over the 4-hour DI-, and short entry signals on a cross under. It features configurable risk management options, including fixed perc
Wave Navigator is a price-chart indicator that builds zigzag swings from ATR or percentage thresholds and scans stored pivots for Elliott-style impulse, diagonal, flat and triangle patterns. It scores candidates with optional Fibonacci, time-ratio, RSI or MACD
This overlay indicator collects Bitcoin spot volume from many named exchanges on the chart timeframe and adds those series after treating missing values as zero. It also begins gathering perpetual futures volume from several venues and sets a fixed length of 1
This indicator identifies and plots key support and resistance structures directly on the price chart. It calculates A/V swing levels, price gaps, and Quasimodo levels using configurable pivot lengths and touch tolerances. Users can customize maximum level cou
The Limitless Trading Indicator is an overlay tool that combines multi-timeframe Exponential Moving Averages (13 and 62 EMAs) with Relative Strength Index (RSI) crossovers. It evaluates trend direction on a user-selected higher timeframe and filters entry sign
Extreme Trend Reversal Points identifies potential trend reversal zones directly on the price chart using moving averages and historical range percentiles. The indicator calculates price extremes relative to historical percentile history to detect overextended
A test strategy from a reference corpus that moves a pending stop entry in one direction before it fills. At 02:15, 02:30 and 02:45 it re-submits a buy stop one tick above the bar high, and at 14:15, 14:30 and 14:45 a sell stop one tick below the bar low, usin
This indicator calculates and plots geometric circle enclosures and tangent circles on the price chart using user-defined time points. It determines the high-low price range across fixed and live time intervals, drawing a main encompassing circle alongside tan
A price-chart indicator built on a triple EMA ribbon, defaulting to 8, 21 and 55 periods, with gradient fill and a trend background. It combines EMA alignment, slope, persistence, momentum, spread and squeeze detection into a weighted 0 to 100 trend score with
Overlays a Keltner Channel and an ATR supertrend on the price chart and marks candles where several built-in detectors agree on the same bar. The detectors cover pullback patterns, displacement, relative volume and high-volume bars, shown as lettered markers.
TN Sovereign Optimized Trend v6 is a Pine Script v6 strategy that plots fast, slow, and macro EMAs on the price chart. It generates buy signals on fast EMA crossover above the slow EMA when price exceeds the 200 EMA macro filter, RSI exceeds 50, and volume sur
A Pine v4 pane indicator that draws moving average based momentum as a heat map of up to 28 rows and adds pivot-based swing detection on the oscillator. Separate pivot lookbacks and range limits are provided for short, medium and long term swings, and colored
A test indicator in a separate pane that sums the previous bar's volume over several rolling windows, from ten minutes up to one day, converted into bar counts from the chart timeframe. For some windows it also plots a percentile of the sum over a longer histo
This indicator overlays historical ARK Invest buy and sell labels on the GENI price chart. It does not calculate an oscillator or generate trading signals. When the ETF input is ALL, it places green labels below bars for buys and red labels above bars for sell
This experimental script detects high and low pivot points to establish a basic ZigZag structure. It plots red and lime circles on the chart to highlight detected high and low pivots, along with a gray line tracking the ZigZag trajectory based on bar index off
This Pine Script strategy uses the Commodity Channel Index (CCI) with a 20-period SMA to generate long-only signals. It plots the CCI line and dashed bands at 150 and -150 on the chart, filling the area between bands. Entries occur when CCI crosses above the l
This indicator calculates normalized Shannon entropy of a chosen source over a lookback window and plots the result in a separate pane. It ignores missing values, places valid samples into histogram bins, and divides entropy by the logarithm of the bin count s
This indicator calculates and plots the number of bars elapsed since the start of the current trading day. It defines a custom function to identify a new day by monitoring changes in the day of the week attribute across bars. Using the barssince function, it t
This indicator calculates the Relative Strength Index from a chosen price source using a smoothed average of gains and losses, then plots it in a separate pane. It overlays a moving average of the RSI that can be SMA, EMA, SMMA, WMA, VWMA, or a Bollinger Band
Sergdi B003 is a trend-following strategy designed to capture directional momentum using higher-timeframe Directional Movement Index signals. It opens long positions when the 4-hour DI+ crosses over the 4-hour DI-, and short positions when DI+ crosses under DI
WaveTrend Advanced Smoothing is a separate-pane momentum oscillator built on the classic WaveTrend algorithm with eight selectable smoothing techniques, including SuperSmoother, T3, KAMA, and JMA. It provides three normalization scale modes: Classic, Clamp, an
This indicator calculates and plots 10, 20, and 50-period Double Exponential Moving Averages (DEMA) directly on the price chart. It renders user-defined support and resistance zones (RS2, RS1, and Base 1) as shaded boxes anchored to the start of the trading da
The MSNR Optimized indicator identifies key market structure support and resistance levels directly on the price chart, including Apex/Valley (A/V) swings, price gaps, and Quasimodo (QM) patterns. It uses configurable pivot lengths to detect structural pivots
Lin Reg Simplified calculates a custom linear regression channel overlaid on the main price chart. It uses a combination of weighted moving average (WMA) and simple moving average (SMA) applied to HLC3 prices to compute the trend slope, middle line, and standa
The Fast Fourier Transform (FFT) Filter decomposes time series price data into frequency components using a discrete Fourier transform algorithm. It plots the frequency-domain power spectrum in a separate pane to highlight dominant market cycles. Users can dis
This strategy tests pending stop order modification behavior in the Pine Script engine. It enters long or short positions using stop orders triggered at specific times of the trading day. An initial stop order is submitted, then modified on a later bar if no p
This indicator tracks live order flow by counting up and down price ticks along with corresponding volume and distance changes on each bar. It calculates bull and bear pressure scores and outputs a directional prediction for the next candle as bullish, bearish
A trend line on the price chart from a recursive filter that corrects a fraction of its error against price on each bar. The correction rate is scheduled by efficiency and volatility weighting, can be biased by direction, and the filter structure can be Standa
Overlays a Keltner Channel and an ATR supertrend on the price chart and marks candles where several built-in detectors agree on the same bar. The detectors cover pullback patterns, displacement, relative volume and high-volume bars, shown as lettered markers.
A simple trend and momentum strategy on the price chart. It goes long when RSI is above an upper threshold while price sits above a 200-period EMA, and short when RSI is below a lower threshold with price under the EMA. Each entry places an ATR-based stop loss
This indicator calculates a smoothed momentum oscillator from price and plots many offset momentum lines in a separate pane as a colour-graded heat map. Moving average type, smoothing periods, the number of plotted lines and the colour theme are adjustable. It
Pine v4 experiment that sketches a synthetic dollar index from weighted currency pairs, kept in comments, but the active code only plots the chart's close price. It also prints a label with the timeframe multiplier, period and high, and requests a 15-minute IB
GH Tracker plots historical buy and sell transactions executed by ARK Invest funds for Guardant Health directly on the price chart. It uses hardcoded execution timestamps to render green buy labels below price bars and red sell labels above price bars. Users c
This script serves as a technical test demonstrating global array manipulation within custom functions in Pine Script. It initializes a global float array with ten elements set to the open price. On each bar execution, a user-defined function pops the last arr
This strategy plots the Commodity Channel Index of the OHLC4 price in a separate pane and uses fixed CCI zones to allow long or short trades. Longs open when the CCI is above its long level, optionally above an SMA of the CCI, and the long RSI crosses a buy le
This indicator plots an exponential decay envelope on the price chart. Each bar it keeps the source value when it exceeds the previous result, otherwise it multiplies the previous result by (length minus one) divided by length so the line falls exponentially a
This indicator is a TradingView documentation example that places a single label on the price chart. It creates the label once and then updates its coordinates each bar so the label stays at the current bar index and the bar high. The label text is three lines
This indicator plots the Relative Vigor Index in a separate pane. It divides the length-period sum of symmetrically weighted close-minus-open values by the matching sum of high-minus-low ranges, then plots that line and a symmetrically weighted moving average
Sergdi C003 is a trading strategy that generates entry signals using directional movement index (DI+ and DI-) crossovers on a four-hour higher timeframe. It opens long positions on bullish DI crossovers and short positions on bearish crossovers. The script inc
WaveTrend v2 [WavesUnchained] is a momentum oscillator displayed in a separate pane. It derives channel index values using configurable price sources and smooths them with selectable algorithms including EMA, HMA, WMA, or JMA approximation. Traders can toggle
This indicator plots Smart Money Concepts and price action components directly on the price chart. It highlights bullish and bearish order blocks, multi-timeframe pivot points, market structure swings with key Fibonacci retracement levels (0.618 and 0.786), zo
This indicator detects and draws support and resistance structure levels directly on the price chart. It identifies Apex/Vortex (A/V) pivot levels, price gap levels, and Quasimodo (QM) pattern levels, tracking whether each level is fresh or previously tested.
This indicator calculates and plots a linear regression line alongside upper and lower deviation bands directly on the price chart. It determines linear regression slope and channel width using weighted and simple moving average formulas across a user-specifie
This indicator plots financial growth metrics in a separate pane as a customizable table. It calculates year-over-year and quarter-over-quarter changes plus CAGR for user-selected items including revenue, net income, EBITDA, EPS, dividends, total assets, liabi
This strategy rotates pending stop entries by the clock. Before noon it places a long stop one tick above the bar high and cancels the short order id; from noon it places a short stop one tick below the bar low and cancels the long order id. An open long is cl
This indicator calculates and plots a multi-factor order-flow analysis using tick counts, volume ratios, big player volume, recent delta momentum, and a K-nearest neighbors pattern matching algorithm. It evaluates bull and bear thresholds across multiple weigh
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.