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 identifies entry setups on short timeframes by combining moving average trend filters with Bill Williams fractal breakouts. It tracks multi-bar high and low fractals to establish market structure, waiting for confirmed fractal breaks in the direc
LineGrid View draws a set of horizontal price lines on the chart. It finds the lowest low and highest high across loaded bars, builds a Fibonacci sequence, and starts a line at either extreme. Each following line multiplies or divides that price by the next Fi
This indicator plots support and resistance channels on the price chart from pivot highs and lows. It groups nearby pivots into channels whose width is a percentage of the recent high-low range, then draws the strongest levels. Users set the pivot period, high
A dollar-cost averaging strategy template designed to simulate algorithmic DCA trading bots. It initiates a base order immediately or based on indicator inputs, then scales into positions with safety orders as price deviates against the entry, applying configu
This multi-indicator strategy combines the Relative Strength Index (RSI), Choppiness Index, Stochastic Oscillator, and an Arnaud Legoux Moving Average (ALMA). It plots RSI, Stochastic, and Choppiness lines in a separate pane. Long entries trigger when RSI cros
This indicator tracks market direction by combining Bollinger Bands breakouts with ATR-adjusted pivot point channels. It establishes a primary trend line based on price breaking outer Bollinger Bands filtered by ATR, then validates the movement with a secondar
This indicator tests a simple neural network for recognizing 2-bit numbers in Pine Script. It converts linear 1D arrays into 2D matrix structures for weights, biases, and activations using custom array functions. The network trains over a user-defined number o
This indicator plots yearly, monthly, and Monday open, high, low, and optional midpoint prices on the chart. It requests those values from yearly, monthly, and daily series and keeps Monday levels after the first Monday of the week. Toggles turn yearly, monthl
The ANN MACD Future Forecast is an experimental indicator serving as a true deep learning sample on TradingView. It calculates Bollinger Bands and Squeeze Momentum using custom functions for SMA, EMA, standard deviation, highest and lowest values. The script p
This indicator calculates and plots the standard Average Directional Index (ADX) to measure overall trend strength. It calculates positive and negative directional movement against the true range using RMA smoothing to derive the directional index, which is th
Detects liquidity sweeps around higher-timeframe compression zones and generates reversal trade signals. It screens setups using four layers: compression zones, volume vacuum detection, sweep classification (spike or grind), and pressure gradient momentum. An
BL-ESW Pinbar Market Lab is an overlay indicator that calculates rolling VWAP cost anchors across multiple fixed windows to establish dynamic price levels. It detects Pinbar candlestick patterns using customizable wick-to-body ratios and plots GetDelta volatil
This indicator plots 9-period and 21-period exponential moving averages directly on the price chart to identify momentum changes. It generates entry signals when a fast EMA crosses above a slow EMA while RSI is between 50 and 65 and the MACD histogram is posit
The indicator plots the fast 9 and slow 15 EMA on the price chart and colors the area between them green for bullish trend and red for bearish. It generates BUY signals on the fast EMA crossing above the slow EMA and SELL signals on the opposite crossover. Sig
This trend-following strategy implements Paul Tudor Jones' long-term moving average rule directly on the price chart. It calculates an SMA or EMA baseline with an optional percentage band and a confirmation close counter to filter out false breakouts. The stra
This library provides functions for rolling statistical computations and probability calibration in trading applications. It maintains rolling buffers with running sum recalculation to efficiently handle large datasets. Additional tools compute 3-way posterior
The EMA RSI indicator plots multiple moving averages including EMAs and MAs on the price chart and the RSI oscillator in a separate pane. It identifies when a trending asset returns to support with RSI in oversold, using green signals and confirmations at key
This indicator maps market structure and price action levels directly on the price chart. It detects Break of Structure (BOS) and Change of Character (CHOCH) patterns alongside swing points. The script identifies key zones including Quasimodo Levels (QML), Sup
The indicator identifies multi-timeframe swing highs and swing lows to track liquidity levels across different chart horizons. When price wicks through a higher timeframe level and closes back inside, it plots a sweep line and label directly on the price chart
This Pine Script v5 indicator overlays multiple technical strategies on the price chart to generate buy and exit signals. It scores confluence across SuperTrend direction flips, momentum (EMA, RSI, ROC), Bollinger Band mean reversion, breakout volume, and Stoc
This indicator overlays the developing 60-minute candle on the price chart as a wick box and a body box that update until the hour closes. It tracks the hour high and low, records the first extreme, and connects successive swing pivots with lines stored in a c
This script calculates two Exponential Moving Averages (EMAs), default periods 9 and 21, and plots them directly on the price chart. It shades the area between the lines green during bullish trends and red during bearish trends. Crossovers trigger delayed Buy
This indicator evaluates and visualizes institutional banker, hot money, and retail trader strength inspired by the MCDX model. It measures RSI-based momentum across daily, weekly, and monthly timeframes, combining them into a weighted composite strength score
This strategy calculates Kaufman's Adaptive Moving Average (KAMA) using a custom efficiency-ratio function on closing prices. It plots a color-coded KAMA line directly on the price chart, turning green when the slope is positive and red when negative. The stra
This test strategy demonstrates Pine Script v6 risk management using maximum consecutive losing days rules. Once the configured start time is reached, it opens long positions on set bar intervals and optionally executes partial position exits. It tests trading
This strategy calculates fast and slow EMAs crossed with an RSI filter to generate long and short signals on the price chart. It enters positions based on EMA crossover conditions filtered by RSI thresholds and exits using stop-loss and take-profit levels scal
The EMA Volume indicator plots two exponential moving averages on the price chart, with lengths of 50 and 200 periods. It calculates a simple moving average of volume and filters cross signals based on volume levels. Bullish and bearish crossovers between the
This long-only strategy generates buy signals when price trades above both the 50-period and 200-period Simple Moving Averages while a smoothed RSI indicator crosses above a specified threshold. It exits positions when price drops below the 50-period SMA and t
This indicator plots a multi-cell price and time grid directly on the price chart, complete with internal divisions and diagonal lines. It provides independently draggable boundary handles for top, bottom, left, and right coordinates, alongside an optional mov
Sequential Countdown is an overlay indicator that writes a 9-13 sequential count on the price chart. It plots buy setup numbers below bars and sell numbers above them, marking a perfected nine differently from an unperfected nine, then draws countdown numbers
SMC Zones is an overlay indicator that identifies Smart Money Concepts structure on the price chart using closed-bar logic. It calculates and plots order blocks, fair value gaps, BOS and CHoCH break lines, and optional liquidity sweeps. Users can adjust swing
This strategy plots the previous trading day's high and low on the price chart and enters on the first close beyond either level, once per side per day, between 01:00 and 20:00 server time. A long starts above the high and a short below the low. The stop sits
This indicator calculates position sizing and risk parameters directly on the price chart. Users set entry, stop loss, and take profit levels interactively or via inputs, and the script computes broker lot sizes based on specified account balance and risk pref
This indicator calculates an ATR-based trailing volatility channel around the midpoint price to determine market trend direction. It generates confirmed buy and sell signals when the trend flips, filtered by an optional exponential moving average macro baselin
DEPV2 is a multi-symbol indicator for cryptocurrency trading. It aggregates signals from trend, momentum, volatility, and volume methods across 20 crypto pairs. Users select confirmation modes including simultaneous, sequential, or automatic per symbol. The in
This strategy identifies an Opening Price Range during a specified time window and trades breakouts above or below the established range during the New York trading session. Entries can be filtered using optional RSI extremes and EMA trend direction, restricte
This indicator identifies potential bullish breakout opportunities by detecting volatility expansions in the direction of an established trend. It calculates the Average True Range (ATR) and determines if volatility is expanding by comparing ATR to its moving
Calculates an Average True Range (ATR) trailing stop that trails price by a configurable distance multiplier. It draws the trailing stop line on the price chart and marks flip points when price crosses the line. The indicator allows confirmation of flips on ba
This strategy executes opening range breakout trades during regular trading hours. It calculates a 15-minute opening range high and low alongside a 20-period EMA and a 14-period ATR. Long entries trigger when price crosses above the opening range high while hi
This indicator marks key reversal candles that print a new high or low versus the prior lookback window. A bullish signal needs a lower low, a close above the previous close, and a bullish candle; a bearish signal is the opposite. Double reversals also compare
This strategy demonstrates a decoupled architecture where external Python optimization feeds parameters into Pine Script through a formatted configuration payload. The script parses the payload to set the SMA length, ATR length, take profit percentage, and ATR
This strategy builds an opening-range high and low during a user-defined session, then waits until that session ends. A close above the range enters long and a close below it enters short. The long exit uses the range low as the stop and a limit one range-widt
Calculates and plots the average price of all bars currently visible on the chart window. It collects price source values between the leftmost and rightmost visible bars and displays a single horizontal line representing the arithmetic mean. The plotted level
The Aroon Oscillator calculates the difference between the Aroon Up and Aroon Down indicators to measure trend strength and direction over a user-defined lookback length. Drawn in a separate pane below the price chart, it plots a single line oscillating betwee
This overlay strategy combines a fast and slow EMA, MACD, and RSI smoothed by an EMA. It opens a long when any one of those three crosses bullish while the other two stay aligned upward, and it opens a short on the matching bearish combination. Trades are limi
The indicator detects the three largest rises and three largest declines in a symbol's price over the last N years. It tracks price movements by identifying when price exceeds a percentage threshold T in the opposite direction from the current leg, then record
Unsupported Request is a minimal Pine Script indicator that calls the request.economic function to retrieve economic data, specifically fetching United States gross domestic product metrics. It then plots the resulting data series directly in a separate indica
Smart Money Concepts Engine automatically identifies and plots key SMC price levels directly on the main price chart. It detects swing and internal market structure events such as breaks of structure and changes of character. The script highlights bullish and
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.