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 calculates a simple moving average (SMA) alongside a zero-centered symmetrized price series and its moving average. It uses Average True Range (ATR) to create a dynamic price offset, plotting a stepline translated moving average along with an up
NFLX-tracker plots historical ARK Invest buy and sell labels on the Netflix price chart. Green labels mark purchases below bars and red labels mark sales above bars, with a multiplier showing how many ARK ETFs traded the stock on the same day. An ETF input swi
This strategy plots an ATR trailing stop on the price chart. It builds the stop from the highest value of high minus a multiple of ATR over a lookback window, and colors bars green, red, or black relative to that line. It enters long when close crosses above t
This indicator calculates the median absolute error between an actual series and a predicted series over a rolling window. On each bar it takes the absolute difference of the two sources, then applies a median of that length. It plots the result as a line in a
This script calculates a 14-period Relative Strength Index (RSI) based on closing prices and plots the oscillator in a separate indicator pane. It tracks when the RSI crosses above the 50 level to detect a potential bullish shift. The indicator configures a bu
This strategy builds an opening range during a user-defined morning session and trades breakouts of that range during a later trade window. It enters long above the range high and short below the range low, then manages exits with two range-size extensions, a
This indicator calculates an RSI and holds a directional bias until the oscillator crosses the opposite threshold. A regular RSI uses the selected source and length, while the future-smoothed option uses a projected Heikin Ashi open. Bias turns long above the
The PineForge Loopback Method For is a strategy that calculates an average vote by comparing current close to historical closes across user-defined horizons. It enters a long position when the average vote crosses above a minimum threshold and price exceeds th
The Tagnet Circles indicator plots geometric time-price circle projections directly on the price chart. Users interactively select two time anchor points to establish a high-low price and time window. The script draws a central main circle with dashed upper an
This indicator visualizes historical ARK Invest transactions for NICE directly on the price chart. It places text labels at specific historical timestamps indicating ARK buying or selling activity, along with the count of participating funds. The input setting
This strategy combines ATR, Ease of Movement, and the Vortex indicator on the price chart. It enters long when ATR is above its EMA, Ease of Movement is positive, and the average of the Vortex lines is above one. It closes that long when ATR is below its EMA,
The Median Absolute Percentage Error (MdAPE) indicator calculates and plots the rolling median of percentage forecast errors between an actual price series and a predicted series over a user-defined window. For each bar, it computes the absolute percentage err
Demonstrates array creation and string joining functions in Pine Script v4. It creates string, float, and integer arrays with initial values, pushes additional elements, and converts array contents into formatted, delimited text strings using array.join(). The
This strategy executes opening range breakout trades on the price chart during New York market hours. It tracks the high and low of a customizable opening session and enters long or short positions when price breaks above or below the range. Position sizing de
This indicator analyzes and visualizes the statistical price impact following specific Relative Strength Index (RSI) trigger conditions. When the RSI crosses over or under a defined threshold level, the script measures post-trigger price movements across a spe
The strategy calculates a volume-weighted moving average of close prices as the volume-weighted center and a price-volume trend smoothed by EMA as the signal line. It plots the VWMA and PVT distance on the price chart. The strategy enters long positions when p
This Pine Script indicator plots tangent circles and mirrored price candles on the price chart using two user-defined time-price points. It calculates mirrored prices over the two points and weights the circles by the absolute candle bodies at those times. The
NIO-tracker is an overlay indicator that marks historical ARK Invest purchases and sales of NIO on the price chart. It places green labels below bars for buys and red labels above bars for sells, using fixed calendar dates rather than live calculations. An ETF
This strategy plots daily ATR bands, an optional midline, and an exponential moving average directly on the price chart. It executes long trades when price breaks above the upper ATR band and opens short positions when price falls below the lower band, with an
This indicator calculates the median price of each bar as the average of the high and the low, matching the TA-Lib MEDPRICE definition and the built-in HL2 source. It plots that single series on the price chart as an orange line of width two. There are no user
This indicator demonstrates different syntax methods for setting color transparency in Pine Script v4. It calculates and plots five simple moving averages with lengths of 10, 30, 50, 70, and 90 periods directly on the main price chart. Each moving average line
Parabolic SAR is a price-chart strategy that reads Commodity Channel Index and Parabolic SAR values from four user-selected timeframes. It opens a long when every timeframe’s CCI is above the entry level and price is below every SAR, and it closes that long wh
RSI Past is an indicator that plots the bar difference between the last overbought and oversold readings of a custom RSI. It calculates the distance in bars from the most recent time the RSI crossed above the overbought threshold to the last time it dropped be
This strategy calculates an ALMA smoothed version of the close price and the correlation between close and volume. It enters long trades when price crosses above ALMA and correlation exceeds the minimum threshold. It exits on price crossing below ALMA, correla
Time Analyzer {Morindok} calculates pivot highs and lows over a user-defined length to establish structural market baselines. It supports either an alternating ZigZag mode or independent high and low swing tracking. Based on these anchor points, the script con
NIU Tracker overlays historical ARK Invest buy and sell transactions for Niu Technologies directly on the price chart. It plots markers indicating share volume changes and the number of participating ARK funds on specific trading dates. Traders can filter tran
Atrend by OTS combines MACD histogram crossovers, RSI threshold crosses, and an ATR-based trailing trend indicator on the main price chart. The strategy triggers long entries when the MACD signal delta crosses above zero or when RSI crosses above the oversold
This indicator plots the rolling midpoint of the close as an overlay on the price chart. For each bar it takes the highest and lowest close over a user-set period and draws their average, matching the TA-Lib midpoint definition of the center of that range. The
This script plots the bar high, median price, and low in a separate pane using varying levels of transparency and line widths. It demonstrates the use of the color.new function in Pine Script to create visual depth and glow styling across price points. The scr
This strategy overlays a smoothed moving average on price and combines it with Aroon, Chaikin Money Flow and a Chaikin oscillator to define long and short conditions. Relative Vigor Index and Parabolic SAR values are calculated for exits. Entries can be limite
This indicator highlights high volume and open interest (OI) extremities directly on the price chart. It identifies potential support and resistance zones, naked levels, and liquidation ranges using visual dots, lines, and boxes. An optional on-screen table di
This strategy is a request.security parity probe. On a 15-minute chart it reads the 60-minute close with lookahead off and opens one long when that higher-timeframe close changes from the prior bar. It closes the position on the following bar and forces a flat
Time Machine is an indicator that plots symmetric candles mirrored across a user-selected price level within a time range set by Point 1 and Point 2. It draws a horizontal yellow line at the selected level extending from t1 to t2 on the price chart. The script
This indicator visualizes historical ARK Invest trade activity for Nano Dimension (NNDM) directly on the price chart. It plots green buy labels below bars and red sell labels above bars using hardcoded timestamped trade records, showing transaction counts or f
This strategy detects a pivot range using a user-defined length to calculate multiple Fibonacci retracement levels. It enters long market orders when price touches a selected retracement level. Take profit is set as a percentage of entry price, and DCA activat
The Midpoint Price over Period indicator calculates the center of the highest high and lowest low price range over a user-defined lookback period. It averages the maximum high and minimum low values across the chosen window, providing a TA-Lib compatible basel
This indicator plots a vertical line on the price chart at the most recent bar. It checks whether the current bar is the latest bar on the chart and renders a tall histogram bar using an extreme numeric value to span the chart height. Because the indicator use
Period VWAP calculates a rolling volume-weighted average price over a chosen number of bars. It multiplies the typical price by volume, sums both that product and volume across the period, and divides them to plot one line on the price chart. The period input
This strategy draws two moving averages on the price chart and uses their bias to open long or short trades. It places the stop beyond a swing high or low using an ATR risk multiple, then sets a limit exit from the reward-to-risk ratio. An optional ATR trail c
This strategy plots a fast and a slow exponential moving average on the price chart. It enters long and closes any short when the fast average crosses above the slow average, and enters short and closes any long when the fast average crosses below the slow ave
Time Machine plots horizontal lines on the price chart at user-defined start and end price levels. It supports two calculation bases: SMA for average price or HH/LL for high-low ranges. The time range is set by start and end timestamps, with options to auto-de
This indicator plots historical ARK Invest transaction records directly on the price chart for NRIX. It displays green Buy labels below bars and red Sell labels above bars based on hardcoded transaction dates and ETF execution counts. The primary input setting
An automated trend-following investment strategy designed for Bitcoin. It compares two customizable trend lines (such as TEMA, LSMA, EMA, or SMA) to detect crossovers and filters entries using an ATR-based trailing stop channel. Positions are exited when the p
This overlay indicator plots a channel of the highest high and the lowest low over a rolling lookback. It updates both extremes with a monotonic deque so each bar is handled in amortized constant time, then draws the upper and lower lines on the price chart an
Visible OHLC is a Pine Script version 4 indicator drawn on the price chart. It stores the close series and plots that value only. There are no inputs, conditions, or extra calculations. Open, high, and low are not plotted, even though the title mentions OHLC.
Pivot Trendlines marks confirmed pivot highs and pivot lows on the price chart and tracks small pivot highs and lows from consecutive red or green candles. It plots the count of green bars since the last pivot low and red bars since the last pivot high, and it
This indicator plots a 3D sine wave in a separate pane. It calculates wave values using bar index, wave height and duration inputs. Lines form a wave shape with top, bottom, left and right fills based on coloring style. Regular or irregular shape option change
This strategy overlays a fast and a slow exponential moving average on the price chart and treats their crossovers as entries. It opens a long position when the fast average crosses above the slow average and, when shorts are allowed, opens a short on the oppo
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.