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.
Calculates normalized bandwidth readings across various volatility channel types including Bollinger Bands, Keltner Channels, and Donchian Channels. It compares bandwidth values against a secondary band baseline to evaluate relative volatility expansion or con
PF probe wunder-scalper-probe-02-alert-message-templates is a strategy that generates long and short signals using a fast EMA of 5 crossing above a slow EMA of 13 on the price chart. It places fixed-size entries of 1 share on each crossover signal and emits al
Projects two vertical guide lines forward from a pivot time the user selects, drawn on the price chart. It builds a Fibonacci number sequence between a minimum and maximum bar count, finds the next number in that progression, and places one line at 0.618 of th
ZZC Market Structure Sovereign v6 is a trend-following strategy that combines directional pivot tracking with Keltner-style volatility corridors. It calculates pivot highs and lows alongside an EMA baseline bounded by ATR corridors. A long entry is triggered w
This indicator visualizes historical buy and sell transactions executed by ARK Invest exchange-traded funds for the ticker MYNA. Plotted directly on the price chart, it renders green labels below bars for buy orders and red labels above bars for sell execution
This strategy implements a custom Parabolic SAR algorithm modified with Average True Range (ATR) to measure volatility steps. It calculates the SAR line, acceleration factors, and extreme points directly on the price chart. When a trend reversal occurs and per
The Mean Squared Error indicator calculates the mean of squared differences between a source series and its EMA, averaged via a rolling buffer acting as SMA. This error metric plots as a filled red area on a separate pane, while the EMA overlays as a yellow li
This indicator plots the closing price of each bar in a separate pane. It stores the close series in a variable and plots that series. There are no user inputs, alerts, or trading signals. Comments in the source do not affect the calculation. It does not defin
This indicator overlays a Directional Sentiment Line ribbon on the price chart using moving averages of high, low, open, and close prices. It combines higher-timeframe MACD and RSI filters with standard deviation volume heatmap thresholds to assess directional
This indicator calculates and displays a Renko brick overlay directly on the main price chart. It supports multiple brick size calculation methods, including traditional fixed values, percentage-based sizing, and ATR-derived variations (ATR, ATR/2, and ATR/4).
Calculates fast and slow Exponential Moving Averages (EMAs) to identify trend shifts on the price chart. When the fast EMA crosses above the slow EMA, any open short position is closed before opening a long trade. When the fast EMA crosses below, any open long
Mirrors price around a baseline between two user-chosen levels and times, drawn on the price chart. The baseline can be one of nine types: golden-ratio cloud, moving average, highest-high and lowest-low range, ATR bands, Bollinger Bands, Ichimoku cloud, RSI, C
This overlay indicator marks ARK Invest trade activity on the NDAQ price chart. It places red labels above bars on recorded sell dates, using fixed timestamps and a short sell note. An ETF input is present but only offers ALL, so the script does not switch bet
This strategy calculates breakout thresholds around the previous bar's close using a 14-period Average True Range multiplier. It plots dynamic upper buy lines and lower stop-loss lines directly on the price chart. Long entries trigger when price breaches the u
This indicator calculates the Mean Squared Logarithmic Error (MSLE) between a selected price source and its exponential moving average over a specified lookback period. It evaluates prediction error by computing the squared difference of natural logarithms, sm
This strategy is a TradingView documentation example named Test. For the first one hundred bars it submits a long entry of ten units when the position is flat or short, and a short entry of ten units when the position is long. It has no inputs, no stop loss, a
The ORB Hooplah indicator calculates the opening range high and low for a user-selected session such as 0930-1000 in New York time. It plots the OR band on the price chart, fills the area between high and low, and colors candles accordingly based on whether th
Risk Management Chart simulates theoretical equity curves using a Monte Carlo approach based on user-defined risk parameters. It models multiple potential account trajectories across a specified number of consecutive trades using starting equity, win probabili
A test strategy from a reference corpus that fills orders at the close of the signal bar. It goes long when a 9-period EMA crosses above a 21-period EMA while RSI is below 70, and closes the long when the EMAs cross back down. One unit is traded, with no stop
Mirrors price around a selectable baseline between two points of time and price that the user picks on the chart. This version adds two reflection ratios, a source and timeframe selection read through security calls, and a Fibo Wave baseline with a symmetry ce
This indicator overlays historical ARK Invest trade markers for NET on the price chart. It places green buy labels below bars and red sell labels above bars on fixed calendar dates, using the label text to mark the trade direction and a same-day ETF count such
This strategy calculates fast and slow average true range trailing stops directly on the price chart. It enters long positions when the fast trailing stop crosses above the slow trailing stop, and enters short positions when it crosses below. It paints price b
Calculates the rolling statistical median of a chosen price or indicator series over a specified lookback period. For each bar, the script gathers valid data points across the window into an array, sorts them, and determines the midpoint value, averaging the t
This indicator demonstrates a persistent array declared with var. It creates an empty float array once, then appends the closing price on every bar so the array grows with the chart history. On the last bar it draws a large label that reports the current array
This strategy detects Opening Range Breakouts in a specified session. It calculates the high and low of the opening range bar then plots these levels on the price chart and fills the area between them. Candles are colored based on their relation to the ORB hig
This indicator plots multiple RSI oscillators calculated from various price sources and timeframes in a separate pane. It renders the RSIs as customizable lines with different colors, widths, and styles. Colored bars highlight overbought and oversold zones bas
This strategy serves as a validation probe to test default order execution timing where orders are processed on the open of the following bar. It implements a simple long-only system using a 9-period and 21-period exponential moving average crossover filtered
The Super Mirror indicator plots spiral symmetry patterns on the price chart using user-specified start and end points along with reflection ratios. It calculates mirrored price levels and spiral growth factors for upward and downward movements based on input
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
This strategy tests deferred position flips under pyramiding. It enters long at market when a 9-period EMA crosses above a 21-period EMA and RSI stays below 70, and it queues short stop entries when RSI crosses under 50, with the stop placed a quarter of ATR b
This indicator detects Williams fractals and calculates time-symmetric projections anchored to a user-selected point on the chart. It determines the bar distance between consecutive fractal highs and lows to establish a dynamic cycle length, then mirrors past
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
This Pine Script strategy evaluates fast and slow exponential moving average crossovers gated by an RSI boundary to enter long positions. It utilizes fixed cash position sizing and permits up to three pyramided entries, converting cash to fractional contract a
The indicator calculates and plots symmetric mirrored candles and multiple reflection boxes on the price chart based on user-defined time ranges and price levels. It reflects prices over midpoints and original highs/lows to generate layered m1 and m2 candle st
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
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.