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 overlay indicator marks historical ARK Invest purchases and sales of AYX on the price chart. It places green buy labels below the bar and red sell labels above the bar at fixed calendar dates, each labeled with an X1 count. The only input selects the ETF
MathComplexTrignometry is a Pine Script library that provides trigonometric operations for complex numbers represented as float arrays. It implements standard, hyperbolic, arc, and hyperbolic arc trigonometric functions such as sinh, cosh, and tanh. As a devel
This overlay indicator marks call and put setups from EMAs, RSI, MACD, and a SPY volume ratio. A call needs higher highs, RSI above its minimum, rising MACD, above-average proxy volume, and a rising trend EMA; a put reverses those tests. Early markers use an E
Rotating Quotes displays customizable trading psychology quotes and reminders in a table widget in a separate pane. It cycles through a pipe-separated list of quotes at a user-defined time interval, either sequentially or in random order. User inputs allow ful
This indicator plots an adaptive moving average or scaled RSI divergence line directly on the price chart. It calculates dual RSI series to measure momentum divergence, scales the values to the chart's price range, and constructs an adaptive average filtered b
Calculates a momentum squeeze using Bollinger Bands and Keltner Channels alongside a trend-filtering moving average. It generates long and short entries based on squeeze momentum bar conditions and an optional pre-squeeze dot count filter. Exits can trigger on
This indicator calculates the Commodity Channel Index in a separate pane. It forms typical price from high, low, and close, tracks a simple moving average with a circular buffer, and divides the price deviation by a scaled mean absolute deviation. The Length i
This educational indicator demonstrates the behavior of shallow copies created by the array.slice function in Pine Script. On the final bar of the chart, it initializes a float array, generates a slice, and demonstrates how modifying the parent array or its sl
The HT_SINE indicator calculates the Hilbert Transform SineWave and LeadSine components based on the dominant cycle of a selected price source. Using in-phase and quadrature signal processing along with a custom atan2 implementation, it measures the phase of t
NQ Statistical Mapper plots key trading sessions including New York, London, and Asia directly on the price chart. It visualizes session high and low ranges, displays configurable session and intraday levels, and presents session performance metrics in an on-s
This indicator detects the bearish Downside Tasuki Gap candlestick pattern on the price chart. It looks for a long red candle, a smaller red candle that gaps below it, and a green candle that closes inside that gap without filling it, while price is in a downt
This strategy implements a Donchian breakout trend-following system with sector-adaptive profit targets and ATR-based volatility sizing. It enters positions on Donchian channel breakouts, pyramiding additional units at ATR increments up to a configurable maxim
Knn Filter A007 is a strategy that applies a K-Nearest Neighbors classification algorithm to evaluate historical feature performance and filter out low-probability trade setups. It executes long and short entries based on learned historical patterns. Risk mana
This indicator evaluates how price relates to one selected moving-average family rather than treating a crossover as a signal. It scores trend quality, historical respect of the average, extension, compression, acceleration, and exhaustion, then plots a relati
Delta Hedging Pressure estimates directional market bias using a volume-weighted delta calculation plotted in a separate pane. It multiplies candle volume by bar direction (positive for bullish closes and negative for bearish closes) to compute directional pre
Apex Protocol v3.0 - The SMC Engine is an overlay indicator designed for Smart Money Concepts market structure analysis. It identifies and plots Break of Structure (BOS) and Market Structure Shift (MSS) markers, Fair Value Gaps (FVG), Order Blocks (OB), and se
This overlay strategy enters long when regular or hidden bullish RSI divergence forms between price lows and RSI pivot lows. A regular signal needs a lower price low with a higher RSI low, and a hidden signal needs a higher price low with a lower RSI low, both
Calculates and plots the Stochastic RSI oscillator in a separate pane using customizable RSI, Stochastic, and SMA smoothing lengths for %K and %D lines. It generates bullish crossover signals when %K crosses above %D in oversold territory below 20, and bearish
DEBUG Lower TF Supertrend calculates a modified trailing Supertrend line and trend direction based on average true range bands applied around the bar mid-price. The custom function supports multiple moving average types, such as HMA, EMA, SMA, WMA, and VWMA, t
This indicator maps Smart Money Concepts (SMC) and ICT market structure directly on the price chart. It detects internal and swing structure breaks including Break of Structure (BOS) and Change of Character (CHoCH), highlights internal and swing order blocks w
This indicator detects market structure breaks using a configurable ZigZag length to identify swing highs and lows. It marks bullish and bearish order blocks along with breaker blocks on the price chart. Breakouts are confirmed via a Fibonacci retracement fact
VWMA_WF plots a 24-period volume-weighted moving average of the 60-minute hlc3 price on the chart, plus percentage offset bands. It draws a long label when price is at or below the lower band and a down fractal is confirmed, and it sends a short alert when pri
This indicator plots a proxy financial-conditions index in a separate pane. It turns log returns of SPY, TLT, an investment-grade to high-yield bond ratio, VIX, and a short-term Treasury to equity ratio into lookback z-scores, inverts several components, and c
This indicator calculates a linear time-weighted moving average of a chosen price source and plots it on the price chart. Inside the lookback, each bar receives a weight that rises with recency, equal to the period minus its offset, and the result is the weigh
Q-Trend Strategy builds a midpoint from the highest and lowest source values over a trend period and shifts it by an ATR band. It enters long when the source crosses or remains above the upper band and short when it crosses or remains below the lower band. Typ
The FTB Strategy is a short-only overlay strategy targeting EURUSD during the European session from 0200-0700. It enters short positions when filters confirm RSI overbought, a bullish prior bar close, or a high price level within lookback bars, combined with a
This strategy plots market structure on the price chart from confirmed swing highs and lows and flags breaks of those levels. Breaks can use the wick or the close, and structure logic can stay standard or include sweeps. ChoCH mode selects Ping, Verify, or bot
MTF Array Stats is a multi-timeframe strategy created as an engine validation probe. It collects daily close prices into a rolling 20-element array buffer. Using array functions, it calculates the median and percentile rank of the latest daily close relative t
This indicator is a Pine Script v6 parser fixture rather than a trading signal. It defines a function that doubles its numeric input, stores a string that looks like a comment, and plots the doubled close plus the length of that string in a separate pane. Trai
An overlay indicator that tracks Asia, London and New York sessions in a chosen timezone and classifies how the day is developing into numbered profiles. It adds opening range boxes, previous day high and low sweeps, higher-timeframe market structure, a TDI an
This indicator generates trading signals for multiple cryptocurrency symbols using four methods: trend, momentum, volatility, and volume. It supports three signal modes - single method, simultaneous confirmation requiring a minimum number of agreeing methods,
This indicator detects break of structure from confirmed pivot highs and lows and groups the bars between state changes into clusters. It plots blue and orange boxes and polylines of normalized closes in a separate pane, with optional moving averages on those
A trend flip indicator on the price chart, written for one-minute charts, where BUY exits a short and enters long and SELL does the reverse. It combines a zero-lag EMA with an ALMA smoother and an ATR trail based on fast and slow volatility. A micro-range filt
Tick-chart-safe overlay indicator that extracts six signal types: cluster, E3 and First Two momentum-bar patterns, each in a bullish and bearish version, plus combined any-bull and any-bear markers. Visibility, alert switches and marker colours are set per sig
A strategy for gold futures based on the initial balance, the high and low of a set New York time window that starts at 9:30 and ends at 10:30 by default. Ranges outside a minimum and maximum percent of price are skipped. After price breaks the range, it waits
A Pine v4 indicator built around a TTM-style squeeze, comparing Bollinger Bands with Keltner Channels to flag low-volatility compression and the breakout that follows. It then derives entry, stop and target levels from an entry source, a stop source with a per
A Pine Script v5 indicator in a separate pane, version A4.0 of a Hurst spectral oscillator. The hl2 source, changeable in the settings, is requested with lookahead on and filtered with bandpass filters covering cycles from 1 day to 18 years. Each cycle can be
This indicator scans multiple technical indicators—including MACD, RSI, Stochastic, CCI, Momentum, OBV, VWMA, CMF, and MFI—to detect regular and hidden divergences against price pivot points. It overlays divergence lines and labels directly on the price chart
A strategy that trades breaks of swing points. It detects pivot highs and pivot lows using left and right bar counts, then places a long stop order one tick above the latest pivot high and a short stop order one tick below the latest pivot low. A pending order
This indicator computes an Average True Range trailing stop to detect directional trend reversals as a feature component for a quantitative neural network framework. It uses an ATR multiplier to maintain dynamic upper and lower stop bands, triggering buy and s
A long-only Pine v4 strategy built on a 12/26 MACD with a nine-period signal line. It enters on a green candle when the MACD has risen for three consecutive bars while still below zero and above its signal line. It closes when the opposite falling-MACD conditi
Calculates the standard Money Flow Index (MFI) oscillator alongside an exponential moving average signal line in a separate pane. The script visually highlights trend conditions through dynamic ribbon filling, optional difference histogram bars, and overbought
Heikin Ashi Strategy V2 [Alorse] is a trend-following strategy that generates trading signals using multi-timeframe Heikin Ashi moving average crossovers. It calculates a fast and slow exponential moving average from higher-timeframe Heikin Ashi close data and
BA-tracker is an overlay indicator that marks historical ARK Invest purchases and sales of Boeing on the price chart. Green labels appear below bars on buy dates and red labels appear above bars on sell dates, with text showing the side and how many ARK ETFs t
This Pine Script v5 library exports frequently used mathematical constants as functions that return fixed numeric values. It includes e, pi, natural and base-10 logarithms of e, 2, 10 and pi, square roots of e, 2, 3 and pi, and related products and inverses su
Donald - AI Futures 5M 15M Timeframe is an overlay trading strategy designed for intraday futures trading. It utilizes rational quadratic kernel regression to construct dynamic momentum zones and smoothed price boundaries on the main price chart. The strategy
This indicator plots a classic Relative Strength Index in a separate pane. It calculates RSI from a chosen price source and length, then draws dashed oversold and overbought levels plus a dotted midline at 50. Background shading highlights when RSI is above th
This indicator calculates an adaptive moving average filter and relative strength divergence to identify directional shifts directly on the price chart. It signals long entries when the moving average slope turns upward and short entries when it turns downward
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.