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 strategy executes long trades based on price interaction with a daily simple moving average. It calculates a higher-timeframe daily SMA and its derivative using a three-point backward difference formula. Long entries trigger when the close sits within a s
A pivot breakout strategy designed for the S50 futures on a 30-minute chart. It detects swing highs and lows from left and right bar counts and places stop entries just beyond them. Stops sit one ATR beyond the pivot, targets are ATR multiples set by a risk to
A separate-pane indicator that plots the change in a chosen price source over a set number of trading sessions, as percent or points. Columns are green for gains and red for losses, with aqua and fuchsia highlighting changes above or below two configurable thr
This strategy computes the direction of the altcoin market via the Others.D MTPI index. It merges outputs from Median Supertrend, FDI-Adaptive Supertrend, Hyperbolic Tangent Volatility Stop, Dema AFR, and Normalized KAMA Oscillator to generate long or short si
A template version of a test strategy used by a browser automation project. Placeholder tokens stand in for the input defaults and are filled in before the script is injected into TradingView, so it is not usable as published. The logic goes long on a 14 over
This strategy trades EMA crossovers on the price chart. It enters long when the fast EMA crosses above the slow EMA and price is above a longer trend EMA, and enters short on the opposite cross below that filter. Entries are allowed only in a morning session o
TrendTwisterV1.5 is a Pine Script strategy that uses a 12-period Hull Moving Average and a 5-period EMA shifted forward by 2 bars to identify trend changes. It plots the Hull MA in orange and the shifted EMA in blue on the price chart with buy and sell signal
This script combines five distinct RSI pattern setups with volume ratio filters to generate trading signals. It identifies RSI double bottoms, hooks, bullish divergences, oversold bounces, and midline breakouts to form long conditions, alongside overbought dow
This strategy enters long when price closes above the upper Bollinger Band after being at or below it on the prior bar, and enters short on a close below the lower band. Each trade gets an ATR-based stop loss and take profit using separate multipliers. Band le
A separate-pane indicator that calculates ADX and the plus and minus directional indicators with Wilder smoothing and shows their difference as a coloured histogram. Optional lines show ADX and ADXR, which averages ADX with its earlier value. Two threshold inp
The BuySell Volume Indicator plots volume as histogram columns on the price chart and optionally a moving average of volume in a separate pane. It compares current price and volume with values from lookback bars to color bars green for bullish volume and red f
An indicator in a separate pane that plots Commitment of Traders financial report metrics for the chart symbol, including open interest and dealer, asset manager, leveraged funds and other reportable positions. Settings pick the metric, the direction, a select
A price-chart overlay that marks possible reversals when RSI is stretched and the candle shows rejection. A long triangle appears below the bar when RSI is below the oversold level and the candle has a long lower shadow or is a bullish engulfing bar. A short t
This indicator collects overlay tools for the price chart in one script. It draws two configurable vertical time separators, tints the background by day of week, and plots two EMAs of 100 and 50 periods. It also marks support and resistance from pivot highs an
This overlay indicator draws a Fibonacci golden zone between two selectable ratios based on swing pivots. It plots an anchored VWAP that can be hidden on daily and higher charts and colored by trend. Divergence markers compare price with VWAP using a lookback
This indicator plots Bollinger Bands volatility bands calculated from the input source price. The middle band uses an EMA of the source over the specified length, with bands formed by adding and subtracting the standard deviation multiplied by the mult. It als
Measures how far price has moved from its 50-period moving average in multiples of ATR percent, using daily data. A dot is plotted when the distance exceeds a chosen multiple, with ten as the default, and an optional info table shows the readings. Settings cha
This strategy tests a range of simple moving average periods on the close price. It plots signals on the price chart as an overlay. The strategy enters long positions when close exceeds the moving average for each period tested. Exits use stop loss and take pr
Swing Trader Strategy is a long-only strategy that buys when the MACD line crosses above its signal line during a chosen date range. It exits when the close falls below a trailing stop measured from the highest close since entry, or below a fixed percentage st
A Pine v5 overlay that merges five smart money tools into one script, with Spanish labels. It shades fair value gap positioning using an ATR multiplier, draws liquidity voids with a lookback and threshold, shows order flow imbalances over a chosen range, and a
This indicator identifies consolidation zones and potential breakout moves by processing price data through optional high-pass cleaning, minimax scaling, and RSI calculation. Relative strength values between 40 and 60 represent ranging or chop zones, while cro
This indicator identifies and plots bullish and bearish Doji candlestick patterns directly on the price chart. It defines a Doji by comparing body size to the total candle range and ensuring upper and lower wicks are balanced within a customizable ratio. Signa
Jinni v1 is a Pine Script indicator that plots buy and sell signals on the price chart. It calculates two EMAs, one on close with length 34 and another on input source with length 65, to detect uptrend and downtrend. Additional checks include candle direction,
A strategy template titled for an ATR channel breakout. The code sets non-pyramiding, a starting capital, a cash commission per order and slippage, then lists numbered section headings for settings, calculations, long and short conditions and entry and exit or
A strategy script for the price chart that marks the high, low and midpoint of the first part of each trading session, starting at a configurable hour and minute. It also plots a volume-weighted average price line and a 50-period exponential moving average, an
Draws three ATR-based SuperTrend lines on the price chart, each with its own ATR period, multiplier, source and a wicks-or-close option. A second timeframe input supports a higher timeframe view, and a Chandelier-style exit layer with ATR length, multiplier, c
The Tripple Supertrend Strategy calculates three separate Supertrend indicators using different length and multiplier parameters to gauge trend concurrence. It enters a long position when all three Supertrend instances align in a bullish direction. The strateg
This script calculates and plots the standard Moving Average Convergence Divergence (MACD) indicator in a separate pane. It determines the MACD line by subtracting a slow exponential moving average from a fast exponential moving average. A signal line is calcu
Calculates a modified RSI in a separate pane with a selectable smoothing method such as RMA or EMA, an adjustable length and source, and a smoothed signal line. Overbought and oversold levels default to 80 and 20, with colour fills for each zone. Settings chan
Calculates standard Bollinger Bands alongside the Relative Strength Index (RSI) directly on the main price chart. It plots the upper band, lower band, and simple moving average midline. An upward green arrow signals potential long setups when price crosses bac
A short-only strategy that combines a slow SMA, medium and fast EMAs, a pin bar test, a stochastic filter, an MFI filter on a separate timeframe and a stochastic momentum index. Exits use a trailing stop plus a hard stop expressed in pips. Inputs include stop
An overlay that tracks a multi-step sequence of conditions using RSI and simple moving averages. It flags bearish candles that close while RSI is below 20, remembers the low of the latest such candle, notes when price crosses above the 50-period average, and t
This indicator redraws price as relative candles, coloured by whether highs and lows are rising or falling versus the prior bar. It also works as a risk planner: for a chosen earlier bar it sets an entry and stop loss, with an optional custom entry, custom sto
This script defines a custom alert setup for trade signals across multiple symbols. It supports conditions such as RSI overbought signals, custom crossover rules, center line crosses at 50, SAR alerts, and daily checks. The script uses the alert function combi
Ari zScore calculates a z-score as the difference between a fast and a slow simple moving average of close, divided by the standard deviation of close. It plots numbered triangles above and below price bars when that value enters fixed magnitude bands, optiona
A smart money concepts overlay that marks swing pivots, break of structure and change of character events, liquidity sweeps and liquidation wicks on the price chart, and adds a zigzag line driven by a price deviation percentage and pivot leg count. Pivot lengt
A strategy that trades when price closes across a 50-period moving average after the previous close was on the other side, with a Stochastic RSI direction check and a cap on the stop distance in points. A confirmation timeframe, 5 minutes by default, supplies
This long-only strategy builds an AlphaTrend line from ATR bands that switches behaviour on MFI, or RSI when volume data is missing. A buy signal appears when the line crosses above its two-bar-delayed copy, and a sell signal on the opposite cross. It enters l
This strategy enters long when a 13-period EMA crosses above a 34-period EMA and short when it crosses below, and closes on the opposite cross. While in a trade, it places a stop loss and a take profit at fixed percentages of the average entry price, set separ
This indicator draws several kernel regression lines on the price chart, using a kernel function library. Each of five lines has its own filter mode (No Filter, Smooth or Zero Lag), kernel type (Rational Quadratic, Gaussian, Periodic or Locally Periodic), look
A price-chart overlay that builds supply, equilibrium and demand zones from the bars currently visible on the chart. It splits the visible price range into a configurable number of volume bins, using lower-timeframe intrabar data for volume, and draws boxes pl
The Woverine - Buy Sell Indicators plots buy and sell labels on the price chart based on selected calculation sources like close, EMA, or SMA, combined with ADX for long or short strategies. Users can customize the strategy type, signal colors, label sizes, po
A small Pine v5 library of helper functions for the author's Woodwind Playbook script. One function writes a text tag on the chart just above the recent ten-bar high, using a label. Another builds a number format string that limits displayed price precision to
This indicator plots a 200-period exponential moving average on the price chart. It colors the line green when the current EMA is above its value on the previous bar and red when it is not, so the color tracks whether the average is rising or falling. There ar
A stock strategy that combines a trend template with relative strength against a reference index. It builds smoothed moving averages scaled for daily or weekly charts, 52-week high and low, and an IBD-style relative strength measure against a reference symbol.
Strategy built on exponential moving averages and an optional volume zone oscillator filter. It plots fast, slow and 200-period trend EMAs on the price chart. Risk settings include an ATR based stop distance, a risk-to-reward ratio for the take profit, optiona
A Pine library that exports a scoring function for price against two simple moving averages, with periods of 9 and 20. Depending on the candle colour and where the close sits relative to each average, it adds or subtracts weighted values and returns the total
KC Integration is a trading strategy that calculates multiple sets of Keltner Channels tailored for both trend-following and counter-trend conditions. It plots upper, middle, and lower channel bands directly on the main price chart to identify potential breako
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.