8,340 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.
BTMM HTF Bias System analyzes trend alignment and higher-timeframe directional bias using exponential moving averages across multiple timeframes, such as 1-hour, 4-hour, daily, and weekly charts. Based on Steve Mauro's Beat The Market Maker methodology, it cal
This indicator identifies and highlights the three-candle bullish Morning Star reversal pattern directly on the price chart. It checks for a long bearish candle followed by a small-bodied candle or doji, and finishes with a strong bullish candle closing above
DX Strat is an intraday directional trading strategy that combines a composite RSI momentum calculation, moving averages, Keltner Channels, and VWAP to execute trades. It initiates long positions when composite momentum RSI crosses above 77 and short positions
Calculates and displays the relative currency strength of major currencies, including EUR, USD, JPY, GBP, CHF, AUD, and CAD. It plots strength lines and optional histograms in a separate pane to highlight directional momentum across Forex pairs. Users can adju
Calculates the opening range during the initial minutes of regular trading hours and triggers breakout trades directly on the price chart. Long positions enter when price closes above the opening range high, while short entries trigger on closes below the open
Envelopes is an overlay indicator that plots percentage bands around a simple moving average. It calculates a baseline SMA using a configurable length and derives upper and lower envelope boundaries shifted by a user-defined percentage deviation. The script pl
This indicator calculates the Rank Correlation Index over a customizable period and plots the oscillator in a separate pane. It identifies overbought and oversold market conditions relative to user-defined thresholds. Bullish signals occur when the oscillator
PVSR Volume MP calculates and displays volume bars categorized using Price Volume Spread Analysis in a separate indicator pane. It highlights climax volume, above-average volume, and regular volume based on configurable lookback windows and multipliers. The sc
Oscillator plots a multi-component momentum indicator in a separate pane, combining WaveTrend, Money Flow Oscillator (MFO), and VWAP-based metrics. It tracks overbought and oversold market conditions using adjustable horizontal threshold levels. The script cal
The indicator calculates a weighted composite relative strength score across short, mid, and long-term Rate of Change (ROC) horizons alongside RSI for up to eight customizable symbols. Users can measure raw momentum or compare performance relative to a selecte
The Liquidity Sweep Hunter indicator identifies liquidity sweeps on swing highs and lows. It detects wick breaks or retests that sweep through swing levels using ATR-based wick filtering. Bullish and bearish sweeps are labeled and colored on the chart. Active
This overlay strategy plots up to three double exponential moving averages of a chosen source on the price chart. With the default lengths, it treats a crossover of the first and second DEMA as a long signal and a crossunder as a short signal; a third DEMA can
IPO Day Anchored VWAP calculates a Volume Weighted Average Price anchored to the first available bar on a chart, representing an asset's initial public offering or historical debut. It plots the anchored VWAP line on the main price chart alongside an anchor la
This strategy plots on the gold price chart and combines stochastic, RSI, and three EMAs with an ATR-based stop. Confirm entries can require an M15 oscillator extreme and rejection wick, plus a Fibonacci or EMA zone and a no-chase distance from the fast EMA. O
The Lakshmi Strategy v2 automatically computes daily price zones from previous candle bodies using body width and wick factors then overlays them on the chart. It generates long signals when VPA close positions confirm at zone levels with fallback stop losses
The Volatility Stop indicator calculates a dynamic trailing stop line based on the Average True Range. It tracks ongoing price extremes and adjusts the stop level using a specified ATR multiplier and lookback length. The script evaluates trend direction change
This indicator calculates Murrey Math lines to establish upper and lower boundary levels for grid trading setups. Rendered in a separate chart pane along with custom candle displays, it generates range boundaries tailored for automated grid strategies. Traders
This indicator calculates arithmetic returns across a user-defined list of tickers and visualizes their statistical correlation as a heatmap table in a separate pane. It samples returns at weekly or monthly timeframes aligned with the chart data. Users can con
This indicator calculates the Stochastic %J oscillator alongside reverse-engineered price targets in a separate pane. It plots the current %J line against custom target, overbought, and oversold reference thresholds. Using an iterative algorithm, it calculates
This strategy generates long entry signals by combining a Donchian Channel breakout with a moving average trend filter, volume confirmation, and a macro volatility regime gate based on CBOE VIX and VIX3M ratios. It enters long positions when prices break above
The FRAMA & CPMA Strategy overlay script combines a Fractal Adaptive Moving Average (FRAMA) and a custom CPMA indicator imported from an external library. It generates long and short trading signals when price crosses above or below either moving average line.
My Indicator overlays timeframe-adaptive moving averages, candlestick pattern detections, and an information table directly on the price chart. Depending on the active chart timeframe, it plots key moving averages including daily SMAs and EMAs, intraday VWMA a
This indicator plots the percentage of stocks in a selected index trading above their 20, 50, 100, 200, and selected other day moving averages. It automatically detects the main chart symbol and switches to the corresponding index ticker such as S&P or NDX, or
Averages is a Pine Script utility library designed for computing custom averages directly from float arrays. It provides exportable functions to calculate triangular weighted averages, standard weighted averages using an auxiliary weight array, and combined tr
This indicator paints the price-chart background for three clock windows using a timezone chosen as GMT+1 or GMT+2 from the hour gap between Los Angeles and GMT. Bars from 00:00 to 15:30 use the pre-market color, 15:30 to 22:00 stay transparent, and 22:00 to 2
This indicator calculates the Relative Strength Index (RSI) over a user-defined lookback period and plots it in a separate pane. It marks horizontal lines for overbought and oversold thresholds. A bullish buy signal is triggered when the RSI crosses above the
The script calculates three moving averages with configurable types, lengths, and price sources. It evaluates trend alignment by comparing the relative order of fast, medium, and slow averages across four market states. In a separate pane, it plots color-coded
This educational script demonstrates how to define and execute custom user-defined functions in Pine Script v5. It illustrates three distinct function structures: single-line functions, multi-line functions incorporating global variables, and multi-result func
This indicator plots several moving averages on the price chart to help identify trends and support or resistance. It displays an exponential moving average with a period of 21 and simple moving averages with periods of 30, 40, and 50. The lines are colored gr
This indicator draws higher-timeframe candles on the price chart and overlays pivot levels. Users choose the timeframe, candle thickness, wick display, fill for negative candles, and whether history is shifted forward. Labels can show the timeframe, an average
This indicator plots ZigZag lines over the price chart to help identify swing highs and lows based on localized extreme points. Users can select between bar closing prices or high/low extremes as the calculation source and adjust the detection period. Settings
This strategy enters long when the chart high breaks the previous higher-timeframe high during a detected higher-timeframe inside bar, and enters short on a break of the previous higher-timeframe low. It sizes positions at 10 percent of equity and has no stop
This custom Ichimoku indicator plots Tenkan-Sen, Kijun-Sen, Chikou-Span, Senkou-Span A, Senkou-Span B and the cloud fill on the price chart. It generates bullish signals when Tenkan crosses Kijun upward, Chikou is positive, price is above the cloud, and option
This strategy identifies SA signals for long entries and SOT signals for short entries. It places pending orders with stop loss and take profit. The take profit distance equals tp_count multiplied by the distance from entry to stop loss. The difference input s
This script demonstrates array manipulation in Pine Script v4 to create a 2D matrix structure for testing a neural network. It implements a basic neural network to solve the XOR logic problem. The indicator runs a configurable number of training loops using a
This indicator calculates standard pivot points based on selected type such as Traditional or Fibonacci and anchor timeframe. It plots horizontal lines on the price chart for key levels including P, S1, R1, S2, R2 and higher. Main settings allow choosing pivot
JAT+BSM Pro v13 Extended is a multi-timeframe trading strategy overlay that combines kinematic regression models, Bayesian inference, and consolidation zone analysis. It processes multi-layer volatility bands, volume profile buckets, and pattern structure targ
This indicator calculates fast (9-period), slow (21-period), and trend (200-period) Exponential Moving Averages (EMAs) directly on the price chart. It plots all three EMAs along with a color-coded fill between the fast and slow moving averages. BUY signals tri
SMC Confluence Hub aggregates Smart Money Concept zone states linked from external scripts with internal technical analysis. It combines EMA trend, RSI, MACD momentum, and Bollinger Bands mean-reversion metrics to generate a unified confluence score specifical
Drawing Chartpoint Trendline is a strategy that calculates a 20-period simple moving average to dynamically construct a trendline using chart points between past SMA values. It extracts the projected line price at the previous bar as a reference level on the p
Calculates and plots multiple standard technical momentum oscillators in a separate pane. The script computes built-in indicator calculations including Relative Strength Index (RSI), MACD, Stochastic Oscillator, Commodity Channel Index (CCI), Money Flow Index
This indicator calculates dual Exponential Moving Averages alongside their slopes, normalized distance, and momentum to detect trend shifts on the price chart. It plots standard EMA crossovers while also assessing early warning conditions when EMAs approach ea
This strategy opens a long position when the chart time is exactly 08:30 UTC and closes that long when the time is exactly 08:00 UTC. It draws on the price chart and uses no user inputs. The main behavior is a clock-based daily cycle rather than an indicator s
This indicator calculates Heikin Ashi scores for multiple multiplier timeframes relative to a signal timeframe. It computes HA power for 2x, 3x, 4x, and 6x the base timeframe (default 15 minutes) using custom HA candle logic and normalizes the close-open range
Calculates support and resistance zones from confirmed swing pivot highs and lows, drawing them directly on the price chart. It counts how often price revisits these zones after confirmation and compares the touch frequency against evenly spaced round-number l
The Top 10 Daily Candles indicator calculates the relative size of each daily candle as the body range divided by the open price. It maintains a running array of the ten largest sizes and their corresponding dates. A table is overlaid on the top right of the c
Bmoon System Pivot Finder is an indicator that calculates mirrored pivot levels using P1 and P2 mirror levels with configurable multipliers and reference times. It plots lines on the price chart representing mirrored highs and lows based on open, high, low, an
This overlay indicator template plots previous-day and previous-week highs and lows and marks liquidity sweeps when price pierces a level on elevated volume and closes back inside. It builds a rolling volume profile with point of control and value area, plus a
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.