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 indicator serves as a basic test to verify that the TradingView Pine Script v6 runtime compiles properly. It plots the closing price directly on the main price chart as a simple line overlay. The script contains no user-configurable inputs, generates no t
This overlay indicator requests footprint volume rows for the current bar and reads the point of control, value-area high, and value-area low. It draws a purple box over the point-of-control price range when the mode is point of control or both, and on the las
This indicator plots four smoothed moving averages of lengths 21, 50, 100 and 200 on the price chart. It fills the area between a two-period EMA and the 200-period SMMA to highlight trend direction. It marks bullish and bearish 3-line strike patterns with arro
This price-chart strategy builds a prior-day floor pivot from yesterday’s high, low, and close, plus the related resistance and support levels. It looks for a break above that pivot when the prior close was within a set percentage below it, and can require pri
This indicator maps Smart Money Concepts (SMC) elements directly onto the price chart. It identifies swing highs and swing lows to track market structure (HH, HL, LH, LL), Break of Structure (BoS), and Change of Character (CHoCH) using either pivot or session
This indicator assists intraday breakout execution on KLSE stocks. It plots VWAP, EMA 9, EMA 21 on the price chart along with an opening range from the first 30 minutes of the session and a buy zone band above the daily pivot price. Settings control the pivot
This strategy executes long trades based on directional candle signals fetched from a custom secondary timeframe. It evaluates bullish or bearish candle alignment on the requested timeframe and enters a long position when the state turns bullish. Position sizi
This indicator toolkit analyzes cryptocurrency price action on TradingView charts. It computes and plots Volume Profile with user-adjustable lookback bars, row count, and value area percentage; VWAP lines anchored to daily/weekly/monthly sessions plus optional
This strategy calculates the 30-minute opening range between 08:30 and 09:00 AM New York time for XAUUSD. It triggers long entries when the price crosses above the opening range high during the New York session, provided the bar closes above the 200-period EMA
This indicator scans the price chart for three-bar candlestick formations representing Piercing Line and Dark Cloud Cover patterns. When a pattern completes, it plots letter labels above or below the relevant three candles on the main chart to highlight the fo
This Bitcoin trading strategy analyzes golden cycle phases using halving dates and custom lengths for pre- and post-halving rises and drops. It plots a rainbow ribbon, supply and demand zones, Ichimoku cloud, geometric mean indicator, and ZigZag lines on the p
ORB - Opening Range Breakout calculates the highest high and lowest low during a configurable opening session and trades breakouts during the subsequent trading session. When the closing price crosses above the opening range high, it enters a long position; cr
The RSI Indicator plots the Relative Strength Index on a separate pane to measure momentum. It calculates RSI with a user-defined length (default 14) and displays horizontal lines for oversold (default 40), overbought (default 60), and middle (50) levels. Back
This strategy simulates high-frequency micro-trend reversals using ultra-short moving averages and oscillator extremes. It enters long when a fast EMA crosses above a slow EMA while a 2-period RSI is oversold, and enters short on a bearish EMA cross while the
Volume Profile Advanced calculates session-based volume distribution across customizable lookback periods on the main price chart. It determines key market profile metrics, including the Point of Control (POC), Value Area High (VAH), Value Area Low (VAL), and
This indicator detects divergences between the RSI oscillator and price action. It calculates the RSI value using a user-defined length and identifies pivot highs and lows on both the price series and the RSI itself. The script plots bull divergences as potent
The Fibonacci Confluence Toolkit overlays automated Fibonacci retracement levels, market structure breaks, and candlestick patterns directly onto the price chart. It identifies bullish and bearish Change of Character (CHoCH) structures, highlights key areas of
Calculates and plots a multi-oscillator panel inspired by Market Cipher B, combining a WaveTrend oscillator, fast WaveTrend line, Money Flow Index (MFI) area, and RSI. It automatically identifies regular and hidden bullish and bearish divergences, plotting sig
The indicator plots a stack of five exponential moving averages with lengths 5, 8, 13, 21 and 34 on the price chart. It derives and draws support and resistance lines from the EMA stack, with options for up to 10 lines each, custom colors, widths and visibilit
This strategy records the high and low during a configurable opening session, defaulting to 09:30–10:00 exchange time, then locks the range when the session ends. It enters long when price closes above the range high and short when price closes below the range
Kurutoga Screener Timing Fix calculates price divergence from highest-high and lowest-low midpoints across three lookback horizons. By assessing divergence consistency across base, double, and quadruple lengths, it identifies synchronized momentum conditions.
This overlay indicator simulates a date-bounded Bitcoin dollar-cost average and separate long and short value-averaging books. Inside the start and end dates it adds a fixed USDT amount each bar, converts it at the close into BTC, and updates average price and
This strategy overlays the price chart to determine macro market direction by aggregating signals from an ensemble of up to 26 trend, momentum, and moving-average indicators. It incorporates an Augmented Dickey-Fuller (ADF) market regime filter to detect rangi
This indicator calculates and visualizes statistical volume thresholds across dynamic, time-based lookback windows. It converts multi-hour and multi-day periods into bar counts based on the active timeframe to compute rolling volume medians, simple moving aver
This strategy combines a TD Sequential close comparison, RSI with a moving-average Bollinger envelope, MACD, and the Stochastic Momentum Index. It allows long, short, or both directions and sizes orders from a percentage of equity. Inputs set RSI and MACD leng
This indicator identifies support and resistance turning points on the price chart using higher-order momentum analysis. It calculates a double-smoothed exponential moving average, derives its first momentum, and detects zero-crossings of its second momentum t
This educational script calculates and plots 50-bar highest high and lowest low levels directly on the price chart. It highlights breakout conditions by coloring the chart background green when the closing price exceeds the previous 50-bar high, and red when t
This indicator compares the current chart with a user-selected reference market in a separate pane. It converts both series into percentage changes, stores them in rolling arrays of a chosen lookback, and plots covariance as a filled area and the correlation c
This indicator plots the Relative Strength Index (RSI) on the price chart with customizable overbought and oversold bands at 70 and 30. It detects divergences between price highs and lows versus RSI pivots using lookback periods and tolerance settings. The mai
Bband Pinch & Expand calculates Bollinger Bands width and compares it against its simple moving average to detect periods of volatility expansion and contraction. The script plots a histogram of the difference between the current band width and its moving aver
This strategy combines standard Moving Average Convergence Divergence (MACD) crossovers with Volume Weighted Average Price (VWAP) level interactions. It enters long positions when the MACD line sits above its signal line and short positions when below. Positio
This indicator combines the Average Directional Index (ADX) for trend strength, Money Flow Index (MFI) for volume flow analysis, and Relative Strength Index (RSI) for momentum signals. The ADX is plotted as colored columns with background coloring indicating u
This indicator plots the Parabolic SAR on the price chart using TradingView's built-in SAR function. Direction is long when the SAR sits below the close and short when it sits above. Circles mark the SAR and are colored by that direction. Optional buy and sell
This indicator detects equal highs and lows by comparing prices within user-defined left and right bars using a tolerance percentage. It plots horizontal lines on the price chart for equal highs in one color and lows in another. A screener allows input of mult
This indicator calculates the Supertrend direction across multiple selected symbols on the active timeframe using custom ATR length and multiplier settings. When the trend switches between bullish and bearish for any enabled asset, the script triggers formatte
This indicator plots three moving averages on the price chart using lengths of 8, 21 and 50 by default. It colors the first average blue, the second maroon and the third red. A translucent fill between the first and second averages turns lime when the first is
The 6060-tracker draws historical ARK Invest purchase marks for this stock on the price chart. With the ETF input set to ALL, it places green below-bar labels reading Buy X1 on many fixed calendar dates from June through late November 2020. The only setting sw
ArrayStatistics is a Pine Script v5 library of exported functions that compute descriptive statistics on numeric arrays. It returns root mean square, Pearson first and second skewness coefficients, the Pearson correlation between two samples, and kurtosis from
This strategy overlays the price chart and builds Ichimoku-style Tenkan, Kijun, Chikou, and Senkou values from a ten-bar average of opens. It plots pivot highs and lows as resistance and support circles and reconstructs Heikin-Ashi-like prices from recent open
The STRG One Bar Pursuit strategy identifies single-bar momentum reversals by monitoring shifts between bullish and bearish candlesticks starting from the year 2024. It enters a long position when a bullish candle follows a bearish candle and enters a short po
This indicator plots a visual reference directly on the main price chart. It checks whether the current bar is the last bar on the chart and displays text below the candle with a twenty-bar negative offset. Designed as an educational draft for moving average d
This overlay indicator draws a one-bar-wide box a chosen number of bars ahead of the current bar. The box is centered on the selected price—current close, high, low, or HL2—and extends one ATR above and below that level. It deletes the previous box and creates
This strategy implements a single-layer perceptron machine learning model built from scratch to generate trading signals directly on the price chart. It calculates predictions based on sample size, threshold settings, and optional volatility or volume filters.
This strategy simulates a dollar-cost averaging (DCA) trading bot that enters positions when a short moving average crosses over or under a long moving average. It manages trades by placing scaled safety orders as price drops, lowering the average position ent
The ABC and Parabolic SAR Strategy calculates ABC chart patterns using a ZigZag structure alongside Fibonacci retracement levels and a trend cloud formed by six moving averages. It visualizes trend direction and pattern signals directly on the main price chart
The AMFM indicator decomposes price movements into amplitude and frequency components using Ehlers' digital signal processing methods. It whitens the derivative as close minus open, then computes AM as the smoothed envelope of the absolute difference over 4 pe
This indicator classifies the market into gamma regime types (negative gamma trend, positive gamma mean-reversion, or transition) by calculating a composite score based on daily ATR ratios, session VWAP crossover frequencies, and opening range displacement. It
This indicator calculates the Commodity Channel Index from a user-selected source and length, then plots that oscillator in a separate pane. It colors the CCI line with a gradient that shifts from the bear color toward the bull color as the value moves from ne
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.