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.
A session overlay that marks up to four trading sessions, by default New York, London, Tokyo and Sydney, with shaded range boxes. For each session it can also show a trendline, a mean line, a session VWAP and maximum and minimum markers. Session names, times a
An indicator that draws smoothed Heiken Ashi candles on the price chart. Prices are smoothed with a selectable moving average type and length before the Heiken Ashi calculation and again afterwards, using an imported library of average types. Candles are shade
MarketAnalysis is a helper library for Pine Script developers that provides modular functions to compute Fibonacci price levels. It offers calculations for both bullish and bearish Fibonacci retracements using low and high price points. Additionally, it calcul
This indicator identifies significant volume spikes on daily and weekly timeframes by comparing current volume against moving averages over user-defined lookback periods. It plots the daily volume ratio as a histogram in a separate pane, with blue columns for
The Momentum Trend Strategy combines the Average Directional Index (ADX), SuperTrend, and Heikin Ashi candle colors to identify and trade trend momentum on the price chart. It enters long or short positions when ADX exceeds an entry threshold and SuperTrend al
This indicator plots envelope bands based on a moving average or exponential moving average of a chosen price source. It computes RSI with user-set length and source. Signals trigger on crossovers: buy when price crosses the lower envelope band while RSI falls
An experimental strategy lab script that tracks a simulated long position between a start date and an end date, drawing dashed vertical lines at both dates and a line for the average entry price. A table at the bottom left shows position size in BTC and open p
A Pine v6 strategy that trades a rolling channel breakout on the price chart. It tracks the highest high and lowest low over a length setting, then places a stop order to go long one tick above the upper bound and a stop order to go short one tick below the lo
A strategy that trades with two EMAs. A long entry needs price above the short EMA, which is above the long EMA, plus either RSI below a level or price within a tolerance of a recent pivot low. Shorts mirror this in a downtrend near pivot highs. Exits use ATR-
Range calculates relative price ranges across four user-specified currency pairs by comparing high and low values against close prices from a secondary timeframe. It computes the average range across these pairs to establish a baseline volatility benchmark. Th
Shows a compact table on the price chart counting down the time left until the next candle closes on several timeframes: 1, 5 and 15 minutes, 1 hour, 4 hours and 1 day. Each row can be switched on or off and given its own colour. The text turns to a warning co
This strategy trades S50 TFEX USDTHB contracts on the price chart. It detects swing highs and swing lows with pivot points to generate long entries on swing highs and short entries on swing lows. The ATR indicator calculates dynamic stop-loss distances while t
ETHBTC MTPI is a multi-indicator trend-following strategy designed for crypto pairs to determine relative market strength. It combines up to five toggleable components: Liquidity-Weighted Supertrend, dual exponential moving averages, DEMA Supertrend, DEMA AFR,
The IBKR Safe Forex Strategy is a Pine Script v6 strategy that trades forex pairs using crossovers of 10-period and 50-period EMAs, filtered by a 200-period EMA and restricted to London or New York session overlap. It enters long positions on fast EMA above sl
This indicator evaluates multiple Relative Strength Index (RSI) patterns combined with volume surge criteria to identify potential trend reversals and breakout entries. It tracks five distinct bullish setups, including double bottoms, hook reversals, bullish d
This strategy computes a Donchian channel from the highest high and lowest low over a set period, plus a middle line. It goes long when the close breaks above the previous channel high and short when it breaks below the previous channel low. Each trade has an
A separate-pane indicator that computes the Money Flow Index and adapts its overbought, neutral and oversold levels using a clustering routine trained on recent data. Inputs set the MFI length, the number of training bars and the iterations per bar. An adjuste
This strategy compares current bar volume and price direction against the previous bar using a lookback period. It plots colored volume columns in a separate pane to visualize bullish or bearish volume trends and draws a liquidation level threshold line. Long
An indicator in a separate pane that plots Commitment of Traders legacy report metrics for the chart symbol, such as open interest, noncommercial, commercial and nonreportable positions and trader counts. Settings pick the metric, direction, data type, a selec
A separate-pane indicator that plots the Bitcoin price from the BTCUSDT symbol, scaled by an adjustable factor so it fits beside other panes, whatever chart symbol is open. The line is coloured green when the latest change is up or zero and red when it is down
This overlay indicator finds pivot highs and lows from high/low or close/open prices and uses them to draw support and resistance channels and trend lines on the price chart. Minimum strength, maximum channel width, and a cap on how many S/R levels appear filt
This strategy plots price and Bollinger Bands on the chart using a 120-bar SMA basis and 2 standard deviation multiplier. It generates signals from band touches and an exit SMA of 110 bars. Risk management limits losses to 6 percent of trade value. Money manag
Support Resistance - Dynamic v2 finds pivot highs and lows on the price chart and groups nearby pivots into support and resistance channels. Settings set the pivot period, whether highs and lows or open and close are used, how many pivots are stored, the maxim
A Pine v5 indicator, with Spanish labels, that draws liquidity voids, meaning fair value gaps, as boxes on the price chart. It can show gaps that have already been filled, add text labels, and switch between a historical mode and another mode. A bar count sets
HMA-Kahlman Trend & Trendlines plots a smoothed directional trend ribbon directly on the price chart by combining Hull Moving Average calculations with an optional Kalman filter. It evaluates two moving lines alongside their average, changing color to reflect
This indicator identifies bullish and bearish engulfing candlestick patterns directly on the price chart. To refine signal quality, it provides three optional filters: an ATR filter to cap maximum candle size relative to volatility, a swing high or low filter
Jinni v1 is an overlay indicator that highlights the Sydney trading session and plots buy or sell signals based on dual exponential moving average trends. It draws a dynamic box around the Sydney session price range and applies time filters to exclude Fridays
An ATR indicator in a separate pane with four display types: regular price units, percentage of close, ticks or currency value for a chosen position size. The smoothing method can be EMA, RMA, SMA or WMA, and an EMA of the ATR is plotted and colored by rising
A strategy-type script that draws on the price chart and combines two ideas. Pivot-based support and resistance lines are plotted from left and right bar counts, with breakout labels when price crosses a level on rising volume, and alerts for broken support or
Overlays several SuperTrend-style trailing stop lines on the price chart, each built from an ATR period, ATR multiplier and source, with a choice of using wicks or closes. Lines are green while the direction is up and red while it is down, with a flip when pri
This strategy calculates the relative strength index of the close and plots that oscillator plus oversold and overbought horizontal levels on the price chart because overlay is on. It opens a long when RSI crosses above the oversold level and a short when RSI
This indicator implements Tom DeMark Sequential logic directly on the price chart. It calculates TD buy and sell setups by comparing closes against four bars prior, tracks setup counts up to nine, and evaluates bar lows and highs to identify perfected setup co
A two-sided strategy that looks for a fan of fast EMA, medium EMA and slow SMA in order, a pin bar candle and a bar piercing one of the averages. It then places a stop order beyond the previous bar high or low. Exits combine a hard stop in pips with a trailing
An overlay for crypto charts that follows a staged sequence built from RSI and four simple moving averages. It flags bearish candles with RSI under 20, records their lows, watches for crosses above the 50-period and 300-period averages, and stores the low of a
AmiComStrategy is an indicator that calculates correlations between securities using the Corell indicator over specified timeframes such as 5D. It filters trading opportunities based on session times like 1300-1700 and security up and down times such as 3H. Th
This indicator calculates the Detrended Price Oscillator (DPO) and applies Hull Moving Average (HMA) and Exponential Moving Average (EMA) smoothing to it. It also evaluates Relative Strength Index (RSI) levels. The script determines market state by comparing t
A small indicator that finds confirmed pivot highs and pivot lows using a single length setting and labels each one as a higher high, lower high, higher low or lower low by comparing it with the previous pivot of the same kind. Labels are drawn on the price ch
A Pine library that exports three functions, bullish, bearish and getTrend, which judge market direction on the current symbol and timeframe. Each call takes three switches to include a Stochastic RSI cross, a MACD line versus signal check and a comparison of
This strategy trades mean-reversion bounces using Bollinger Bands and constructs JSON webhook payloads for automated execution. It opens a long position when the price crosses back above the lower band within a specified date filter and closes the position whe
This strategy combines a MACD crossover, a positive histogram, VWAP versus the open and a Supertrend direction change within the last few bars to open long trades. It closes the position when MACD crosses back under its signal line or Supertrend turns bearish.
A strategy that enters long when the MACD histogram crosses above zero, price is above both EMAs and the Supertrend has just turned up. It enters short on the mirror conditions. Positions are reversed by the opposite signal, and the code has no separate stop l
A price-chart overlay that approximates a volume profile over a custom number of recent bars. On the last bar it finds the highest and lowest mid-price in the chosen range, divides that span into thirty price bands and counts how many bars fall into each. It t
This indicator scans price charts to identify multiple classic bullish, bearish, and neutral candlestick patterns, including Hammers, Engulfing patterns, Dojis, Stars, and Marubozus. It evaluates prevailing market trends using simple moving average rules (SMA5
A Pine v5 library that supplies auxiliary calculation functions for the author's Woodwind Playbook script. The visible part includes a function that works out the gains after a position is scaled down, taking entry, exit, quantity, remaining quantity and direc
An indicator in a separate pane that compares a symbol's performance with a reference symbol, set to a Polish index by default. Performance is measured over the four quarters of a year with the most recent quarter weighted more, and falls back to recent quarte
Plots one moving average on the price chart and colours it by slope strength. The average type can be SMA, EMA, HMA, RMA, WMA, SWMA, VWMA or TEMA, with adjustable length and source. The slope of each bar is compared with the largest slope seen so far; when it
A Pine library that exports condition checks for long and short setups, selected by a position type string. The simple moving average check uses a 10-bar average and requires the close, and for longs the low, to sit on one side of it with a matching candle col
The Bull Market Support Band indicator overlays a higher-timeframe exponential moving average and simple moving average onto the price chart to visualize dynamic support or resistance zones. It calculates both moving averages using a user-defined timeframe res
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.