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.
Combines a Supertrend line with a Stochastic RSI filter on the price chart. Supertrend uses an ATR period and multiplier on a chosen source and marks trend flips with buy and sell signals and highlighting. Separate long and short entry conditions require the S
An overlay that combines three studies into long and short signals: a Hull moving average in HMA, THMA or EHMA form shown as a trend-colored band, optionally from a higher timeframe, plus two QQE RSI-based momentum components and an oscillator with a short and
Looks for barbwire zones, runs of bars with unusually small ranges, and boxes them on the price chart. It measures how small recent bars are using Heikin-Ashi data, scaled over a period with a level threshold and a minimum number of bars. Settings choose open
A very small personal test script that plots a 100-period simple moving average of the close in a separate pane. The code contains a second indicator declaration and a basic condition comparing the previous close with that average, but no inputs, signals or ri
A price-chart overlay that draws a moving average channel from a higher timeframe. It computes the moving average of the high, close and low on a chosen timeframe of 1 hour, 4 hours, daily, weekly or monthly, and plots them as three red lines. Settings pick th
A multi-tool overlay that bundles several classic studies on one chart, each with its own on/off switch. These include a blended BBI moving average colored by position against price, four configurable EMAs, Bollinger bands, parabolic SAR, zigzag with fib level
Combines four overlays on the price chart. A momentum cloud is built from Donchian midpoints, a reversal channel puts bands around a moving average using a multiple of ATR, true range or average range, a thin band tracks smoothed high and low, and an Ichimoku-
This script aggregates spot and perpetual futures price data across multiple cryptocurrency exchanges to calculate a volume-weighted futures premium index. It computes the log ratio between perpetual futures and spot prices, applies a user-selected moving aver
A multi-study overlay that plots a triple exponential moving average, short SMAs, EMAs at 9, 20, 50, 100 and 200, and an ATR band around an EMA midline. It shades the background when the 9 and 20 EMAs cross and when the CCI moves back through plus or minus 100
The script plots the Relative Strength Index and Stochastic oscillator indicators in separate panes. It calculates the RSI with customizable length, source, and MA type including Bollinger Bands, and the Stochastic oscillator with %K and %D periods. It draws o
This indicator simulates zero-day-to-expiration options trades by plotting scheduled entry and exit shapes directly on the price chart. It signals entries on Mondays, Wednesdays, and Fridays at a user-defined time when the VIX remains below a specified limit.
This Pine v4 strategy trades hammer and shooting star candles on the price chart. Entry candles can be filtered by size relative to ATR and by an optional EMA, and a Fibonacci level defines how far into the candle the close must be. Stop loss is an ATR multipl
A separate-pane indicator that plots a MACD with a simple-average signal line, colored by whether it is rising or falling around zero. On common timeframes it also plots a second MACD scaled up by a fixed multiplier toward a higher timeframe, drawn as circles.
This strategy draws a Donchian channel with a very long default period of 1440 bars, its midline and a 250-period simple moving average. It places limit orders to sell at the upper band after a high touches it and to buy at the lower band after a low touches i
Leo Supertrend calculates and plots a Supertrend indicator alongside an Exponential Moving Average on the main price chart. It determines trend direction by tracking price relative to an ATR-based volatility band, supporting both standard RMA and simple moving
This trend-following strategy overlays fast and slow Hull Moving Averages, Parabolic SAR, Chaikin Money Flow, a Volume Oscillator, and Heikin Ashi candle confirmation on the main price chart. Long entries occur when price and fast HMA are above the slow HMA, S
This strategy builds trades from two configurable moving averages, each selectable from eleven types with its own source, length, offset and ALMA settings. Optional modules add RSI-based take profit and stop levels and an ATR comparison as confirmation, and it
The script calculates two exponential moving averages with 21 and 34 periods and plots them on the price chart. It fills the area between them in a color that changes from green to red based on whether the fast MA is above the slow MA. This creates support ban
Stoch Strat is an overlay trading strategy that combines Stochastic Oscillator crossovers, MACD histogram momentum, and 50/100 Exponential Moving Averages for trend filtering. It generates long signals when Stochastic crosses up in oversold conditions while pr
An indicator in a separate pane that estimates a normalised risk metric between 0 and 1. It takes the log distance between price and its 365 period simple moving average, scales it by the bar index raised to a power, then normalises it against the running high
This indicator is an unfinished attempt to reproduce Binance's BTCUSDT perpetual funding rate in a separate pane. It requests the Binance premium index on a one-minute basis, builds a weighted average over each eight-hour funding period, and adds a clamped int
A Pine v4 overlay that plots three moving averages on the price chart. Each line has its own period, source and type, chosen from SMA, EMA, WMA, RMA or a Hull moving average. Defaults are 50, 100 and 200 periods on the close. The lines are drawn in green, yell
Plots a fast and a slow simple moving average on the price chart and shades the area between them. A buy highlight appears when the fast average crosses above the slow one while the positive directional index is above the negative and ADX is above a key level.
A Pine v4 overlay that draws a volume profile on the price chart. Volume over a lookback window is split into price bins and shown as horizontal bars, with an optional point of control line at the busiest level. Settings control lookback depth up to 1000 bars,
This indicator builds a Donchian channel with midlines between the extremes, then uses Ichimoku-style logic to classify the market as trending up, trending down or ranging. Bars are coloured green, red or gray and the zones near the basis are shaded. An option
This Pine v4 strategy is built on the weekly CFTC net position of commercial traders in commodity or financial futures, requested by contract code from an external Quandl data feed. It scales the net position within its three-year range into an index, and trea
Databox is an overlay indicator that fetches and displays fundamental financial data directly on the main price chart. It retrieves key corporate metrics such as book value per share, cash and equivalents, total shares outstanding, stock buyback yield, and qua
This indicator plots the Bitcoin price in Norwegian kroner on the price chart. It multiplies a Bitcoin quote in USD or EUR by the matching dollar or euro to NOK rate, both requested on the one-minute timeframe. The Currency input switches the Bitcoin and forei
War Zone Control calculates a fast Exponential Moving Average (EMA) and a slow Weighted Moving Average (WMA) using the selected price source. It plots both moving averages directly on the price chart. When the fast EMA crosses above the slow WMA, it displays a
A standard Relative Strength Index drawn in a separate pane, calculated with Wilder smoothing over an adjustable length and source. It includes horizontal lines at 70, 30 and an added middle line at 50, with the area between 70 and 30 shaded. It is a plain osc
This indicator calculates and displays the Directional Movement Index (DMI) and Average Directional Index (ADX) in a separate pane below the price chart. It measures directional price movements by computing the positive directional indicator (+DI), negative di
This strategy calculates the MACD line and plots it as a colored histogram in a separate pane. Instead of traditional crossovers, it tracks consecutive rising or falling values on the MACD line. It enters long positions after a configurable number of consecuti
A strategy that finds pivot highs and lows only when they stand out from neighbouring bars by an ATR-based margin. After a significant pivot high it places a stop order to go long just above that high, and after a significant pivot low it places a stop order t
This indicator plots Bitcoin network hash-rate moving averages in a separate pane. It requests daily hash rate, applies a short and a long simple moving average, and can draw them as ribbons or as an oscillator. Optional markers show miner capitulation when th
Kal's MTF OBV HAAR is an indicator that plots OBV EMAs with lengths 9 and 4 on a separate pane to highlight volume trends. It calculates CCI with length 10 and CMF with length 10, using crossovers and crossunders of the CCI line at zero for up and down signals
Calculates the Corrected Moving Average (CMA) alongside a standard Simple Moving Average (SMA) over a specified period. The indicator dynamically adjusts the average based on sample variance and deviation from price. Both lines plot directly on the price chart
This indicator scans multiple stock symbols for ICT Displacement Candles. It detects strong price moves characterized by long candles and minimal wicks that exceed a minimum bar count and a set deviation percentage from average range. Signals for bullish and b
This trend-following strategy executes a classic Donchian channel breakout system designed to cross-validate backtest results against external framework benchmarks. It triggers a long entry when the closing price breaks above the highest high of the prior entr
This strategy calculates Bollinger Bands and Aroon oscillator values to identify mean-reversion opportunities. It enters a long position using full equity when the closing price crosses below the lower Bollinger Band while Aroon Up remains above a user-specifi
This indicator identifies and plots key options expiration dates on the price chart. It calculates monthly OpEx (the third Friday of each month), quarterly OpEx (March, June, September, December), and corresponding VIX expiration dates, drawing vertical lines
This overlay indicator marks historical ARK Invest purchases and sales of ticker 2618 on the price chart. When the ETF input is ALL, it places green Buy labels below bars and red Sell labels above bars on fixed calendar dates, with an X1 mark for the recorded
Mean Reversion Study is an indicator that identifies trade setups combining exponential moving averages, RSI extremes, and engulfing candlestick patterns. It highlights bullish setups when a bullish engulfing candle forms below the EMA while RSI is oversold, a
AIActivationFunctionsSigmoid is a utility library for Pine Script v5 that provides mathematical calculations for the sigmoid activation function, commonly used in artificial intelligence and machine learning algorithms. The library exports functions to evaluat
This strategy plots running pivot highs as red R circles and pivot lows as blue S circles directly on the price chart. It computes an EMA 3 and a Cto trend line from close prices, then generates long signals on upward EMA-Cto crossovers combined with price pos
Candlestick - Inside Bar Pattern is an overlay indicator that identifies inside bar setups across three consecutive candles. It detects when the price range of the preceding bar is completely contained within the range of the bar prior to it. The direction of
This indicator displays moving average deduction reference points directly on the price chart. It plots dynamic labels on historical bars corresponding to short, medium, and long lookback periods, defaulted to 20, 60, and 120 bars. Each text label displays the
This indicator plots a customizable horizontal price line directly on the price chart and displays dynamic distance metrics, including ticks, dollars, and points relative to the current close. It monitors price interactions to trigger cross alerts and construc
This strategy calculates a chart-timeframe MACD oscillator alongside a higher-timeframe Simple Moving Average (SMA) trend filter using security requests. It triggers long signals when the MACD line crosses above its signal line while the higher-timeframe 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.