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.
The Probability Grid indicator calculates statistical probability distribution levels derived from historical pivot high and low points. It analyzes price movements over a configured swing length and maximum reversal count to project probability zones directly
SINEMA is a sine-weighted moving average indicator that plots on the price chart. It applies sine-wave weighted smoothing to the input source with a specified period. The period setting determines the lookback window size for the weighting function. SINEMA dra
This indicator calculates a Stochastic oscillator based on Relative Strength Index (RSI) values rather than standard price data, functioning like a custom Stoch RSI. It plots the raw RSI line alongside the derived %K and %D lines in a separate pane. The RSI pl
The strategy uses RSI(14) on closing prices to detect upward crossovers above 50 for long entries and downward crossovers below 50 for exits. A protective stop loss is placed at the midpoint between open and high on the entry bar to handle mid-bar fills via ma
This minimal test indicator evaluates integer values as booleans within conditional statements in Pine Script v6. It assigns an integer to a variable, passes it into an if-else block to determine an output value, and plots the final result in a separate pane.
This indicator requests the open, high, low and close of eight user-selected Binance perpetual symbols and plots each value in a separate pane. It is meant to run on a one-day Bitcoin perpetual chart so chart-data export can capture those extra daily series be
Calculates and plots dynamic step lines directly on the price chart based on candle range calculations within a specified time window. Users can select a custom start and end time, filter calculations by candle type (green, red, or all candles), and choose bet
A trend indicator drawn on the price chart that plots EMA 9, 21, 50 and SMA 200 with optional clouds. Buy and sell signals are filtered by RSI levels, minimum ADX, relative volume and a smart range filter that avoids small or ranging markets using ATR-scaled E
A volume pattern indicator that draws toggleable signals on the price chart, with displacement tuned to a nine standard deviation multiplier. It includes relative volume patterns such as SAAB, Kratos, Grand Slam, Hiroshima and Nagasaki, long and short setups,
This strategy detects liquidity sweeps and break of structure events using SMC concepts. It plots BOS labels, sweep markers, and matrix floor ceiling lines on the price chart. The SMC structure sensitivity setting adjusts lookback for scalping, standard, or sw
A Pine Script v5 indicator that draws bullish and bearish order block zones on the price chart with volume shown inside, and adds lower-timeframe blocks within range. Swing length, maximum ATR multiplier, zone count and invalidation method shape the main zones
A Pine Script v5 library for working with intrabar data from a lower timeframe. It chooses a lower timeframe for the chart based on a precision setting, either by how many chart bars should be covered or by the approximate number of intrabars per chart bar, be
A Pine v4 strategy that plots a 22-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 strategy combines Larry Williams' Vix Fix synthetic volatility indicator with Bollinger Bands. It calculates standard and inverted Williams Vix Fix metrics, displaying them as histogram columns with standard deviation bands in a separate pane. Long entrie
CMLF Tracker overlays historical buy and sell transaction records of ARK Invest funds directly onto the price chart for CMLF. It plots green upward labels for buy dates and red downward labels for sell dates, indicating how many ARK ETFs traded the asset on th
The script is an indicator that calculates compound interest. It provides a function f_compound_interest which takes principle, rate and duration as inputs. The function applies the compound interest formula using math.pow to return the future value. This valu
This indicator plots two Hull moving averages on the price chart, one of the selected price and one of close, and optionally smooths both with a Kahlman filter. It fills the space between them and marks buy and sell labels when they cross, provided scaled volu
This script tracks daily on-chain whale holdings across various cryptocurrencies using IntoTheBlock metric feeds. It applies Bollinger Bands to day-to-day asset changes to identify statistically significant outlier movements based on a user-selected standard d
Calculates John Ehlers' Detrended Synthetic Price by taking the difference between a quarter-cycle and a half-cycle exponential moving average of the input source. It includes initial warm-up coefficient adjustments to stabilize early values and plots the resu
Debugging from Inside Functions is an educational Pine Script demonstration script that illustrates how stateful calculations and custom functions operate. It defines a function that calculates an average combining the current bar high, low, close, and a persi
This indicator calculates the Pearson correlation coefficient between a chosen source series on the current chart and a secondary external symbol across a user-specified lookback period. It processes streaming inputs efficiently using a circular buffer to upda
This overlay indicator marks Asia, London and New York sessions using New York clock times. It draws a session candle plus an optional vertical line at the session open, horizontal open, high, mid and low lines, and a 25 percent level of the session range. Use
This indicator calculates the Know Sure Thing oscillator in a separate pane. It builds four rate-of-change series from the close, smooths each with a simple moving average, and adds them with weights of one, two, three, and four. It plots that composite as the
This strategy plots a Noro trend ribbon on the price chart and uses ribbon side changes to choose long or short bias. It builds a corridor from recent high and low prices. A long opens when price is below that corridor during a long bias, and a short opens whe
This overlay indicator scores liquidity-sweep reversals on the price chart. It looks for a swing high or low violation followed by a recovery close, then grades optional conditions such as RSI and structure into a 0–2 quality score with separate long and short
This indicator measures statistical price deviations using the mean and standard deviation of logarithmic price. Plotted in a separate pane, it identifies overvalued and undervalued market conditions relative to a calculated fair-value baseline. Standard devia
This overlay indicator tracks an institutional CRT state machine on the price chart. It can plot draw-on-liquidity lines from pivot strength, session boxes for CBDR, Asia, London, London lunch and New York, and key levels colored for consolidation, manipulatio
Indicatorv5SMC / ICT / price actionSessions & time
This indicator plots buy and sell labels on the price chart. A buy appears when a short stochastic crosses up from below 20 while a slow MACD histogram is positive and a faster MACD histogram is negative. A sell uses the opposite stochastic and MACD alignment.
Recursive Auto-Pitchfork automatically identifies high and low pivot points using a Zigzag algorithm to construct pitchfork channel levels directly on the price chart. Users can select different pitchfork variations, adjust Zigzag depth and length, toggle pivo
SuperTrend Toolkit plots ATR-based SuperTrend bands and direction on the price chart. It calculates upper and lower bands using a configurable source, length, and factor multiplier. Contrarian signals generate buy and sell labels with alerts when the trend rev
This strategy enters long positions when the Relative Strength Index drops into oversold territory on a confirmed bar. It exits when RSI rises back to a target sell level, provided an optional minimum profit percentage threshold is satisfied. At trade entry, a
A test strategy from a reference corpus that checks how intrabar fills behave with the bar magnifier on. It goes long when a 9-period EMA crosses above a 21-period EMA, places a protective stop halfway between the bar open and high, and closes the long when th
Calculates and plots the historical value of a user-defined type field in a separate indicator pane. The script instantiates a custom object storing the current closing price and references its field on the previous bar using historical indexing. Designed as a
This Pine Script indicator probes the tie-breaking behavior of array.sort_indices in Pine Script v6. It creates two arrays of size 5 and 20 using seeded hash functions based on bar_index, then sorts them in descending order. The script plots the original array
Fibo Boxes projects price and time step zones directly on the chart starting from a designated target start time. It steps through historical data using an initial bar count and step multiplier, establishing high and low bounding boxes across calculated step r
A price-chart indicator that combines two independent parts. The first is a Q-Trend line built from the midpoint of a long highest-lowest range, shifted by an ATR multiple, with buy, sell and strong signals, bar colouring and two signal modes. The second finds
Tick-chart-safe overlay indicator of single-bar detections on the price chart, titled as a non-repainting version. It covers relative volume tiers named SAAB, Kratos, Grand Slam and MOAB, regular-at-time volume tiers, momentum LONG and SHORT tiers, high-volume
TN SMC Sovereign identifies Smart Money Concepts structural changes, Order Blocks, and Fair Value Gaps on the price chart. It determines market direction by tracking swing highs and lows for Break of Structure events. Long entries occur when the structure is b
A Pine Script v5 indicator that draws bullish and bearish order block zones on the price chart with volume information inside each zone. Swing length, maximum ATR multiplier, zone count, zone combining and invalidation by close or wick control how zones form a
An indicator on the price chart that compares the direction of each chart bar with the net direction of the smaller intrabars inside it, fetched from a lower timeframe chosen by the chart timeframe. When the two disagree, the candle is coloured orange. Optiona
A Pine v4 strategy that plots a 36-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 buy and sell transactions executed by ARK Invest on CMPS directly on the price chart. It displays green upward labels below price bars for purchase dates and red downward labels above price bars for sales, showing transaction fr
This indicator defines drawing helpers that plot closed geometric outlines from line segments in a separate pane. The visible rectangle function takes two vector coordinates and draws four sides, deleting the previous lines before redrawing. Inputs toggle the
This indicator combines Hull Moving Average variations with optional Kalman filter smoothing, difference-based activity filtering, and pivot trendlines on the price chart. It calculates standard and three-pole HMAs, smooths them with a Kalman algorithm, and pl
This strategy calculates a 7-period Relative Strength Index (RSI) on external Bitfinex Bitcoin short position data to execute trades on the price chart. It enters a long position when the short-position RSI drops below a low threshold, and enters a short posit
This indicator calculates John Ehlers' Deviation-Scaled Oscillator (DSO) and plots it in a separate pane. It whitens the source price series by taking its two-bar difference, applies a two-pole Super Smoother filter, and normalizes the output using a rolling R
This indicator measures the number of bars since the highest high over a user-defined lookback period. It divides the lookback duration into five segments and applies a progressively lighter background color to the main price chart as the distance from the pea
This indicator calculates the percentage change of a chosen source over a user-set lookback length and plots that value in a separate pane with a percent format. It compares the current source with the value that many bars earlier, returning no value when the
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.