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 measures directional movement bias by calculating the difference between the positive and negative directional indicators (+DI and -DI). It plots the resulting spread as a histogram in an off-chart pane around a white zero baseline. Positive val
SuperTrend is a trend-following indicator that detects trend direction by computing ATR-based stop levels. It plots long and short stop lines on the price chart and fills the region between the mid-price and the active stop line to show the current trend state
This indicator draws liquidity void lines on the price chart to highlight potential market structure breaks and liquidity pools in ICT SMC trading. It calculates voids using high/low levels or OTE values and filters them with ATR periods or fixed percentage th
The RSI + EMA strategy combines Relative Strength Index momentum with dual moving average trend filtering to identify trade entries and exits. It plots two configurable moving averages (SMA or EMA) on the main price chart. A long trade opens when the fast movi
This overlay indicator draws a fixed-range volume profile on the price chart, splitting traded activity into up and down volume at each price level. It also plots a sentiment profile, a developing point of control, and value-area high and low around a configur
AAPL-tracker visually plots historical buy and sell transactions made by ARK Invest funds on Apple Inc. (AAPL) stock charts. It hardcodes transaction dates and places overlay labels above or below price bars indicating whether ARK funds bought or sold the stoc
ColorScheme is a Pine Script v5 library that stores named colors in paired string and color arrays. It creates an empty registry, checks that the key and color arrays stay the same length, and adds, reads, or renames entries by unique keys. Duplicate or missin
Donald SPX - Options Trading is an overlay indicator designed for intraday SPX analysis. It plots a 200-period Weighted Moving Average (WMA) on the price chart while evaluating multi-timeframe market structure across Daily, 15-minute, 5-minute, and 2-minute ba
This indicator modifies standard Bollinger Bands to measure directional trend force based on line alignment. It calculates a simple moving average basis along with upper and lower volatility bands. When all three lines move upward or downward simultaneously, i
This Pine Script strategy demonstrates a basic moving average crossover backtest overlay on the main price chart. It plots a 20-period simple moving average and a 60-period simple moving average. The script enters a long position of 1,000 units when the faster
The Chained Linear Regression Reversal Strategy plots linear regression channels with upper and lower standard deviation bands directly on the price chart across a user-defined time window. When price breaks out of the static channel for a confirmed number of
This indicator calculates Kaufman's Adaptive Moving Average (KAMA) on a chosen price source and determines trend direction based on the slope across a configurable lookback window. Signals can be filtered by short-term volatility expansion using ATR comparison
This strategy overlays three exponential moving averages on the price chart, with periods of 9, 50, and 200. It calculates a MACD histogram from a 1-minute timeframe, applies Bollinger Bands to the histogram, and tracks two RSI oscillators of different lengths
This indicator calculates volatility envelope bands around a moving average center line on the price chart. It computes the middle line using a rolling moving average of the input source, while band width is derived from an Average True Range calculated via RM
This indicator plots a session VWAP of the typical price on the price chart. It marks an up triangle under a bar when close crosses above VWAP and a down triangle above a bar when close crosses below it. A star pinned at the top of the pane marks bars whose vo
Calculates pivot high and low levels based on a user-defined leg length and plots them directly on the price chart. When a new pivot level is confirmed, the script updates its stored level variable and briefly hides the plot to create a clear break in the draw
This Pine Script v6 library calculates trade position sizes and provides risk management functions for external scripts. It computes position sizes from account equity, percentage risk, and stop-loss distance, and offers dynamic sizing adjustments based on vol
This indicator detects Smart Money Concepts market structure elements directly on the price chart. It tracks real-time and historical internal and swing market structure, identifying Break of Structure and Change of Character events. The script also highlights
This indicator calculates the Relative Strength Index of the closing price using a fixed length of 14. It plots the RSI line in a separate pane and draws dashed horizontal levels at 70 and 30 to mark overbought and oversold zones. There are no user inputs, so
This indicator analyzes price action using Smart Money Concepts (SMC) to detect market structure breaks (BOS) and changes of character (CHoCH) based on customizable fractal lengths. It identifies bullish and bearish Fair Value Gaps (FVG) along with Consequent
The Chande Forecast Oscillator measures the percentage difference between the actual price and its linear regression forecast. It calculates an incremental linear regression slope and intercept over a specified period to estimate expected price levels. The ind
Pivot Order Blocks - Lines identifies bullish and bearish order block levels using pivot high and pivot low detection on the price chart. Users can base calculations on candle wicks or bodies and customize left and right lookback lengths for pivot points. The
Super SuperTrend calculates three SuperTrend values with separate lengths and multipliers and overlays them on the price chart. Each line can be drawn as maroon resistance or green support according to its direction, but those plots are hidden by default. It c
This strategy identifies breakout entries on low-timeframe cryptocurrency charts by combining rolling pivot support and resistance levels with a smoothed trend filter and a 3-period exponential moving average. Long and short entries trigger when price momentum
ATR Matrix calculates Average True Range and a 50-period Simple Moving Average to display multi-tier volatility levels and risk-reward metrics. It project stop levels using negative ATR multiples from an entry price, alongside target levels from 0x to 11x ATR
This indicator calculates the Average Directional Index (ADX) to measure market trend strength. It computes directional movement and true range smoothed by a Wilder's moving average (RMA) over configurable lengths. The resulting ADX value plots as a single red
This indicator plots intraday reference levels, projection targets, and opening range boundaries tailored for continuous electronic trading session instruments such as gold. It calculates Average Bar Range targets in bullish and bearish multiples, previous day
MathX is a Pine Script v6 library that exports a z-score function. It measures how far a source series sits from its simple moving average, divided by the standard deviation over the same length. A private mean helper wraps the built-in simple moving average a
This indicator plots Ichimoku-style conversion and base lines as Donchian midpoints on the price chart, then surrounds each line with upper and lower bands derived from the standard deviation of that line. The conversion and base lengths set the lookback for e
This indicator calculates smoothed Chaikin Money Flow across multiple lookback periods and visualizes them as a multi-row heatmap in a separate pane. Each horizontal band represents a different lookback length, with colors transitioning from red for negative m
This strategy calculates the Relative Strength Index (RSI) alongside Bollinger Bands to identify oversold bounce opportunities on fast timeframes. Drawn in a separate pane, it plots the RSI oscillator with customizable overbought and oversold thresholds. A lon
This strategy implements the classic Turtle System 1 fast breakout model on the price chart. It calculates 20-bar Donchian channel highs and lows for trade entries and 10-bar bands for exits, utilizing ATR for position sizing and trailing stops. The strategy e
Trend Compass Daily is a chart overlay indicator designed to evaluate market trend structure, momentum, and volatility. It calculates a multi-EMA ribbon with an anchor level, higher-timeframe reference lines, RSI and MACD divergences, OBV volume context, and A
Divergenced C002 is a trading strategy that identifies entry points using price divergences against the Squeeze Momentum Indicator. It compares price moves across Squeeze Momentum color changes to trigger long or short positions. Exits are generated by Curie c
WE-Indicator is an overlay study that plots Tom DeMark buy and sell counts, optional counts from 1 to 8, and TD trend lines on the price chart. It also draws logarithmic growth curves and projection curves whose intercepts and slopes are user inputs. A vertica
TPCharts Figures draws horizontal grid lines and round number key levels directly on the price chart relative to the current price. It calculates auto-detected interval steps for Forex and Bitcoin symbols or accepts a custom interval value. The script projects
CCI Advanced is a versatile momentum oscillator displayed in a separate pane. It calculates a smoothed Commodity Channel Index (CCI) paired with a signal line, offering multiple smoothing algorithms like EMA, SuperSmoother, KAMA, and JMA. Traders can select be
This strategy scaffold calculates a standard Volume Weighted Average Price (VWAP) alongside upper and lower volatility bands set 1.5 ATRs away. It generates long entry signals when a confirmed bar closes below the lower band and short entry signals when a conf
Peak Trading Activity Graphs displays historical market activity across cyclical timeframes directly on the main chart using an on-screen dashboard table. It evaluates volume or volatility across selected periods, including hours of the day, days of the week,
This strategy calculates the Relative Strength Index (RSI) and identifies bullish and bearish divergences using RSI and price pivot points. It plots the RSI oscillator, overbought and oversold threshold lines, and divergence markers in a separate pane. A long
This indicator builds a currency-strength view in a separate pane from major FX pairs and gold crosses. It requests current-period and prior daily closes for EUR, USD, JPY, CHF, GBP, AUD, CAD, NZD and XAU symbols through a selected broker prefix. The pair-set
This indicator plots a customized Moving Average Convergence Divergence oscillator in a separate pane. It calculates MACD, signal line, and histogram values from exponential moving averages, alongside a secondary Hull Moving Average calculation. The script plo
Static Lines calculates and draws key daily price levels directly on the main price chart. It plots horizontal lines for the previous daily open, high, low, and close, as well as the current daily open. Traders can customize individual line colors, toggle spec
This indicator calculates a price efficiency ratio by dividing the net close change over a lookback by the sum of absolute bar-to-bar moves, then scales the result from 0 to 100. An optional volume weight and a simple moving average can smooth or reweight the
This strategy identifies momentum breakouts by detecting sudden volume spikes relative to a simple moving average alongside rapid bar price gains. It plots signal triangles and volume spike markers directly on the price chart. When volume and bar return exceed
The script displays a table on the price chart showing current trading volume, optionally multiplied by close price and converted to T/B/M/K units based on magnitude. It computes median and standard deviation of volume over the last 500 bars by default, displa
This indicator calculates the Relative Strength Index, the Money Flow Index, and a smoothed moving average of the RSI line. It plots these oscillators in a separate pane alongside upper and lower threshold bands. The script identifies momentum shifts by detect
This strategy combines the Moving Average Convergence Divergence oscillator with an Exponential Moving Average trend filter. It enters long positions when the MACD histogram crosses above zero while price stays above the long-term EMA filter. Long trades close
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.