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.
MultiVolatility calculates and compares multiple annualized volatility metrics within a separate pane. It computes a traditional 20-day historical volatility using log returns on daily data scaled by 252 days, which displays on daily charts. Additionally, it i
This strategy executes a classic Donchian-style breakout system on the price chart. It calculates the highest high and lowest low over a user-defined lookback period offset by one bar. A long position is opened when the price breaks above the previous period h
This strategy plots the relative strength index in a separate pane and trades mean reversion. It enters long when RSI crosses above the oversold level and enters short when RSI crosses below the overbought level. Opposite signals reverse the position. Size def
HTF Timestamp Probe is a diagnostic utility indicator that inspects how TradingView timestamps higher-timeframe bar open times. It requests open timestamps for weekly, monthly, quarterly, and yearly bars using lookahead security calls and displays the results
This strategy fits a binary logistic regression classification model bar by bar on the price chart to generate long trading signals. It computes model weights via iterative gradient descent based on user-defined learning rates, lookback windows, and normalizat
This strategy tracks pivot-constrained structural boundaries and executes breakout and retest trades directly on the price chart. It fits robust trendline boundaries using pivot points, evaluates structural quality via a Q-Score metric, and filters entries thr
This indicator calculates and plots key intraday session levels directly on the price chart. It tracks the regular trading hours (RTH) open, previous day close, previous day high, and previous day low, along with the high and low ranges for both the Asian and
This strategy trades long when an M15 bar's low comes within a tolerance of the prior week's low and the bar closes above that level. It places a fixed point stop below entry and a take-profit at a chosen R-multiple of that stop. Entries are limited to a UTC s
Calculates daily classical pivot points from the previous day's high, low, and close to identify intraday reversal setups within a defined trading session. Long signals fire when price comes within a configurable tick proximity to S1 and prints a bullish recla
This strategy calculates a 50-period simple moving average and a 200-period simple moving average using closing prices. It enters a long position whenever the fast moving average crosses above the slow moving average, and closes the trade when it crosses below
This indicator calculates the Moving Average Convergence Divergence (MACD) and signal line in a separate pane to detect regular bullish and bearish divergences. It identifies price pivot highs and lows using a configurable lookback length and compares them aga
This indicator applies Hybrid Triple Exponential Smoothing (Holt-Winters method) to price series with an optional power transformation function. It calculates level, trend, and seasonal components to produce a fitted basis line along with residual and error de
This indicator plots a multi-timeframe Double Smoothed Stochastic in a separate pane. It combines an exponential moving average ratio with stochastic normalization and optional moving-average smoothing, producing values from 0 to 100. Rising and falling values
This indicator plots a Price Action Channel (PAC) based on high, low, and close moving averages alongside fast, medium, and slow trend EMAs directly on the price chart. It detects regular and Bill Williams fractals to track market structure and identifies pull
ATR Based Stoploss is an overlay indicator that calculates dynamic stop loss and take profit bands around a central simple moving average. It uses standard Average True Range or an ATR Surge Average derived from volatility spikes to offset profit and loss boun
Hedge Exit Algo provides position sizing and lot calculations for forex and precious metals hedging strategies. It evaluates pip values, currency conversion rates, and profit targets relative to account balance. The script defines custom lot sizing routines al
My Cipher v2 plots a combined oscillator in a separate pane. It calculates a WaveTrend-style stochastic from Heikin Ashi prices, a volume-based money flow histogram, smoothed RSI, MACD-style lengths, and a Z-VWAP. Crosses mark WaveTrend turns; colored dots mar
This short-only strategy identifies trend continuation setups on the price chart by combining 50 and 200 EMAs with Stochastic crossovers and RSI momentum filters. It executes short entries when the 50 EMA is below the 200 EMA, price trades below the 50 EMA, St
Standard Lib is a utility Pine Script library designed to assist developers with chart debugging and dynamic text display. It exports a print function that creates and updates a single text label on the price chart. The label automatically positions itself at
This indicator draws floor pivots and the central pivot range on the price chart. A timeframe input sets the pivot period from one hour through twelve months, and toggles control labels and next-period levels. When dynamic levels are on, an ATR threshold decid
This indicator calculates three distinct Supertrend lines on the main price chart, designated as short, medium, and long term. Each Supertrend line utilizes its own Average True Range period and multiplier settings to identify trend directions across different
This strategy plots an eight-line exponential moving average ribbon spanning lengths 20 to 55 alongside a separate signal EMA directly on the price chart. It executes a long entry when price crosses above the signal EMA and enters short when price crosses belo
Antigravity Elite is an overlay indicator that screens price with seven selectable components: Mercury Fear, Connors RSI-2, volatility-spike reversal, EMA stack, Supertrend, multi-sigma bands, and an optional funding proxy. Auto-Detect chooses one method, whil
Commonlib is a Pine Script v6 library of bar-geometry helpers that draws nothing by itself. It measures the longer wick as a share of the high-low range, signed when the lower wick is longer, and the candle body as a signed share of that range. It combines tho
OptionX Noisy Test Signals calculates a short-period Relative Strength Index (RSI) and plots buy or sell shape markers on the main price chart when the RSI crosses above or below a chosen center level. It generates JSON-formatted alert payloads with symbol, pr
This strategy translates Python backtesting logic into Pine Script for intraday momentum trading. It calculates forced Heikin-Ashi candles and 1-minute moving averages to evaluate market trends and assign a signal strength score from 0 to 10. Entries execute w
Lucid 100K v5 is a Pine Script strategy for trading MES futures on 5-minute charts. It overlays buy and sell signals directly on the price chart. The strategy runs two phases based on equity and recent profit factor. Phase 1 uses trend pullback entries with EM
This strategy plots on the price chart and trades EMA crossovers filtered by RSI. It enters long when the fast EMA crosses above the slow EMA and RSI is above the minimum threshold. A cross below closes the long and opens a short without an RSI filter. Each en
An all-in-one chart indicator combining Smart Money Concepts (SMC) and technical level analysis. It identifies Order Blocks, market structure shifts like CHoCH and BOS, KOLA support and resistance levels, SIDO chart patterns, and Fibonacci Optimal Trade Entry
This indicator calculates a rolling price mean using a simple moving average of OHLC4 prices alongside standard deviation bands plotted directly on the price chart. It projects an upper and lower envelope based on a user-defined deviation multiplier to highlig
Calculates and renders Time Price Opportunity (TPO) market profiles, Initial Balance (IB) ranges, and value distributions directly on the price chart. It determines key auction levels including the Point of Control (POC), Value Area High (VAH), Value Area Low
This indicator calculates the Average True Range and a Simple Moving Average of closing prices. It plots a central basis line along with dynamic support and resistance levels derived from multiples of the ATR. The main settings control the ATR length and the m
Liquidity Magnet scores active liquidity pools on the price chart and highlights the pool most likely to be reached. It detects swing highs, swing lows, and equal high or low clusters, then ranks them using strength, proximity, age decay, and momentum bias. Eq
This strategy overlays an ICT and smart money framework on the price chart. It stores candle-range, swing-structure, fair-value-gap, and order-block objects, and can show those zones plus premium and discount shading. Settings choose the range and structure ti
This long-only strategy enters when the fast EMA crosses above the slow EMA and fills at the next bar open. It sets an initial percentage take profit and stop loss from the entry price. Once price rises by the trail trigger, both levels and the reference price
MACD 4H Rhythm is a TradingView strategy that trades the price chart on a four-hour forex rhythm. It goes long when the MACD histogram crosses above zero while a 21-period EMA is above a 50-period EMA, and short on the opposite histogram turn in a bearish EMA
This indicator calculates and plots the standard Moving Average Convergence Divergence oscillator in a separate pane. It computes a fast exponential moving average and a slow exponential moving average from the chosen price source, taking the difference as the
This strategy example enforces a daily loss limit. It detects a new trading day, stores starting equity, and tracks the day's highest and lowest equity. Trading permission depends on whether the loss from the day's starting equity stays inside a percentage of
Calculates top and bottom reversal signals for oscillator indicators based on dynamic cycle detection, overbought and oversold thresholds, and price confirmation. It tracks indicator cycles using centerline crossovers, verifies overbought or oversold condition
This overlay indicator identifies multi-indicator setup confluences using Exponential Moving Averages, StochRSI, and MACD momentum. It plots an EMA ribbon and additional trend EMAs on the price chart. When fast and slow EMAs align with MACD momentum and StochR
Harami Cross - Bullish detects the two-candle bullish Harami Cross pattern directly on the main price chart. It identifies a long red candle during a downtrend followed by a Doji candle contained entirely within the previous candle's body. Users can refine tre
All Candlestick Patterns identifies and highlights classical Japanese candlestick patterns directly on the price chart. It determines underlying market trends using configurable moving averages, including a 50-period SMA, a dual SMA 50/200 setup, or no trend f
Butterfly Pattern plots a simple zigzag on the price chart. It treats a bar as up or down from the close versus the open, then records a turn when that direction reverses. On a downward turn it uses the highest price of the last two bars, and on an upward turn
ATCA-HO is an overlay indicator that plots six Exponential Moving Averages alongside a Simple Moving Average on the price chart. It generates visual buy and sell shape labels whenever the fastest 5-period EMA crosses above or below the 22-period EMA. Additiona
VolTargeting is a Pine Script v5 library of functions for volatility-based position sizing. ewmaVol estimates exponentially weighted annualised volatility from squared simple returns and scales it by the square root of 365 days for crypto or 252 days otherwise
Combines multiple analytical tools onto a single price chart overlay to consolidate screen space. It plots three customizable exponential moving averages, three-bar imbalance and opening gap boxes, a horizontal volume profile with point of control, and smart m
This strategy implements a dollar-cost averaging (DCA) trading framework using Volume-Weighted Moving Average (VWMA) values and price percentage changes. It enters an initial base order and places up to a configurable number of safety orders as price declines
This indicator calculates market drift using logarithmic returns adjusted for variance over a configurable lookback period. It measures underlying directional movement and plots a continuous line in a separate pane, colored blue when drift is positive and red
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.