8,340 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 strategy plots on the price chart and stores recent closes in a float array during the first sixty bars. It enters a long position when the newest stored close is above the close ten slots earlier and the nine-period EMA crosses above the twenty-one-perio
This strategy combines Exponential Moving Averages (10, 55, and 200 EMAs) with a Stochastic Oscillator to execute trades. It enters long positions when the Stochastic K line crosses above D in oversold territory while price is above the 200 EMA. Short entries
This indicator combines Volume Weighted Bands, a Hull Moving Average with Keltner Channels, and a Swing Profile directly on the price chart. It calculates volume-weighted trend lines, ATR volatility bands, and swing structures to plot dynamic support and resis
The EMA Ribbon strategy plots six exponential moving averages (periods 8, 13, 21, 34, 55, 89) on the price chart to form a visual ribbon. It detects trend direction using full stack alignment, partial alignment (at least 4 of 6 consecutive pairs), or fast EMA
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
This indicator computes an Average True Range trailing stop to detect directional trend reversals as a feature component for a quantitative neural network framework. It uses an ATR multiplier to maintain dynamic upper and lower stop bands, triggering buy and s
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
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
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
Calculates and plots support and resistance zones based on candle wick rejections and liquidity sweeps directly on the price chart. The indicator scans historical price action using a configurable lookback period and wick threshold percentage, merging close le
This research diagnostic draws a volume histogram and paired-node consensus structures on the price chart. It selects an immutable profile interval from the newest confirmed macro broadening wall, then allocates each 15-minute bar's volume across fine, base, a
Mean Price is an indicator that calculates a custom weighted average price for each bar using open, high, low, and close values. The calculation dynamically adjusts its weighting depending on whether the bar closes higher, lower, or equal to its open price. An
Cerebr Wave is an overlay indicator that combines multi-timeframe Keltner Channels with a Wave Trend oscillator to analyze market structure and momentum. It calculates higher-timeframe and lower-timeframe Keltner Channels alongside Wave Trend crossover signals
This indicator plots multi-timeframe 50-period exponential moving averages from the Daily and 4-hour charts directly onto the price chart. It generates bullish or bearish signals when the current close aligns with the Daily trend, crosses the 4-hour EMA, and 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.