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.
Trend Persistence Score calculates a composite trend-efficiency oscillator plotted in a separate pane, grading trend strength and durability on a 0 to 100 scale. It integrates four distinct metrics: linear regression R-squared, Kaufman Efficiency Ratio, ADX wi
This indicator draws a volume profile and an imbalance summary directly on the price chart. It divides historical price action into configurable rows over a chosen lookback period, calculating bullish and bearish volume distributions while identifying zero-vol
This indicator tracks a configurable ICT sequence on the price chart. It advances through optional stages: Asian range bias, manipulation, New York macro windows, liquidity sweep, market structure shift, CISD, fair value gap, and retracement into that gap. Pre
Indicatorv5SMC / ICT / price actionSessions & time
Inner Outer Risk Zones plots horizontal price levels and risk boundary zones directly on the main price chart. The indicator allows traders to input manual target and support levels—including Outer Top, Inner Top, Inner Bottom, and Outer Bottom—along with risk
This indicator visualizes recent market price action on a circular polar coordinate system in a separate pane. It normalizes bar open, high, low, and close values across a specified lookback length into angular degrees and renders circular candlestick bodies a
The Williams Accumulation/Distribution (WAD) indicator calculates accumulation and distribution using price relationships and volume. It plots the cumulative WAD value as a yellow line in a separate pane. No buy or sell signals are generated. There are no adju
This strategy calculates the Supertrend indicator using a configurable ATR length and factor to identify trend reversals. It plots directly on the main price chart. When the Supertrend direction flips from bearish to bullish, the strategy closes any open short
M_time is a utility test script designed to evaluate Pine Script built-in time and environment variables. It calculates and plots various date components, timestamps, session flags, timeframe properties, symbol metadata, and bar state indicators in a separate
GOLDEN-PIVOT φ v2 is a Pine Script strategy that plots on the price chart. It calculates a golden pivot region using Fibonacci retracement at 0.618 of a swing high-low range spanning 96 candles. The script applies a volume filter requiring current volume to ex
A price-chart indicator that stays always in one direction after the first confirmed mark: a buy exits shorts and holds long until the next sell, and the reverse. It uses a causal trail, trend, range and shock regime detection, a score threshold and an optiona
Tick-chart-safe variant of an overlay indicator with many named combo signals on the price chart. Groups include relative volume extremes, double displacement and stack patterns, Katana session signals, whale high-volume markers with pocket pivot combos, SAAB
A long-only strategy built on fair value gaps. A bullish gap is detected when a bar's low is above the high two bars back. Depending on the confirmation setting, it enters on the gap alone, on the gap plus a high-volume breakout candle used as a simple order b
Draws supply and demand zones on the price chart from engulfing candle patterns. An algorithm mode setting switches between looser and strict engulfing definitions, and a threshold separates big from small candles. Other settings set the maximum number of engu
Plots two step-line levels on the price chart at the previous bar's midpoint plus and minus a moving average of ATR measured over about 15 minutes of bars. When price closes beyond a level while making a new extreme, the matching line is drawn thicker in red.
This overlay indicator marks historical ARK Invest purchases and sales of DYNS on the price chart. It places green buy labels below bars and red sell labels above bars at fixed calendar dates, with an X1 count of how many ARK ETFs traded that day. An ETF input
This script defines a function that performs polynomial regression on arrays of points. It maintains two arrays of size given by the length input, storing recent high prices and bar indices at pivot highs as well as low prices and bar indices at pivot lows. Th
This indicator identifies candlestick patterns on the price chart by combining price action with momentum factors and trend filters. It calculates one of four selectable oscillators: Karobein Oscillator, Money Flow Index, RSI, or Stochastic, alongside trend ru
Breakout Trend Follower is a price-chart strategy that enters long when price breaks a recent swing high. It places the stop at the recent swing low and trails that stop upward as higher lows form, exiting when a higher low is breached. A pivot lookback sets h
Calculates John Ehlers' Reflex indicator to measure price cycle reversal tendencies and trend direction with low lag. The script pre-filters price data using a two-pole Super Smoother Filter, measures linear extrapolation slope deviations over a lookback windo
This debugging utility script demonstrates how to create a print helper function in Pine Script using persistent labels. It defines a function that creates a single label on the first bar and continuously updates its coordinates and text content on subsequent
This indicator calculates a short-term trend filter based on an exponential moving average and its slope. It identifies upward, downward, or neutral states by evaluating bar-to-bar changes in the average, coloring the plotted line accordingly. It also calculat
This strategy calculates two Simple Moving Averages (SMA) with fast and slow length inputs. It generates a long signal when the fast SMA crosses above the slow SMA, and a short signal when it crosses below. Reversal signals automatically close existing trades
Ruckard Swim Waves is a Pine Script v5 strategy that trades long, short, or both on the price chart. It opens positions according to the selected side and exits with a percentage stop loss, take profit, and optional trailing take profit. After two consecutive
This indicator scans price action for symmetric, ascending, and descending triangle chart patterns using a sliding window of confirmed swing pivots. It fits upper and lower boundary trend lines across swing highs and lows, rating each pattern with a composite
This indicator overlays session VWAP and a 1-hour 200 Simple Moving Average on the price chart alongside a macro status dashboard in the top-right corner. It detects buy and sell signals by pairing local Stochastic conditions and rejection wick patterns near V
Calculates Candle Range Theory (CRT) ranges using specific one-hour or four-hour New York session candles. The indicator draws CRT range boxes directly on the price chart and plots entry signals based on Market Structure Shifts (MSS) with Fair Value Gaps (FVG)
Indicatorv5SMC / ICT / price actionSessions & time
Inside Extended tracks inside bar patterns and projects their initial breakout ranges on the price chart. When a candle body falls completely within the high-low range of the prior candle, the indicator marks the inside bar in yellow and establishes the mother
This overlay indicator searches price history for cup and handle shapes using left and right pivot lengths and a lookback of prior pivots. It draws the cup fill, border, and retrace on the price chart. Settings limit how steep the top line may be, how tall the
This indicator calculates the Yang-Zhang Volatility Adjusted Moving Average (YZVAMA) and overlays it directly on the price chart. It dynamically adjusts the moving average period by evaluating the percentile rank of short-term Yang-Zhang Volatility against his
This strategy draws Bollinger-style bands on the price chart using ta.sma and ta.stdev of close. It plots upper and lower bands based on the baseline SMA and a multiplier applied to standard deviation. Entries trigger when close breaks above the upper band for
The Mincontract Version Probe indicator measures and plots the minimum contract size allowed for the current symbol using the syminfo.mincontract variable. Rendered in a separate pane below the main price chart, this utility script serves as a test probe to in
Splits the chart into periods of a chosen higher timeframe, daily by default, and draws on the price chart. At each new period it adds a vertical line, a box around the most volume-heavy stretch of recent candles, and an orange running average of closes since
A price-chart indicator for lower timeframes that draws EMA 9, 21, 50 and SMA 200 clouds and prints always-in buy and sell flips. Signals combine EMA stack or cross, RSI, ADX and DI, relative volume and a lock that blocks tiny sideways ranges. The higher-timef
Overlay indicator that combines many named combo signals on the price chart. Groups include relative volume extremes, double displacement and stack patterns, Katana session signals, whale high-volume markers with pocket pivot combos, SAAB and KRATOS squared pa
A strategy based on 21 and 55 period Hull moving averages. A long needs the fast line rising and above the slow line, price above a 200 EMA and volume above its 20-bar average times a multiplier; a short needs the opposite. Each entry has an ATR-based stop at
Draws supply and demand zones on the price chart from engulfing candle patterns. Algorithm modes range from looser to strict engulfing, with a threshold separating big from small candles. Settings limit how many zones and how much history are kept, with a sepa
Shows bar range statistics in a separate pane: one-bar true range, candle body range and rolling percentile levels such as the median, 75th, 90th and 95th percentiles of true range. The lookback length is chosen from the chart timeframe. Blue columns mark bars
This indicator plots labels on the price chart to mark ARK Invest sell events for selected ETFs. Users choose the ETF type via input settings. Labels show sell information with share volumes and stock weights in the ETF. It draws on the price chart overlay. Th
Function: Complex Numbers is a Pine Script v4 utility script that provides custom functions for handling complex numbers stored in two-element float arrays. It enables developers to construct complex numbers from real and imaginary parts, extract individual co
This indicator constructs custom multi-bar candlestick visuals and high-low prediction lines directly on the price chart. It aggregates price action across flexible custom timeframe spans using line drawings rather than standard chart bars. Users can adjust th
The Brrrrr Strategy is a macro-based breakout strategy designed for crypto markets. It tracks the Glassnode total USDT supply daily metric and calculates a Donchian Channel over a user-defined lookback period. The strategy enters a long position when the USDT
Calculates John F. Ehlers' Reverse Exponential Moving Average (EMA) designed to eliminate lag from traditional exponential smoothing. The indicator computes a warmup-compensated base EMA and subjects it to an 8-stage cascaded Z-transform inversion. The resulti
This Pine Script v4 indicator plots three series on a price chart: the sine of high prices, the cosine of low prices, and the sine of close prices. It uses the fill function to shade the area between the first and third plot in red and between the second and t
This indicator calculates the two-argument arctangent function to compute the angle in radians between the positive x-axis and a point defined by two inputs. It handles all four quadrants correctly, bounding results between negative pi and positive pi. The use
This overlay indicator draws a box for each completed higher-timeframe period on the price chart. Box height follows High/Low Range, True Range, or Heikin Ashi Range, and the fill is growth or fall color according to that period’s open-to-close change. Auto ti
This trend-following scalping strategy combines a moving average trend filter with the Absolute Strength Histogram indicator. It opens long positions when price is above a selectable baseline moving average and the histogram signals bullish momentum, and short
This indicator calculates an advanced True Strength Index momentum oscillator plotted in a separate pane. It evaluates price momentum using double-smoothed price changes, offering multiple signal line smoothing algorithms such as EMA, SuperSmoother, and JMA ap
This indicator calculates a Volume Weighted Average Price (VWAP) reset across selectable anchor periods, including daily sessions, weekly, monthly, yearly, YTD, half-year, or a custom manual date. It plots the main VWAP line on the price chart alongside option
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.