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.
Index Intraday Analyst overlays CBOE cash indices such as SPX, NDX, RUT, and DJX. It plots a multi-EMA ribbon, a session-anchored TWAP with standard-deviation bands, and session levels such as prior-day high, low, and close, the opening range, and the high and
Scalping Level PRO identifies key local and global horizontal support and resistance levels across cryptocurrency price charts. It draws level lines based on customizable time periods, calculates Normalized Average True Range (NATR) for volatility assessment,
Chart Patterns is a Pine Script v6 library designed to scan for and render technical chart patterns directly on the price chart. It defines custom user-defined types to configure scanning parameters, such as Zigzag pivot offsets, error ratios, flat ratios, and
ClaudeHedge - Master Timezone Arbitrage is a multi-session trading strategy that rotates capital sequentially across Asian, European, and US trading hours. It tracks session boundaries for the Nikkei, DAX, and Nasdaq time windows and calculates momentum, RSI,
This strategy generates entry signals using pivot points and uses custom Curie moving average closing lines for exiting positions. It features risk management components including percentage-based stop loss, take profit, trailing stops, and break-even levels,
Momentum Index is a Pine Script strategy that analyzes market momentum in a separate indicator pane. It offers multiple visualization display modes, including Scope, Weighting, and Position. Traders can configure scalar gradation options with linear or logarit
This strategy enters long when a fast EMA crosses above a slow EMA and RSI, ADX, and volume all clear their thresholds. It sizes the order from a percentage of equity and an ATR stop distance, then sets a partial profit target at a multiple of that risk. After
This indicator detects Change in State of Delivery levels on the price chart. It tracks swing highs and lows, looks for a swing sweep, collects the delivery candles between those swings, and marks that sequence's opening price. A level is drawn only after a cl
This script plots two simple moving averages (SMA) directly on the main price chart. It calculates a short-term 7-period SMA and a medium-term 20-period SMA based on bar closing prices. The 7-period SMA is displayed in red, while the 20-period SMA is rendered
This strategy reproduces a fixed trade log on the price chart for Bitfinex BTC/USD on the 2-hour timeframe between January 15, 2018, and February 15, 2018. It places hardcoded long and short orders with explicit quantities and prices matched to exact bar closi
This Pine v4 study ports early NostalgiaForInfinity V6 conditions onto the price chart. It computes two Bollinger setups, several EMAs and SMAs, RSI, MFI, a percent SMA spread labeled EWO, a 14-period choppiness value, and short and longer volume medians. Fixe
This indicator identifies and visualizes key support and resistance heatmap zones directly on the price chart. Using closed one-hour price data, it evaluates multi-scale pivots, liquidity clusters, relative volume, and round-number resonances to score structur
This strategy generates long trade entries based on an exponential moving average crossover on the main price chart. It calculates two customizable EMAs and executes a buy order when the shorter moving average crosses above the longer moving average. Rather th
5 EMAs is an overlay indicator that fetches and plots high and low price levels from a selected higher timeframe directly on the main price chart. Although the inputs configure multiple timeframe resolutions, the script calculates and draws the upper and lower
This script provides an indicator-based backtesting engine framework built around Accelerator Oscillator and Awesome Oscillator logic. It simulates strategy executions directly on the price chart by plotting entry levels, take profit targets, trade markers, an
This indicator plots three sets of multi-timeframe moving averages on the price chart to assist with top-down macro trend analysis. It renders two configurable fast and slow moving averages on a 610-minute timeframe, a 21-period weekly ribbon comparing EMA and
Chad's Alert SMAs is an overlay indicator that calculates and plots two Exponential Moving Averages on the main price chart despite its naming. It evaluates short-term and long-term moving averages to detect crossovers and triggers alert conditions when the li
Adaptive Fair Value Cloud calculates a volatility-adaptive fair value channel around a selectable centerline, such as KAMA, EMA, linear regression, or VWMA. It blends ATR and mean deviation with volatility percentiles and trend sensors, including ADX, Efficien
Nexural OrderFlow Matrix is an order flow visualization tool that plots a detailed heatmap table and stacked imbalance bars in a separate pane. It calculates volume metrics using lower timeframe volume delta data, displaying per-candle metrics such as Delta, D
Asset Drift Model is a separate-pane statistical indicator that collects non-overlapping logarithmic returns over a fixed 60-bar horizon and summarizes them with sample statistics. It classifies drift using t-critical and z-score thresholds plus a minimum econ
This strategy plots the Commodity Channel Index in a separate pane and enters long or short only when flat. A long opens when CCI crosses above the oversold level or rebounds from an extreme oversold zone; a short uses the opposite conditions. It closes the po
Volume SuperTrend AI (Expo) combines SuperTrend trend filtering with a k-nearest neighbors machine learning classification algorithm. It computes a SuperTrend using customizable moving average types, including simple, exponential, weighted, smoothed, or volume
This indicator plots a Stochastic Momentum Index Ergodic oscillator in a separate pane. It measures close relative to the lookback range, smooths that value twice, and draws an SMI line plus a signal line. Users choose the moving-average type for each line, in
This strategy plots a 9-period exponential moving average and a 20-period simple moving average on the main price chart. It executes long entries based on the Larry Williams 9.2 setup when price breaks above a trigger bar high while the 9 EMA is rising above t
AG Detector is an overlay indicator that calculates multi-timeframe pivot levels and projects them onto the price chart. It supports multiple pivot calculation formulas including Traditional, Camarilla, Fibonacci, and Standard Deviation based on user-selected
Calculates a SuperTrend trailing stop and reversal line based on Average True Range volatility. It overlays on the price chart to display volatility-based trailing stop levels and trend direction for long or short position scenarios. Users can adjust parameter
A tiny test script from a Pine Script linter project that checks how a string literal continued over two indented lines is handled. It assigns the two-line text to a variable and uses it as the title of a plot of the closing price in a separate pane. It has no
This indicator detects contrarian inflection points and potential market reversals by combining sentiment, volume, and price action metrics directly on the price chart. It evaluates overbought and oversold conditions with the RSI and Stochastic oscillators, hi
This strategy plots a UT Bot ATR trailing stop on the price chart and marks buy and sell labels when price crosses that stop. Long entries also require close below a Tillson T3 average, and short entries require close above it. Stops sit one ATR multiple from
The Triple EMA vs 55 EMA strategy plots three exponential moving averages (lengths 8, 13, 21), a 65-period exponential moving average, a 200-period simple moving average, and Hull moving averages of length 55 on high and low. It fills the area between the HMA
This indicator calculates the cost-of-carry fair value between futures and spot prices, measuring the basis and fair value deviation in basis points. Operating in a separate pane, it computes a rolling Z-score of deviation using moving averages and standard de
This indicator plots Bollinger Bands on the price chart and highlights engulfing candles that touch a band. A bullish engulfing bar that reaches the lower band is colored with the bullish color, and a bearish engulfing bar that reaches the upper band is colore
This indicator calculates and plots the Commodity Channel Index (CCI) alongside a configurable moving average in a separate pane. The CCI line dynamically changes color based on whether its value is above or below a threshold level of 50, accented by gradient
This strategy implements trend-following breakout entries based on the Chandelier Exit calculation filtered by an exponential moving average. It calculates trailing stop bands using the highest high or lowest low over a lookback period adjusted by an Average T
This overlay indicator plots upper and lower support and resistance levels for six timeframes from one minute through four hours. For each timeframe it requests high, low, close, and ATR, then places levels a multiple of ATR above and below that close. Users c
This indicator calculates cumulative volume delta by aggregating directional intrabar volume from lower-timeframe data and plots the accumulated values in a separate pane. It tracks volume progression with high and low wick tracking across each bar. The main s
This Pine Script indicator detects and plots 1v1 and 2v2 engulfment candlestick patterns on the price chart. It identifies bullish and bearish engulfment patterns based on candle open, high, low, and close values, checking conditions where a candle engulfs pre
The EMA 9/26/52 Cross Strategy is a trend-following strategy overlay that plots three Exponential Moving Averages (9, 26, and 52 periods) on the price chart. It generates long entry signals when the 9 EMA crosses above the 26 EMA while the price remains above
This strategy plots a 90-period simple moving average from the daily and four-hour charts plus a daily session VWAP on the price chart. It enters long when VWAP is above the daily average and the four-hour VWAP crosses above its average, and short in the oppos
This indicator plots colored session boxes on the price chart representing London, New York and Tokyo market sessions. Users customize session start and end times, colors, and labels for each session while enabling options for historical display, oscillator mo
The strategy enters long positions on even bars and short positions on odd bars of every chart bar. It records session flags such as market session, premarket, postmarket, first bar, last bar, first regular bar and last regular bar in the trade comment. Proces
This indicator plots a weekly simple moving average and a weekly exponential moving average on the price chart and shades the area between them. It requests weekly values of the close-based averages so the band stays aligned with the weekly timeframe even on l
This indicator measures the distribution of bar-to-bar close returns over a rolling window and presents the results in a table on the price chart. It calculates annualized mean return and volatility, a simple Sharpe ratio, a 95 percent value-at-risk percentile
The C41 Oscillator is a separate pane composite momentum indicator designed to companion the C41 Core Strategy. It combines a moving average trend filter with RSI and Williams %R overbought or oversold reversal conditions into a normalized 0 to 100 score. The
This overlay indicator tracks an institutional CRT state machine on the price chart. It detects draw-on-liquidity bias from swing pivots, watches 1AM, 5AM and 9AM CRT models, and marks session states for CBDR, Asia, London, London lunch and the New York open.
Indicatorv6SMC / ICT / price actionSessions & time
MarketMerge is a price-chart overlay that plots moving averages, a relative strength line, and an S&P 500 comparison. Users can show a 21-period EMA and 50-, 150-, and 200-period simple averages. The relative strength line divides price by a chosen benchmark,
This indicator calculates daily 90-period Bollinger Bands and plots them directly on a lower timeframe chart, such as M15. It queries higher-timeframe daily data using request.security and updates the upper, middle, and lower band values at the start of each n
The TradersPost Example MOMO Strategy is a trend-following trading strategy that generates buy and sell signals based on exponential moving average (EMA) crossovers. It calculates a fast EMA and a slow EMA on the chart timeframe while plotting multi-timeframe
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.