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 indicator plots a Nadaraya-Watson kernel estimate of the selected source on the price chart and draws upper and lower envelopes around it. A Gaussian window weights nearby bars. Bandwidth sets how wide that smoothing is, and a multiplier scales the mean a
PerformanceTable displays a compact dashboard table on the main chart summarizing key stock metrics. It calculates the 20-day Average Daily Range (ADR), an IBD-style Relative Strength (RS) rating, 10-day average trading volume, quarterly earnings and revenue e
This strategy calculates the built-in Supertrend indicator using customizable ATR length and factor multiplier parameters, plotting the trend lines and colored fills directly on the price chart. It executes a long order when the Supertrend direction flips to b
This indicator overlays higher-timeframe candles and traditional pivot levels on the price chart. It draws open-close or high-low candle bodies, optional wicks, and history modes that include shifting the previous higher-timeframe candle onto the current one.
This indicator plots Smart Money Concepts elements on the price chart including internal and swing order blocks, bullish and bearish structures with BOS and CHoCH breaks, fair value gaps, equal highs and lows, and swing points. It can color candles according t
This indicator overlays a Supertrend calculation with filled trend zones and ATR-based premium or discount offset lines directly on the price chart. Upon direction changes in the Supertrend, it identifies highest highs and lowest lows during the preceding tren
This trend-following strategy plots an 8-period WMA on close prices, a 10-period WMA on open prices, a 100-period Hull Moving Average, and a VWAP EMA overlay on the price chart. It enters long when the fast WMA crosses above the slow WMA while above the HMA fi
Mini-Project is a multi-indicator trading strategy that overlays technical indicators directly on the price chart. It provides modular components including Linear Regression, the Relative Strength Index (RSI), MACD, Parabolic SAR, and Supertrend. Users can tog
This Pine Script v5 strategy calculates ATR-based trailing stops for crypto trading on the price chart. It defines a long stop as the highest close minus ATR times multiplier and a short stop as the lowest close plus ATR times multiplier. The script dynamicall
This indicator calculates and displays Defining Range (DR) and implied Defining Range (iDR) levels across selected trading sessions, such as main, early, and Asian ranges. It plots session high and low lines, extended projections, range boxes, and Fibonacci le
The Initial Balance indicator highlights high, low, and 50% midpoint levels calculated over a defined session timeframe, such as the opening hour. It draws primary initial balance bounds, optional extended x2 projection levels, intermediate 50% levels, and sha
This indicator plots a stacked trend ribbon in a separate pane from Donchian channel breakouts. For a chosen period it marks an uptrend when the close exceeds the previous highest high and a downtrend when the close falls below the previous lowest low, otherwi
MACD #1 is a momentum indicator that calculates the MACD line as the difference between a fast EMA and a slow EMA of the close price. It also computes the signal line as the EMA of the MACD line with a default length of 9. The script plots the MACD line in blu
This strategy plots a Supertrend line on the price chart and colors it green in an up direction and red in a down direction. It also marks direction changes with arrows below the bar. Entries come from a separate moving-average rule: a long when the 14-period
Calculates and plots daily moving averages, including 200, 100, and 50-period SMAs as well as a 20-period EMA, onto intraday price charts. It also includes an optional Williams Alligator Jaw line calculated using a smoothed moving average. Settings allow adjus
This strategy identifies trend changes using fractals from a higher timeframe and the current chart timeframe. It opens buy or sell orders on breaks of lower-timeframe fractals aligned with the higher-timeframe trend. Normal trading mode exits on trend reversa
This indicator plots trading volume on a separate pane below the price chart. It colors the volume bars red if the previous close is higher than the current close, or aqua if lower, when the 'Color bars based on previous close' setting is enabled. The script a
MC - Defensive calculates a WaveTrend oscillator combined with a volume-weighted money flow index to generate buy and sell signals directly on the price chart. Buy signals trigger when WaveTrend crosses up in oversold conditions with low money flow values, whi
This strategy identifies overbought conditions in uptrends for long entries. It calculates RSI with 14 periods, 50 and 200 period SMAs, ALMA smoothed close, and Stochastics with customizable K D and smooth periods. Entries occur when RSI exceeds 70 price excee
This indicator implements a three-dimensional matrix as one Pine float array, with sheet, row, and column counts stored in the first three values. It creates a filled matrix, reads those dimensions, and returns the start and end indexes of a chosen sheet. It a
A strategy version of the killzone sweep idea. In the Asia, London, New York AM and PM windows it waits for the previous killzone's high or low to be swept and reclaimed, then enters on the close with a stop just past the wick and a fixed point target for ES o
A long-only daily strategy for crypto that buys short-term dips inside an uptrend. It requires the close above a long EMA, a medium EMA above the long one, an optional Bitcoin trend filter, and a very low three-period RSI. Entry is at the next open. The stop i
A separate-pane indicator that runs a percentage-deviation ZigZag state machine on up to eight timeframes, from one minute to daily, and shows whether each is currently in an up leg after a swing low or a down leg after a swing high. Settings choose the deviat
An indicator on the price chart that detects sideways ranges and flags breakouts from them. For each bar it counts how many of the previous N completed bars overlapped a zone of plus or minus a multiple of ATR around the current close, giving a flat score from
Plots six exponential moving averages on the price chart, with default lengths of 5, 10, 20, 50, 100 and 200 applied to the close. The three short-term lines and three long-term lines are grouped in the settings, and each line has its own on/off switch and len
This indicator calculates the classic Awesome Oscillator by subtracting a 34-period simple moving average from a 5-period simple moving average of median prices. It plots the resulting values as a color-coded column histogram in a separate pane, turning green
A separate-pane oscillator that plots a z-score, the distance of price from its rolling mean measured in standard deviations, smoothed over a few bars. Dots mark turns that happen outside a chosen zone around zero. An AR(1) half-life readout and optional regim
An indicator that finds small and large pivot highs and lows and automatically draws trend lines through them on the price chart. A line proximity filter based on ATR reduces clutter, and a breakout is flagged after a set number of consecutive closes beyond a
A research strategy for the price chart, meant for a five-minute chart with Moscow time. It measures the price move between two time points of the same day, and if the move exceeds a threshold it opens a position at the end of the second slot, either with the
A long-only strategy that buys stocks after the daily 14-period RSI closes below an oversold level, optionally only above the 200-day average and in a bullish market regime based on an index and VIX. Trades close after a set number of days or earlier when the
Draws confluence zones and options open interest levels on the price chart from a text block pasted into a settings box. Zones are coloured by how many layers of levels overlap (two, three, or four and more), and can be limited to volume-anchored zones. Open i
An overlay that builds a skewed same-day iron condor on the S&P 500 index or its ETF and mini equivalents. After an opening observation window it measures price drift and range, then places short strikes at a base distance, shifted asymmetrically when drift is
A chart pattern scanner that confirms pivots after a set number of bars and then draws classic formations on the price chart, including head and shoulders, double and triple tops and bottoms, triangles, rectangles, wedges, megaphones and V reversals, plus gold
A rule-based smart money confluence indicator for the price chart, with a recommended 15-minute chart. It scores a higher timeframe EMA bias, break of structure, liquidity sweep, fair value gap point of interest and rejection candle, then grades setups by scor
A strategy template that enters long when a fast EMA crosses above a slow EMA while price is above a higher-timeframe EMA, and short on the opposite setup, optionally limited to a session window. Entries happen only on a confirmed bar with no open position. Ea
A long-or-cash strategy that holds a position only when two conditions agree: the close is above a 100-bar simple moving average and above the close from 20 bars earlier. Otherwise it stays in cash. By default it requests daily bars whatever the chart timefram
This indicator overlays rolling cost anchors, volatility-derived GetDelta bands, and liquidity provider ranges onto the price chart alongside pinbar candlestick detection. It calculates market valuation zones, shading discount and premium areas while tracking
A simple indicator that draws boxes on the price chart over fair value gaps, also called imbalances. A bullish gap is flagged when the current low is above the high from two bars earlier, and a bearish gap when the current high is below the low from two bars e
A simple strategy built to feed a server with alert data. It plots a fast and a slow EMA, 12 and 26 by default, goes long when the fast crosses above the slow, and on the opposite cross closes the long and opens a short. There is no stop loss or take profit, s
A long-only strategy that buys dips and never sells during the test. A buy needs a lower Bollinger Band touch, by default with a close below the midline, plus a MACD or Impulse MACD crossover. Position size is a percent of equity or a fixed cash amount per buy
A strategy that combines four engines into one signal: a Z-score regime classifier, a weekly midline heat score, an exhaustion detector for absorption and climax bars, and a synthesizer that weighs them using confidence thresholds. Entries and exits appear as
Overlays five EMAs at 8, 21, 34, 55 and 89 on the price chart and marks a Bounce 2.0 pullback setup. The setup needs the shorter EMAs in bullish order, ADX at or above 25, a stochastic reading at or below 40 and price within a band around the 21 EMA. A label a
A price-chart overlay that fits trend support and resistance channel lines using a Kalman-filter based engine fed by intrabar volume and price data. Lines are shown forming, then lock in place and are later restyled as broken history. A tempo mode of fast, med
Prints manual long and short signal labels on the price chart using an adaptive method trained on recent settled trade paths. It works on standard time-based charts and scales stop limits with chart bar length. Positions exit only at the stop or target, stay o
A backtest strategy for an Ethereum perpetual futures bot that must run on the 30-minute chart. It uses a SuperTrend on the chart timeframe together with a DEMA from a higher timeframe to set direction. Position size comes from either a fixed or percentage ris
This indicator plots a fast and a slow exponential moving average on the price chart and marks a buy when the fast average crosses above the slow average and a sell when it crosses below. It builds a plain-text price message and a JSON order message that inclu
Skipp Labels is a Pine Script v6 helper library designed to assist with label creation and memory management on price charts. It exports functions for string safety and buffer control. The safe label text function truncates long strings to a maximum of 120 cha
A simple time-based background shader for intraday charts. It colors the chart background inside or outside a chosen daily time range, by default 22:00 to 07:00 in an Argentina timezone, with options for active weekdays, fill mode and colors. Optional dotted v
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.