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.
Time Machine Pro is an overlay drawing tool that reflects historical price between two user-selected price levels and two times. It measures green and red candle distances by sum, simple average, or volume-weighted average, then plots spirals or vertical lines
This indicator overlays historical ARK Invest buy and sell dates for NSTG on the price chart. It places red sell labels above bars and green buy labels below bars, with text that counts how many selected ETFs traded that day. An ETF input switches between ARKG
Av3 is a price-chart strategy that compares the current seven-period ATR with the average of the previous five ATR values. When ATR is above that average it buys if the open is above the prior close and sells if the open is below it; when ATR is below the aver
Min-Max Normalization rescales a price series or input source into a bounded range between 0 and 1 using rolling minimum and maximum values over a designated lookback period. It plots the normalized output as a line indicator in a separate chart pane. Users ca
This indicator plots trading volume as a column chart in a separate pane with dynamic gradient coloring. It assigns distinct colors for bullish and bearish price bars based on whether the close is above the open. The transparency of each column dynamically adj
This strategy overlays two SMA lines with a cloud fill to show trend direction. It detects band reversals with Bollinger Bands and uses RSI for mean-reversion signals. Long entries trigger when the trend is bullish, price touches the lower band, and RSI is bel
This indicator renders an analog and digital world clock in a separate pane. It calculates local time across global cities based on UTC offsets and configurable daylight saving time options. Users can choose specific time zones, adjust text sizes, and toggle d
This session-based strategy triggers long entries at the start of the New York trading session when trend and momentum conditions align. It calculates a 38-period Exponential Moving Average and a 14-period RSI. A long position is taken at session open if the c
Time Machine is an overlay indicator that calculates historical price reflections using Fibonacci levels, SMA variants, Bollinger Bands, VWAP, and spiral spine methods. It plots symmetric price lines around dashed levels and dynamic indicator lines, plus area
NTDOY Tracker overlays historical buy and sell transactions made by ARK Invest funds on the price chart for Nintendo Co., Ltd. (NTDOY). It places visual labels at specific historical timestamps indicating trade activity and the count of participating ARK ETFs.
This strategy implements the B-Xtrender indicator, calculating short-term and long-term momentum oscillators using RSI applied to moving average spreads and smoothings. It plots the momentum oscillators as colored histograms in a separate pane. Trades are filt
This indicator calculates and plots the Minus Directional Indicator (-DI) in a separate pane to measure downward price movement. It computes negative directional movement and true range using Wilder's smoothing with warmup compensation, ensuring stable values
Calculates and plots a ZigZag indicator directly on the price chart to highlight significant high and low pivot points. The script identifies local pivot highs and lows using a custom loop mechanism based on the depth setting, then connects them with drawing l
Pivot Trendlines is an indicator that plots horizontal support and resistance lines along with trendline support and resistance based on swing pivots of customizable lengths. Three separate groups allow adjustment of pivot length to draw multiple horizontal li
The Andean Oscillator measures trend strength by calculating distinct bullish and bearish components using modified exponential envelopes applied to open and close prices. It computes variance-like metrics to estimate directional volatility and tracks momentum
The Cadence Matrix Pairing strategy calculates price direction changes and volume confirmation across short, medium, and long horizons using close comparisons and simple moving averages of volume. It assembles these binary votes into a transposed matrix and ta
TMoon Mirror plots a dynamic moving average line on the price chart that decays in length according to user-defined time ranges. It mirrors this line around a central level and plots top, middle, and bottom horizontal lines for support and resistance. An optio
NU-tracker plots historical ARK Invest buy and sell events for the NU stock on the price chart. It places green labels below bars for buys and red labels above bars for sells, using fixed dates from late 2021 into early 2022 in the shown code. Each label marks
Backtest Custom HiLo Strategy overlays a high-low trailing line on the price chart calculated from moving averages of highs and lows. It establishes upper and lower bounds using simple or exponential moving averages along with optional period extremes. Signal
Calculates and plots the Minus Directional Movement (-DM) component of J. Welles Wilder's directional movement system. It measures downward price momentum by comparing the current low to the previous low and applying Wilder's RMA smoothing with warmup compensa
The Pivot Trendlines indicator identifies swing highs and lows on the chart to form support and resistance levels. It plots these levels as markers and draws trendlines connecting them. Buy and sell signals activate when the price breaks beyond a set percentag
This indicator plots automatic Fibonacci speed resistance fans on the price chart using zigzag pivots derived from TradingView’s auto Fibonacci retracement logic. Deviation and depth set how far price must move and how many bars form each pivot. Optional setti
This strategy calculates a fast EMA, a slow EMA, and an ATR value to implement a trend-following trading model with cash position sizing. It enters long trades when the fast EMA crosses above the slow EMA. Positions are exited when the fast EMA crosses below t
This indicator draws three Ichimoku-style clouds on the price chart from the bar distance between two user-selected times. It scales that range by 1, 0.618 and 1.618, then calculates each cloud with Donchian midpoints for the conversion, base and span-B length
NUVA-tracker visualizes historical buy and sell transactions executed by ARK Invest on NuVasive (NUVA). It plots informational labels directly on the main price chart at historical timestamps, displaying transaction type and the number of participating ARK ETF
This strategy calculates a custom Signal-to-Noise ratio derived from logarithmic aggregation of inverse close prices and compares it against a Simple Moving Average. It plots both lines in a separate pane and alters price bar colors based on signal direction.
Mode calculates the most frequent value of a chosen source series over a lookback period and plots that value in a separate pane. The source defaults to close and the period defaults to 14. On each bar it counts non-missing values inside the available window,
This indicator plots supply and demand zones along with pivot-based trendlines on the price chart. It detects swing highs and lows to form trendlines and overlays three customizable zones with adjustable lengths and timeframes for multi-timeframe analysis. Mai
This indicator automatically plots Andrews Pitchforks, Fibonacci retracement levels, and Zig Zag trendlines directly on the main price chart based on pivot high and low points. It supports two independent sets of pitchfork and Zig Zag configurations with custo
The PineForge Compass Partial Ladder strategy identifies trend-following opportunities using a fast and slow Exponential Moving Average (EMA) crossover. Upon entering a long position, the strategy manages risk and profit targets using Average True Range (ATR)
The script plots two closed polylines on the price chart representing tangent circles. It takes two user-defined points defined by time and price inputs to calculate the direction and distance between them. Centers of two circles with radii one-quarter of thos
This indicator plots ARK Invest purchase and sale labels for NVMI on the price chart. It marks dated trade events with buy or sell text and a count of how many ARK ETFs acted that day. The ETF input chooses which fund records to show, though this file only off
This strategy simulates a 3Commas dollar-cost averaging (DCA) bot directly on the price chart. It opens long or short deals based on configurable conditions such as immediate execution, RSI-7 thresholds, or TradingView technical presets. As price moves against
Modular Filter (MODF) calculates and plots an adaptive dual-path smoothing filter on the main price chart. Based on work by alexgrover, it computes upper and lower EMA bands that snap to price extremes and maintain a bullish or bearish state. The beta paramete
The Pivot Trendlines strategy identifies swing pivots on the price chart using a configurable swing lookback period and draws trendlines connecting these pivots. It generates buy and sell signals based on three-move patterns with user-defined move sizes, filte
Calculates the statistical likelihood of price reaching multiple percentage-spaced breakout levels above and below the current price. It renders horizontal lines with percentage probability labels directly on the price chart and maintains a summary dashboard i
PineForge — Constellation Bands is a mean-reversion strategy displayed on the price chart. It calculates standard Bollinger Bands alongside price volatility. A long entry triggers when the close price crosses back above the lower band while remaining below the
Universal System plots geometric logarithmic spirals based on the golden ratio directly on the price chart. The indicator gathers price range data between two user-defined anchor timestamps, accumulating bullish and bearish price movement sums. On the final ba
NVS Tracker overlays historical buy and sell transactions executed by ARK Invest for Novartis (NVS) directly onto the main price chart. It renders colored visual labels below or above price bars corresponding to specific trade dates, indicating whether ARK fun
BarUpDn Long Strategy executes long trades based on price bar directional movements and previous bar closes. It places a long stop order above the current high when a bullish candle opens above a prior close. Because short entries are restricted to exiting lon
This indicator calculates momentum as the difference between the selected source and the same source a set number of bars earlier, measuring the rate of price change. It plots a single MOM line in a separate pane. Length sets the lookback, with a minimum of on
The Pivot Trendlines indicator detects swing pivot highs and lows on the price chart using a user-defined pivot length. It identifies small pivots when they occur and large pivots when price breaks through the recent opposite small pivot. Labels for small pivo
CAGR Custom Range calculates the compound annual growth rate between two user-selected times on the chart. It captures the close at each point, passes those prices and times to TradingView's cagr function, and draws a connecting line colored by whether the lat
This strategy uses RSI with bull and bear threshold crossovers to trade opposite market pairs. It enters long when RSI crosses above 58 and short when below 42, automatically closing the opposite position first. Entry size is 8 percent of equity with 0.05 perc
This overlay indicator draws a pair of geometric spirals on the price chart between two user-chosen times. Inside that window it sums the ranges of rising and falling candles and uses those sums, together with the window's price span and a golden-ratio spiral
This indicator overlays historical ARK Invest buy and sell transactions for NXP Semiconductors (NXPI) directly onto the price chart. It plots green labels below the bars for purchase days and red labels above the bars for sale days, including indicators for tr
The BarUpDn Strategy triggers trades based on candle price direction relative to a past bar. It enters a long position with a stop order above the high when the current candle closes above its open and its open is higher than the close of a specified lookback
The MACD indicator calculates the difference between two exponential moving averages with fast and slow periods to identify momentum shifts in the market. It plots the MACD line, signal line, and histogram bars in a separate pane below the price chart. The his
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.