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.
Plots higher-timeframe candlestick overlays and pivot points directly on the price chart. It draws HTF candle bodies and wicks using boxes and lines across custom or auto-selected higher timeframes. The indicator can also compute and display traditional pivot
This indicator plots a custom ZigZag line connecting extreme high and low points on the price chart whenever price reverses by more than a specified percentage. It uses arrays to track these points based on close prices and a chosen lookback length. The script
This strategy calculates support and resistance lines by identifying pivot highs and pivot lows over configurable left and right lookback periods. It computes linear slope and intercept values to project dynamic trend lines on the main price chart. Optional ta
This indicator identifies market structure by tracking confirmed swing highs and lows using pivot points. It detects breaks of structure (BOS) and changes of character (CHoCH) when the bar close breaches the most recent unbroken swing level. Visual outputs on
This indicator plots HTF SMC confluence signals in a separate pane. It visualizes ATR regime states from compression through expansion and exhaustion using custom colors. Squeeze markers indicate on or released states while reversal context displays scores for
This strategy detects momentum turns by subtracting consecutive values of an input source. It defines src as a user-configurable source defaulting to hl2, the average of high and low prices. Momentum is calculated as the current src minus src one bar ago, and
P Syn Switch is an indicator that selects price values based on the mode input using a switch function. For mode 'a' it calculates and plots close, for 'b' it uses open, and for 'c' it calculates hl2. It also plots v2 to indicate candle direction as 1 for bull
DEPV2 C1c DEVISSO KOLAYLIK calculates a Devisso ratio and ease score for five selectable symbols using daily higher-timeframe data. It computes each symbol's historical ratio percentile over a configurable lookback window alongside a cross-sectional percentile
This overlay indicator reflects each candle across two user-selected price levels and plots those mirrored candles in purple and blue on the price chart. It scans highs and lows over a configurable period to mark up and down fractals, keeping only the last two
This trading strategy generates scalping entries by combining exponential moving averages with momentum and trend filters. It triggers long or short trades when the short EMA crosses the long EMA, provided RSI, MACD, ADX trend strength, and Stochastic levels c
The TeleNexus Sovereign MA Relationship V6 is a Pine Script v6 strategy that evaluates price relationship to a selected moving-average family through six scored dimensions: trend quality, respect, extension, compression, acceleration, and exhaustion. These dim
This overlay indicator calculates intraday standard deviation sigma bands using live implied volatility from VIX or a manual percentage input. Designed for index options credit spread placement, it projects 1s, 2s, and 3s expected move boundaries anchored to e
This indicator computes relative strength by subtracting KLCI index returns from stock returns over a user-defined lookback period. It plots the resulting RS percentage in a separate pane using green for positive values and red for negative values. The default
Corpus Array Basic State is a strategy designed to demonstrate state tracking using Pine Script arrays. It calculates a 20-period exponential moving average (EMA) and populates an array with closing prices during the initial bars. The strategy enters a long po
Hammers and Stochastic Strategy overlays signals on the price chart by combining candlestick pattern detection with the Stochastic oscillator. It identifies standard hammer and inverted hammer candles and validates them with Stochastic oversold and overbought
This overlay indicator draws a volume-weighted trend line and ATR bands on the price chart. It marks a bullish or bearish state when close moves outside those bands and keeps the previous state while price stays between them. Users can show a filled cloud or o
This strategy calculates ATR-based Chandelier Exit bands anchored to highest and lowest price extremes, plotting trailing stop levels directly on the price chart. It enters long or short positions when price crosses opposite bands, subject to an optional 200-p
This volume divergence indicator detects bullish and bearish divergences on the price chart. Bullish divergence occurs when price forms a lower low but volume forms a higher low, and bearish divergence when price forms a higher high but volume forms a lower hi
This indicator plots Heikin Ashi momentum signals and sigma bands on the price chart. It calculates a 4x4 Ghost Matrix by counting how many close prices lie above or below inner and outer bands derived from a 20-period SMA and standard deviation. Signals trigg
This Pine Script indicator calculates and plots support and resistance levels from a selected higher timeframe. It identifies peaks and troughs on the higher timeframe and assigns strength to each level based on a weighted combination of touches, bounces, and
This indicator calculates a 100-period Hull Moving Average (HMA) and overlays it directly on the price chart. The line color dynamically changes based on whether the closing price is above or below the average. In addition to plotting the average line, it eval
This indicator plots a background color fill on the price chart to highlight a specific time session. It checks if the current time falls within the user-defined session range and colors the background red when active. The main setting lets users customize the
Calculates and plots sequential countdown setups similar to DeMark TD Setup, tracking price flips with a configurable lookback and count limit directly on the price chart. It identifies completed counts, perfection, intersections, and multi-setup occurrences s
Efficiency Ratio measures market efficiency and trend strength over a configurable rolling window by dividing net price displacement by the sum of absolute bar-by-bar price changes. It plots the calculated ratio as an oscillator in a separate pane alongside ho
The Adaptive Laguerre Filter calculates a smoothed, dynamically adjusted trendline plotted directly on the main price chart. It dynamically adjusts its damping factor (alpha) based on recent price range variations and median percentile calculations over a spec
ICT Mitigation Block Scanner is an overlay indicator that screens a pasted list of symbols for ICT mitigation blocks or retracement conditions. It lists long and short hits in a configurable table and can draw a zig zag with colored boxes on the price chart. U
This strategy plots a Supertrend line from ATR length and factor, plus a single EMA, on the price chart. It enters long when Supertrend turns bullish or while the trend is bullish and price crosses back above the EMA below the last entry price. Short entries m
This indicator plots historical ARK Invest buy and sell labels for ACIC directly on the price chart. It places green buy labels below bars and red sell labels above bars at fixed calendar dates, and marks how many selected funds traded that day with an X count
This indicator defines a function that computes a weighted mean of sample values using a matching weight array. It returns zero when the arrays differ in length or are empty, otherwise it divides the sum of each value times its weight by the sum of the weights
This strategy is designed for 1-minute S&P 500 futures trading using multi-timeframe data and Fibonacci-weighted standard deviation bands around volume-weighted moving averages. It requests data from multiple higher timeframes without lookahead to prevent repa
STRG-Kijun is an Ichimoku-based trend-following strategy that generates trading signals when the Kijun-sen (base line) changes slope direction. It plots the standard Ichimoku cloud, baseline, lagging span, and directional signal arrows directly on the price ch
This indicator marks swing highs on the price chart. It treats a bar as a high when that bar's high equals the highest high across a window of twice the user setting plus one bar, centered on the bar offset by the setting. When the condition is true, it places
The Debug Panel Template displays an on-chart information dashboard on the price pane to assist developers in monitoring real-time market data and custom variables. It calculates and shows price changes, bar metrics like wick sizes and total range, volume stat
This study builds a Coppock curve from two rate-of-change readings smoothed by a weighted moving average and marks signals on the price chart. Long entries occur when the curve crosses above zero or a simple moving-average trigger, and short entries occur on t
This strategy combines a triple exponential moving average system with a Stochastic RSI oscillator to identify trend-following entry opportunities directly on the price chart. It plots 50, 100, and 200-period EMAs while computing smoothed Stochastic RSI values
The indicator calculates the Average Directional Movement Index (ADX) along with +DI and -DI lines to measure trend strength and direction. It plots ADX, +DI and -DI in a separate pane on the chart. The main setting is the period length for smoothing, defaulti
This script is a TradingView documentation example demonstrating how to fill background spaces between plots and horizontal lines in a separate indicator pane. It calculates and plots the sine of the high price, the cosine of the low price, and the sine of the
This indicator calculates volume moving averages, volume spikes, and price-volume momentum to detect institutional order flow. It plots in a separate pane and generates visual signals for high-volume activity and flow persistence. Key inputs adjust the volume
An overlay indicator that plots dynamic trendlines and support/resistance channels on the price chart. It detects pivot high and low points across a configurable lookback period to draw S/R zones and calculate trendline slopes using ATR, standard deviation, or
This indicator plots three simple moving averages of the closing price on the price chart. The lengths default to 9, 21, and 36 and are labeled Fast MA, Slow MA, and Slowest MA. Each length can be changed independently through the inputs. It only draws the thr
The Convolution Moving Average (CONV) indicator calculates a smoothed price series via FIR convolution with a custom kernel. It plots the CONV value as an overlay line directly on the price chart. The main input allows selecting any source series while the ker
Session Range Projections measures the high-low or open-close range of a user-defined session and projects that range on the price chart. It draws horizontal range and deviation lines, optional range boxes, range extensions, and true standard deviations at sel
This indicator builds a synthetic Heikin-Ashi series using only the current open and the opens of the previous three bars. It derives open, high, low, and close from those values, rounds each price to the symbol mintick, and plots the result as candles in a se
This indicator plots the Balance of Power of each bar in a separate pane. It calculates the ratio of the close-to-open difference to the high-to-low range and draws that value as a red line. Positive readings mean the close is above the open, and negative read
The Zen Trading Toolkit calculates and projects key volatility levels, intraday targets, and session statistics on the price chart. It features three main components: ABR-based measured moves projected from the prior day's close and extremes, an opening range
This overlay indicator marks swing highs and swing lows from a user-set pivot lookback and draws each swing as a level and a shaded area. Area size can follow the wick extremity or the full bar range. It counts bars, or accumulated volume, that trade through t
This indicator highlights major regional trading sessions directly on the price chart, including Asia, Europe, and America. Users can customize the exact start and stop times in UTC for each region, as well as the background fill colors. Additional settings al
This strategy overlays Bollinger Bands on the price chart and trades a long squeeze setup. It enters long when band width is below 0.022 and volume is at least the seven-bar average, using a stop order at the lower band. It places a short order when close cros
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.