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.
This indicator builds a volume delta map in a separate pane. It requests an anchor timeframe, optionally at seconds or tick resolution, and splits volume into buy and sell sides using bid and ask data when that option is on. It maps volume across price rows, f
The Hull Exponential Moving Average (HEMA) indicator adapts the traditional Hull Moving Average concept by substituting weighted moving averages with exponential moving averages (EMAs) using logarithmic weighting. It computes fast and slow EMA curves to reduce
This trend-following strategy generates long signals by combining the Stochastic Momentum Index (SMI) with a Supertrend filter. It enters a long position when the SMI signal line crosses above an oversold threshold while the Supertrend indicates an uptrend. Po
This educational script demonstrates how to draw and format rectangular boxes on the price chart using Pine Script. It generates a box on the current bar extending ten bars forward, spanning from the bar's low to high, and dynamically colors the fill green or
This indicator draws the 5-minute closing price on the chart for multi-timeframe analysis. It takes the number of bars for prediction as an input and initializes an array of predictors with recent close prices. A matrix is prepared for heuristic logic but rema
Walk-Forward Lab is an educational overlay indicator that simulates trade execution and walk-forward testing directly within Pine Script. It evaluates EMA fast and slow line crossovers using ATR-based stop-loss levels and risk-reward ratio targets. A user-defi
This overlay strategy trades long and short when price reclaims an anchored VWAP and then breaks a recent pullback high or low. Optional modes enter on a simple VWAP cross instead. It filters with VWAP slope, a short price-bias EMA, a stacked RSI bias, and rel
A simple moving average crossover strategy, 10 against 30, that only trades when the chart timeframe is 15 minutes. On that timeframe it enters long when the fast average crosses above the slow one and short when it crosses below, reversing the position. On an
This script is a parser test fixture designed to test syntax error handling in Pine Script v6. It declares a string variable containing an unclosed string literal and attempts to plot the string length in a separate pane. Because the string is intentionally le
An opening range breakout strategy with two entry modes. Breakout mode enters when price clears the opening range by a tick or ATR-based buffer, and retest mode waits for a pullback to the range boundary using a limit or alternative entry type. The range, entr
DEPV2 DEBUG S2 is a multi-symbol indicator that aggregates signals across 20 cryptocurrency pairs using four methods: TREND, MOMENTUM, VOLATILITY and VOLUME. It supports signal modes including simultaneous confidence, sequential and automatic per-asset selecti
Volume Power Zones draws stacked price zones over a recent window of candles, including the live bar, on the price chart. It requests lower-timeframe open, high, low, close and volume to estimate volume inside each zone, then colors zones as strong or weak buy
A cycle-analysis indicator on the price chart. It analyzes a lookback window of 144 bars by default, extracts up to five dominant cycles, and projects a forecast line 55 bars ahead with confidence bands. Buy and sell signals can be limited to the direction of
The bullish half of a split detection indicator that draws about thirty-eight signals as plotted shapes on the price chart. It combines high-volume ladders from 50 to 1000 bars and all-time high volume with standard deviation displacement and a pullback-and-ju
Calculates rolling Sharpe ratios for sub-factors including RSI, MACD, and EMA trend alignment to dynamically weight their signals into a consensus voting score. Long or short positions are opened when the consensus score crosses selectable threshold levels. Th
An indicator version of a multi-timeframe breakout idea that checks 9 and 18 period EMA direction on three higher timeframes, with the chart timeframe optional. Trend agreement is shown through background colours with adjustable transparency. Inputs set a risk
A Pine Script v5 indicator in a separate pane, the fifth revision of a Hurst cycle peak marker. It filters the hl2 price with bandpass filters from 1 day to 18 year cycles and places labels and lines at cycle peaks. Every cycle has its own bandwidth and period
Combination by Yzz is an overlay indicator that detects regular and hidden divergences across multiple technical oscillators, including RSI, MACD, Stochastic, CCI, Momentum, OBV, VWmacd, CMF, and MFI. It locates price pivots and plots divergence lines and labe
Plots net volume, up volume minus down volume, as a blue line in a separate pane with a zero line. Up and down volume are approximated from lower-timeframe data, chosen automatically or set by the user; a higher lower-timeframe setting gives more history but l
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
A Pine v4 strategy combining a 12/26 MACD, a 14-period RSI and rolling highs and lows over lookbacks of twenty and two hundred twenty bars. Inputs set long and short percentage stops, an RSI level for closing longs in a short zone, a short-selling switch and a
The Infinite Impulse Response (IIR) Filter calculates a smooth moving average curve designed to reduce lag by incorporating momentum changes over a calculated lag period. It plots directly on the price chart and can dynamically change color based on whether th
Strat base [Alorse] is a template strategy script designed as a foundational framework for constructing custom trading logic in Pine Script. It plots a single Exponential Moving Average (EMA) on the main price chart and includes configurable inputs for enablin
ARNC-tracker plots historical ARK Invest buy and sell events for ARNC as text labels on the price chart. With the ETF input set to ALL, it places dated labels such as a red sell marker above the bar. The setting chooses which ARK ETF records appear, and this f
This script provides a function implementation of a Markov Chain Monte Carlo (MCMC) simulation. On the initial chart bar, it generates a probabilistic random walk path where each step has a configured probability of moving up, moving down, or staying unchanged
This indicator marks swing pivot highs and lows on the price chart. It uses left and right bar counts, defaulting to five, to confirm a pivot high and a pivot low. After confirmation it stores the latest high and low and plots them as blue and yellow circles.
This strategy uses multiple VWAP anchors and a custom Lull indicator to generate buy and sell signals on the Nasdaq price chart. It plots the VWAP trend line and three VWAP anchors with customizable colors and mitigation methods. The Lull indicator produces si
Time Series Decomposition and Forecasting is an experimental indicator that decomposes close prices into trend and seasonality components. It evaluates a specified lookback window of price history to calculate centered moving averages, deseasonalized data, and
This strategy calculates and plots 9, 21, 50, 90, and 200-period Simple Moving Averages on the main price chart. It constructs a modified On-Balance Volume (OBV) metric and calculates a MACD oscillator based on this custom volume series rather than price. Long
This indicator plots Chandelier Exit levels on the price chart. It computes true range and a Wilder RMA of true range over a lookback, then subtracts a scaled ATR from the highest high for the long exit and adds it to the lowest low for the short exit. The per
This indicator calculates a 20-period RSI of the close and plots it in a separate pane with a horizontal line at 50. It marks an RSI cross above 50 with an up triangle and an RSI cross below 50 with a down triangle. When a cross occurs, it calls alert with a l
Henderson Moving Average plots a finite impulse response smoother of the selected source on the price chart. It derives closed-form Henderson weights once, normalizes them to sum to one, and convolves them with a rolling window. The filter is designed to pass
This indicator identifies inside bars and outside bars, classifying each by close direction as bullish or bearish. It tracks cumulative occurrences and evaluates how often subsequent price action breaks the high or low of each pattern. A summary table drawn on
The Divergence Indicator plots an RSI oscillator in a separate pane alongside horizontal lines for oversold, overbought, and middle levels. It scans for regular and hidden bullish and bearish divergences by comparing pivot high and low points of price with tho
This strategy trades Donchian channel breakouts on the price chart and can take both long and short positions. It sizes the first unit from a risk percentage of price and ATR, then adds smaller units when price advances by an ATR step and RSI is above or below
FilledValueGap B002 is a strategy designed to execute trades when price moves to fill recently created gaps, operating under the assumption that price action will continue along the main trend direction. It uses Curie moving average closing lines for additiona
Market Pressure Scale plots two oscillator curves in a separate pane. Setup pressure combines ATR and Bollinger compression, support and resistance proximity, and drying volume. Impulse pressure combines range expansion, volume, and candle body size. A range-c
This strategy calculates a smoothed Relative Strength Index and plots self-adjusting linear regression bands with overbought and oversold boundaries in a separate pane. It enters long positions through dollar-cost averaging orders scaled across market phases a
This indicator plots Smart Money Concepts structures directly on the price chart. It identifies and tracks break of structure markers, market structure shifts, fair value gaps, order blocks, and session ranges across London, New York, and Asian trading hours.
Indicatorv5SMC / ICT / price actionSessions & time
This indicator combines the Relative Strength Index, Moving Average Convergence Divergence, and Bollinger Bands to identify setup signals during market consolidation. A long signal requires an RSI pullback under 50 following overbought conditions, a MACD histo
This strategy enters long when RSI is above a minimum threshold and price is above a trend EMA, and short when RSI is below a maximum threshold and price is below that EMA. It opens a trade only while flat. Exits place an ATR multiple as the stop and a larger
This strategy plots directly on the price chart, drawing a multi-line stepped channel calculated from a simple moving average of OHLC4 expanded by Average True Range multipliers. It identifies potential mean-reversion setups, executing buy, sell, trim, and exi
RR Dangov is a price-chart strategy that combines optional confluence modules for entries. The trader selects a primary and a secondary source from Guppy moving averages, VWAP, an opening-range breakout, Supertrend, or CPR, and can add WaveTrend, stochastic, a
SuperTrend indicator calculates ATR-based bands on the price chart and determines trend direction by comparing current price to the bands. It plots upper and lower SuperTrend bands that shift based on price action. Signals trigger when the trend flips from dow
This indicator detects and plots multi-timeframe order blocks and wick levels as boxes and labels directly on the main price chart. It tracks bullish and bearish order block zones across selectable intervals ranging from 5-minute charts to monthly charts, with
This strategy combines the WaveTrend oscillator with the Squeeze Momentum indicator. It calculates WT1 and WT2 lines along with their cross signals and color-coded entries on a separate pane. Bollinger Bands and Keltner Channels detect squeeze periods for addi
This indicator calculates a multi-factor Federal Reserve monetary policy forecast to estimate the likelihood of interest rate hikes, pauses, or cuts. It evaluates economic inputs including the Taylor Rule, employment conditions, financial conditions, inflation
The Intraday Intensity Index (III) indicator quantifies volume flow based on price action within each bar's high-low range. It calculates the close price's relative position within the high-low range and scales it by volume to measure buying or selling pressur
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.