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 price-chart overlay that draws a static set of options gamma levels for SPX (the S&P 500 index) expiring in about fifty-five days. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026-02-03, produced o
A Pine v4 overlay that draws the Asian session range as a box with high, low and midline levels that extend to a chosen time, using Eastern time hours. It can also show a London session box with its range in pips. Start and end hours, line extension time, colo
This strategy tracks the opening 1-minute range during regular market hours and trades the subsequent breakout on the price chart. It locks the high and low of the 09:30 to 09:31 session and plots both levels as trigger lines. A long position is taken if price
Target Trend is a trend-following overlay indicator that determines market direction using ATR-adjusted simple moving average bounds. It calculates upper and lower channel boundaries based on SMA calculations of high and low prices offset by a smoothed ATR val
A chart-overlay indicator that detects pivot highs and lows and draws extended trendlines through the latest pairs, keeping only lines steeper than a minimum angle and limiting the total number. Resistance and support pivots can be labelled R and S. A table su
An indicator on the price chart that builds smoothed average prices from a Heikin Ashi style open, high, low and close, then compares a smoothed close with a smoothed open. Green or red shading marks which is higher, and a buy or sell triangle appears when the
An experimental pane indicator that simulates a daily dollar-cost-averaging buy of a fixed BTC size at 00:45 exchange time inside a start and end date window. When price is below the average cost, it simulates a short hedge sized to match the long. It tracks a
This indicator calculates and plots the total number of bars that occurred during the previous day. It tracks daily boundaries by detecting changes in the day of the month, continuously counting bars between transitions. Whenever a new day begins, it stores th
This indicator calculates and plots eight separate moving averages directly on the price chart. It provides seven Simple Moving Averages with default periods of 5, 10, 20, 30, 60, 120, and 200, alongside one 20-period Exponential Moving Average. Each moving av
Higher Close and Lower Close is an overlay indicator that highlights simple single-candle price action signals. It monitors whether the current bar closes above the preceding bar's high or below the preceding bar's low. When a close exceeds the previous high,
This indicator plots the 14-period simple moving average on the price chart. It defines functions that detect crossovers in the SMA line with price, RSI crossing 70 and 30 levels, and momentum line crossing zero. When these conditions occur, the script sends a
A Pine v4 overlay that draws up to three moving averages, each with its own type, length, optional timeframe and colours. Available types include EMA, HMA, WMA, DEMA, VWMA, VWAP, T3 and others. A length of zero disables an average. Lines and bars can be colour
This indicator constructs a grid of upper and lower price levels centered around a Simple Moving Average baseline. It calculates ten upper bands and ten lower bands spaced evenly at step multipliers defined by the grid gap percentage. These bands are plotted d
A separate-pane version of the Directional Movement Index. It plots the ADX line together with the plus and minus directional indicator lines, using the same Wilder style smoothing as the standard tool. The area between the plus and minus lines is filled with
A Pine v4 strategy that plots a very fast two-period EMA of the close in orange on the price chart. It goes long whenever the EMA is above its previous value and short whenever it is below, closing the opposite side, so it flips direction as the slope changes
The Ahrens Moving Average calculates a smoothed trend-following line using a recursive formula that factors in both the immediate previous average and a historical average value. It plots directly on the main price chart as a continuous overlay. When color hig
This multi-timeframe indicator calculates and draws key technical levels directly on the main price chart. It projects pivot points, support and resistance lines, and previous high/low boundaries across three configurable timeframes such as daily, weekly, and
Trend EMA + RSI is a trend-following strategy that generates trading signals using three exponential moving averages and RSI filter conditions. Long trades execute when a fast EMA crosses above a slow EMA while remaining above a long-term baseline EMA on a bul
This script plots historical buy and sell transactions made by ARK Invest for Autodesk Inc (ADSK) directly on the price chart using labels anchored to specific timestamps. Each label indicates a buy or sell action along with the number of participating ARK ETF
This script provides helper functions to calculate linear forecasts based on series data, mirroring standard spreadsheet forecast functionality. It converts price series into arrays over specified sample lengths and computes the predicted future value using si
The ESH2023 5M strategy is a Pine Script v5 indicator for E-mini S&P 500 futures trading on the 5-minute chart. It calculates a Stochastic oscillator from Ichimoku cloud high/low averages using inputs for K period, D period, and smoothing. The script signals l
The Quantity Quality Commitment indicator evaluates market momentum across three dimensions in a separate chart pane. It measures quantity by counting bullish and bearish candles over a lookback window, assesses quality by analyzing the ratio of candle bodies
This indicator marks swing highs and lows on the price chart. It treats a bar as a high or low when its high or low equals the extreme across a window of bars on both sides. Persistent variables store the latest confirmed high and low. When a new high appears,
This indicator plots dynamic support and resistance levels on the price chart. It detects pivot highs and lows using the pivot length and tracks touches to build strength-based levels. Support and resistance zones appear as colored boxes while lines mark key l
Calculates a central Exponential Moving Average with upper and lower channel bands offset by a fixed pip distance, inspired by LazyBear's Pip Collector script. Generates buy and sell signals when price interacts with the envelope bands, with an optional ATR vo
This strategy generates trading signals on the 5-minute price chart using Williams Fractals for trend reversals, combined with EMA fast and slow trend filters and optional RSI confirmation. Long entries trigger on bullish fractals aligned with rising EMA and R
This indicator calculates and plots the bar average price directly on the main price chart. It evaluates the arithmetic mean of each bar's open, high, low, and close values, matching standard TA-Lib average price implementations. The script contains no user-co
This indicator calculates a normalized percentage oscillator based on the distance between the closing price and a 10-period simple moving average. It displays the oscillator line alongside a dotted zero reference line in a separate indicator pane. The space b
This indicator plots a standard Relative Strength Index (RSI) in a separate pane alongside customizable overbought and oversold threshold levels with shaded fills. It identifies pivot highs and lows on the oscillator to detect regular and hidden bullish and be
This overlay indicator plots a SuperTrend line on the price chart using a fixed ATR length of 10 and a factor of 3. When the trend direction is up it draws a green line and a light green fill toward the candle midpoint; when down it draws a red line and a ligh
This indicator calculates and plots the cumulative arithmetic mean of a selected price series from the very beginning of the chart history. It continuously sums non-null values and divides by the total count of valid bars seen so far. The user can adjust the i
This indicator overlays higher-timeframe candles, price traces, fair value gaps, and liquidity sweeps directly on the main price chart. It projects key high, low, open, and close levels using customizable trace lines to monitor structural reference points. As
This indicator plots a MACD oscillator in a separate pane. It calculates the source as the average of the previous ten open prices, then subtracts a slow moving average from a fast moving average. A signal line and a histogram follow. Fast, slow, and signal le
This indicator calculates and plots standard Bollinger Bands directly on the price chart. It computes a central basis line using a simple moving average of the selected price source over a user-defined period. Upper and lower bands are constructed by adding an
Zen ATH Bands calculates the all-time high or current price of an asset and projects horizontal reference lines representing percentage pullback levels. It draws up to seven user-defined drawdown thresholds below the baseline, complete with custom price and pe
Stochtaker combines a Stochastic oscillator and Bollinger Band Width Percentile (BBWP) into a single separate pane indicator. It calculates BBWP across a configurable lookback period and length, displaying volatility conditions using a dynamic color spectrum o
This strategy trades Donchian breakouts on the price chart and sizes each unit from a percentage of equity. It allows long and short entries, places an ATR initial stop, trails with a chandelier stop, and can add units as price moves by a multiple of ATR, up t
Divergenced H002 is an automated trading strategy designed to identify divergence setups using transitions in the Squeeze Momentum Indicator combined with Curie moving average closing lines for exit conditions. It detects bearish divergence when momentum weake
This indicator plots three stochastic oscillators and a Traders Dynamic Index in a separate pane. Stochastic periods of 15, 32 and 50 each draw a K and D line that turns green below 18 and red above 82. A background band turns green when all six lines are over
Commodity Heat Reversal plots score-based mean-reversion reversal markers on the price chart for commodity futures, aimed at the four-hour timeframe. It builds separate long and short heat scores from ATR distance to a mean moving average, ATR expansion, RSI e
This indicator automatically maps the current chart timeframe to an aligned higher timeframe to detect and draw ICT-style Fair Value Gaps (FVGs). It identifies bullish and bearish price imbalance zones and displays them as colored overlay boxes directly on the
This strategy overlays volume-weighted average price deviation bands and an exponential moving average trend filter directly on the price chart. It enters long positions during an uptrend when price recovers above the lower band, and enters short positions in
This indicator plots optional exponential and simple moving averages plus five fixed simple averages and one Hull moving average on the price chart. The optional EMA and SMA change color with slope: green when rising, red when falling, and blue when flat. The
This indicator calculates the difference between Heikin-Ashi close and open values to quantify directional candle spread. It smooths this delta value using a simple moving average and plots the resulting oscillator as a line in a separate pane. Traders can cus
This indicator combines a fast and slow exponential moving average crossover, an RSI filter, and a volume flow indicator into a weighted directional score. It draws an on-chart dashboard for those components and can plot buy or sell arrows when the score meets
This strategy simulates a dollar-cost averaging investment approach directly on the price chart. It executes a long entry with a fixed cash amount on every historical bar that falls within a user-defined date window. All accumulated open positions are closed s
This strategy executes breakout trades based on price channels and moving average trend alignment. It enters long positions when the closing price breaks above its 20-period high while trading above a 130-period simple moving average. Short positions enter whe
This indicator plots session boxes, high-low ranges, and optional open lines for Asia, London, and New York sessions on the price chart. It detects breakouts when price crosses the prior session range. Inputs let users toggle visibility of boxes, open lines, b
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.