10,850 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 utility script defines and tests a custom mathematical function that calculates the number of digits in an integer. It computes the absolute value, then repeatedly applies floor division by ten in a loop until reaching zero. The script takes an exponent s
This indicator plots two Hull moving average variants on the price chart and colors them by which line is above the other. When the Kahlman option is on, both averages pass through a simple Kahlman-style smoother controlled by the gain setting. Optional labels
Bjorgum Double Tap is a price-chart strategy that detects double-bottom and double-top patterns from pivots. It enters long or short when those patterns form, and it can flip into the opposite direction while a position is open. Targets and stops are Fibonacci
The Ehlers Elegant Oscillator is a momentum indicator that computes a bounded oscillator value between approximately -1 and +1. It processes the input series through a 2-bar momentum calculation, normalizes the derivative by rolling RMS over 50 bars, applies t
This indicator derives Point and Figure chart data for the current symbol using high/low price sources, a 14-period ATR box size, and a 3-box reversal threshold. It fetches the synthetic Point and Figure open and close prices using the security function and pl
The Price Channel indicator calculates and plots the dynamic highest high and lowest low over a user-defined lookback period, alongside a central midpoint line. Built using monotonic deques for optimized streaming runtime efficiency, it plots an upper channel
This strategy plots on the price chart and builds a MACD line as the difference between a fast and a slow exponential moving average of close, then smooths that line into a signal. The histogram is their difference. It opens a long when the histogram crosses a
This strategy combines Noro Trend Ribbon directional shifts with High and Low moving average price corridors and ADX momentum filtering. It evaluates market strength using configurable ADX key levels to filter trades during choppy or weak trend conditions. Use
This indicator plots a percentage rate of change in a separate pane. It smooths the ROC with a selectable average, draws a signal line and histogram, and colors long and short momentum around a configurable midline and stretch zones. Optional stall detection m
This indicator combines the standard Relative Strength Index (RSI) and Stochastic RSI into a single oscillator plot within a separate pane. It calculates RSI from price data and applies stochastic smoothing to derive %K and %D lines. Users can toggle individua
This TradingView indicator for XAUUSD gold analyzes market structure, order blocks, liquidity pools, and volume profiles to generate entry signals on the price chart. It includes session monitoring engines and risk management modules that can be toggled via in
This strategy calculates double-smoothed Heikin Ashi candles and plots them directly on the price chart alongside a smoothed Relative Strength Index. It evaluates market conditions against external volatility data from an inverse symbol, generating long and sh
Risk-Adjusted Momentum Oscillator plots a normalized momentum oscillator in a separate pane, dynamically scaling momentum by ongoing drawdown risk. It calculates momentum via Rate of Change, Price Momentum, or Log Returns, applying Z-score normalization and ad
Calculates and plots the Trade Volume Index (TVI) in a separate pane. It tracks price changes relative to a configurable minimum tick threshold to determine whether volume represents buying or selling pressure, accumulating or subtracting volume accordingly. U
PF MTF probe - weekly SMA(10) cross is a multi-timeframe trend-following strategy designed to test weekly moving average interactions. It calculates a 10-period Simple Moving Average on a weekly timeframe using request.security without lookahead bias. When the
This long-only strategy calculates an RSI and a long exponential moving average. It enters when RSI crosses above the oversold level while price is above the trend average and no position is open. It closes when RSI crosses the midline or a mirrored overbought
This indicator ranks the current bar’s volume against stored historical volume in a separate pane. On the last bar it shows all-history rank, a percentile, the ratio of current volume to the highest stored volume, and the date of that peak. A comparison window
Fibo Wave MA - Auto Path (Plot) is an overlay indicator that projects Fibonacci-based wave structures and moving averages onto the price chart. The script calculates a wave period from two user-selected interactive anchor points and generates a secondary movin
A trend indicator on the price chart built from several ATR trail bands whose width follows presets for scalping, balanced or deep trend use. The chosen flip band decides the trend, and retest signals are scored with a minimum score, retest window and cooldown
A tick-chart-safe volume pattern indicator that draws toggleable signals on the price chart. It adds sub-minute and sub-two-minute thresholds that adjust the high-volume lookback and displacement floor for very short chart intervals, with a ten second fallback
A swing strategy on the price chart that takes long signals when a 9 EMA crosses above a 21 EMA with RSI above 50, and shorts on the opposite cross. An optional multi-timeframe filter checks a weekly EMA trend and four-hour RSI momentum before accepting a sign
Plots a double-smoothed Bressert stochastic in a separate pane, built from %K and %D lines whose smoothing type can be chosen from a long list of moving averages such as DEMA, EMA, zero-lag variants and Hull-style averages. A second line pair with its own leng
A Pine Script v5 library that tracks compounded monthly return percentages in an array, capped at a maximum number of periods, so that ratio calculations can be built on them. It has an overload for excess returns over a benchmark. Settings include the returns
A Pine v4 strategy that plots a 33-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal
This indicator plots historical ARK Invest buy and sell activity for Salesforce (CRM) on the price chart. It places green labels below bars for buys and red labels above bars for sells, using fixed calendar dates and a count of how many ARK ETFs traded that da
This indicator calculates standardized z-scores of price data across four different lookback periods (6, 14, 26, and 100). Standardizing data subtracts the moving average from the price and divides by the standard deviation. It applies a Double Exponential Mov
This strategy plots two Hull Moving Average variations on the main price chart, optionally smoothed with an adaptive Kalman filter algorithm. It enters long positions when the faster moving average crosses above the slower moving average and enters short posit
Boftei's Strategy plots the difference between the log of the current close and the close a chosen number of bars earlier in a separate pane. It draws positive and negative histogram bars, a thin line of the same value, and dotted threshold lines. Crosses of t
Calculates John Ehlers' Even Better Sinewave indicator to isolate cyclical components in price action. It applies a high-pass filter to remove low-frequency trend components, followed by a Super Smoother filter to reduce high-frequency noise, and normalizes th
This reference indicator demonstrates how to retrieve symbol data using Pine Script v4 syntax. It calls the security function to request the closing price of BATS:AAPL on the current timeframe with gaps enabled. The resulting values are plotted in a separate p
Price Momentum Oscillator (PMO) calculates a double-smoothed Rate of Change (ROC) to track directional price momentum. It derives the percentage price change over a selected lookback period, applies an initial exponential smoothing pass, and refines it with a
This indicator detects a bearish black marubozu on the price chart. It treats a candle as a match when the close is below the open, the body is longer than a 14-period exponential average of body size, and both upper and lower shadows are at most five percent
This strategy evaluates market trend direction using a Noro TrendRibbon and creates a price corridor based on recent moving-average extremes, plotting directly on the price chart. It executes long entries when price dips below the corridor during an upward tre
This indicator plots a smoothed RSI in a separate pane with a signal line, a 50 midline, and configurable overbought and oversold bands. It colors momentum long or short, fills the oscillator against the signal and the zones, and draws a histogram. Optional ma
The RSI Adaptive Structure Engine (RASE) evaluates directional market regimes using multiple Relative Strength Index (RSI) layers. It calculates structural RSI, smoothed momentum RSI, fast execution RSI, and an efficiency ratio to measure trend quality. Higher
CRT State Engine is an institutional trading framework based on Smart Money Concepts and Candle Range Theory. It plots session ranges, order blocks, Fair Value Gaps, liquidity sweeps, and Draw on Liquidity levels directly on the main price chart. The indicator
Indicatorv5SMC / ICT / price actionSessions & time
This strategy plots smoothed Heikin Ashi candlesticks directly on the price chart. It filters entries using CCI and Stochastic crossovers calculated on a separate higher timeframe. Long signals trigger on CCI crossing above 60 and Stochastic crossing above its
Rolling Z-Score Trend [QuantAlgo] calculates a rolling Z-score using mean and standard deviation over a user-defined lookback window to evaluate statistical price deviations and momentum. Plotted in a separate indicator pane, it displays the rolling Z-score li
The Triangular Moving Average (TRIMA) indicator calculates a double-smoothed moving average that places greater weight on the middle values of the chosen lookback period. It dynamically generates a triangular weighting array to smooth price fluctuations and fi
This strategy is a multi-timeframe parity probe that plots on the price chart. It requests the 60-minute close with lookahead off and treats a change in that value as a higher-timeframe close roll. On each roll it enters one long unit. On the next bar after a
A backtesting verification strategy designed to test bracket exit order execution rules in Pine Script v6. It automatically triggers long and short entries at predetermined bar index cycles, applying tight and mixed exit brackets using absolute price stops, li
This indicator plots the standard SuperTrend line on the price chart while analyzing the efficiency and duration of trend segments. When the SuperTrend changes direction, it logs the previous segment's duration in bars and final return percentage into distinct
Fibo Wave MA - Auto Path Plot is an indicator that calculates and plots base moving averages along with Fibonacci-extended moving averages on the price chart. Users define a custom wave period by setting start and end times t1 and t2, with an adjustable center
A price-chart indicator that detects swing structure, draws dynamic support and resistance zones from stored pivots, and issues signals only when a confidence percentage, a quality score and an ADX strength minimum are met. Zone touches within a window, volume
Overlay indicator that marks candles whose volume is the highest over 100, 200 and so on up to 1000 bars, plus an all-time high volume marker and a Hot Spot signal. Each level has its own show checkbox. To avoid live-bar flicker, every comparison uses the prio
A strategy that enters on a 9 and 21 EMA crossover, optionally confirmed by RSI above 40 for longs or below 60 for shorts. Trades must agree with a 200 EMA market filter and a weekly 20 EMA taken from the previous completed week. Position size is set so the di
This Pine v5 indicator draws Future Line of Demarcation lines on the price chart: the price source is shifted forward by half a cycle for up to three cycle periods, with automatic or manual periods and bar multipliers based on the chart timeframe. Projected fo
An indicator in a separate pane that calculates Sharpe and Sortino ratios from the chart symbol's periodic returns, using up to a chosen number of monthly or other periods. The comparison can be a fixed annual rate or the returns of a benchmark symbol, in whic
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.