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 calculates Bollinger Bands and RSI to trigger dollar-cost averaging buy orders. It enters long positions whenever the closing price dips below the lower Bollinger Band while the RSI is below 50. Order units are calculated dynamically based on a f
This indicator calculates and plots a specified statistical quantile of a price series over a rolling lookback window using linear interpolation. It draws directly on the price chart as an overlay line. Users can adjust the input source, the lookback period, a
Psychological Levels is a strategy that plots horizontal grid lines based on whole, half, and quarter psychological price levels directly on the chart. It triggers trades during designated intraday session windows, filtering signals using a multi-timeframe mov
This indicator projects future simple moving average trajectories using acceleration and dampening calculations. It computes a smoothed moving average, measures second-order changes (acceleration) over a specified window, and projects curved paths forward usin
This strategy detects Fair Value Gaps on the price chart using 3-bar candle imbalances filtered by ATR. It maintains a capped array of active FVG zones with their tops, bottoms, and bullish flags. Long entries occur when the current bar overlaps an active bull
This overlay indicator marks historical ARK Invest buy and sell activity for Rocket Lab on the price chart. Green labels sit below the bar on purchase dates and red labels sit above the bar on sale dates, with a count of how many selected ETFs traded that day.
Booz Strategy is a price-chart strategy that opens longs when a fast EMA crosses above a slow EMA and shorts when it crosses below, provided an optional longer moving-average trend filter agrees. SMA or EMA choices and lengths change the filter and a plotted s
Quantile Loss (Pinball Loss) calculates the pinball loss between an actual series and a predicted series on each bar, then averages those losses with a simple moving average. It plots that rolling mean as a yellow line in a separate pane, with a dotted zero re
Psychological Levels is a chart overlay indicator that draws horizontal quarter, half, and whole round-number levels. It marks buy and sell signals when volume crosses user thresholds near those levels, with an optional moving-average filter, a delay between s
This indicator overlays fractal-based volatility bands, Fibonacci retracement levels, and vortex spiral trajectories directly on the price chart. It combines a Hurst exponent trend-persistence calculation with multi-layered Fibonacci cascade ratios and optiona
The strategy detects smoothed RSI divergences on the price chart. It calculates smoothed RSI as the EMA of 3 applied to the 14-period RSI of close. Bullish divergence signals when smoothed RSI is below 40, with smoothed RSI rising over five bars while close ex
This overlay indicator marks historical ARK Invest purchases and sales of RKUNY on the price chart. It places green buy labels below bars and red sell labels above bars on specific dates, each labeled with an X1 count of funds trading that day. The ETF input o
This strategy attempts to capture temporary market dips by identifying high-volume spikes during oversold conditions. It enters a long position when volume exceeds a upper standard deviation channel based on its simple moving average while the RSI remains belo
This indicator plots Quantitative Qualitative Estimation in a separate pane. It computes Wilder RSI from the chosen source, smooths it with an exponential moving average, and derives a dynamic average range from a double EMA of absolute RSI changes. A trailing
Psychological Levels is a price-chart strategy that draws quarter, half, and whole rounded price levels. A rounding value sets the level spacing, and each level type can be toggled with its own color, line style, and width. Buy and sell volume thresholds, a pr
Market Manipulation Index plots a composite oscillator from 0 to 1 in a separate pane. It averages a sine-wave fit error, a two-lag linear prediction residual, and a high-versus-low frequency variance ratio, each limited by price variance. An ATR-scaled window
This strategy calculates synthetic buy and sell volume from candlestick price action and computes a ten-bar rolling cumulative volume delta. It signals long entries with a fixed position size of one unit when the cumulative delta crosses above zero, and closes
ROK-Tracker visualizes historical buy and sell transactions made by ARK Invest funds for Rockwell Automation (ROK). The script plots green and red labels directly on the price chart corresponding to specific trade timestamps, indicating buy or sell actions alo
Breakout Trend Follower V2 is a price-chart strategy that enters long when price breaks a recent swing high. It uses the recent swing low as the stop and moves that stop up as higher lows form, exiting when a higher low is breached. Users set the backtest date
This indicator calculates the fractional Rate of Change (ROCP) between the current price and the price N periods ago. Unlike standard percentage-based momentum oscillators, it expresses the price difference as a decimal fraction. The indicator draws in a separ
Psychological Levels calculates and overlays key rounded price thresholds on the main chart, distinguishing between whole, half, and quarter price levels. It identifies potential trade setups filtered by defined session time windows, prior-day range conditions
MC Bias Strategy Example is a Pine Script strategy designed to demonstrate automated trade execution driven by an external Markov Chain bias indicator. The script accepts a user-selected data source to determine directional bias and executes trades based on th
This strategy isolates and tests manual directional movement and ADX calculations plotted directly on the main price chart. It constructs plusDI, minusDI, and ADX without using built-in indicators, entering a long position when ADX exceeds 25 in an uptrend and
RSW-tracker is an overlay indicator that marks ARK Invest activity for the RSW ticker on the price chart. The shown script creates a red downward label dated 17 January 2020 with the text Sell X1 when the ETF input is ALL. That input is the only setting and of
This strategy trades breakouts, pullbacks, and reversals in the chosen direction on the price chart. Entries can require new long-term highs or lows and recent moving-average alignment, with optional weekly or monthly Supertrend filters. Exits can follow an op
The ROC indicator calculates the percentage change in price from the current bar to N bars ago. It draws the resulting values in a separate pane on the chart. The main setting allows selection of a price source such as close and a length parameter that control
Psychological Lines draws a grid of horizontal round-number levels on the price chart. It rounds a baseline price by the Rounding Value, then plots whole, half, and quarter steps above and below that baseline, up to ten steps on each side. Each group can be tu
The McDonald's Pattern indicator detects specific price patterns on the chart by finding top and bottom points using highest and lowest values over a user-defined length. It plots fries above top points and hamburgers below bottom points, then connects selecte
This Pine Script strategy isolates and validates session and timezone filtering using a basic market entry mechanism. It calculates active trading windows using timezone-aware time functions and enters a single long position at the start of the defined session
RTP Tracker visualizes historical buy and sell trades executed by ARK Invest funds on the RTP ticker. The script draws green labels below price bars for buy orders and red labels above bars for sell orders directly on the price chart, showing the relative fund
This Pine v4 strategy draws on the price chart and filters breakouts with a fixed Supertrend, ATR length, volume moving-average markup, and moving-average alignment, plus short and long high-low periods. Trade direction defaults to long and can include shorts.
This indicator calculates a rate of change ratio: the current source value divided by the source value a set number of bars earlier. It plots that ratio as a yellow line in a separate pane and does not mark entries, exits, or price levels. The source defaults
This strategy trades swing high breakouts on lower timeframes in alignment with higher-timeframe moving average trends. It evaluates price highs using a configurable lookback period and applies higher-timeframe moving average filters along with an optional ATR
This indicator tracks and visualizes modern portfolio theory metrics across up to five user-selected assets directly on the price chart. It calculates combined portfolio performance, asset correlation over a configurable length, and individual asset allocation
This integration strategy combines seven analytical layers into a single system drawn directly on the main price chart. It calculates pivot highs and lows, Fair Value Gaps (FVG) scaled by ATR, smoothed RSI momentum, volume z-score anomalies, cumulative volume
This indicator overlays historical ARK Invest buy and sell trade records directly onto the price chart using visual labels. It identifies the dates on which ARK funds bought or sold shares of the stock, indicating transaction counts and trade activity above or
BT-5M-1H is a mean-reversion strategy designed for 5-minute charts that simulates 1-hour Bollinger Bands to identify overbought and oversold conditions. It takes positions when price crosses standard deviation multiplier levels and exits using configurable log
This indicator calculates the Range Action Verification Index as the absolute percentage difference between a short simple moving average and a long simple moving average of close. It plots that value in a separate pane with a dashed threshold line and a dotte
The Range Percent Breakout Strategy identifies range contraction and inside bar patterns where the current bar's range is within a specified percentage threshold of the previous bar. When this condition is met while flat, breakout levels are established above
The Moving Regression Prediction Bands indicator calculates polynomial regression bands from historical price data using a moving window. It fits a polynomial curve of specified degree to generate upper and lower bands representing expected price ranges with p
The Volume Breakout strategy identifies directional price movements confirmed by trading volume spikes and Average True Range thresholds. It enters long positions when prices rise beyond a volatility-adjusted distance accompanied by above-average volume, and s
This indicator plots historical buy and sell transactions executed by ARK Invest funds for RXRX stock directly on the main price chart. It hardcodes transaction records and creates labeled markers indicating the direction and the number of participating ARK fu
This strategy combines percentage-based moving average channels, a linear regression curve, and an external timeframe Hull moving average variant to generate trade signals. Buy entries trigger when the linear regression crosses above the smoothed moving averag
This indicator applies the rectified linear unit to the difference between the selected source and a 20-period simple moving average. Positive deviations plot in green and negative deviations plot in red in a separate pane. The only input changes the price ser
This multi-filter strategy triggers intraday entries by combining Relative Strength Index (RSI) range conditions with Volume Weighted Moving Average (VWMA) crossovers, Simple Moving Average (SMA) price alignment, and volume oscillator filters. Users can restri
Plots normalized percentage changes for groups of multiple assets in a separate pane to create a comparative spaghetti chart. It tracks relative performance using price, on-balance volume (OBV), or open interest, anchored to customizable periods or timestamps.
This strategy tracks the difference between a Volume-Weighted Moving Average (VWMA) and a Simple Moving Average (SMA) of identical lengths. It enters a long position when the VWMA crosses above the SMA, and enters a short position when the VWMA crosses below t
SAND-tracker is an overlay indicator that marks recorded ARK Invest activity on the SAND price chart. The visible script places one red label above the bar dated 17 January 2020, with the text Sell and X1. An ETF setting is present but only offers ALL, so this
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.