Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 33)

Scripts written for Pine Script version 5. They still run in TradingView as they are, and the Pine Editor can convert them to version 6.

Pine scripts4,643
Code shown here2,378open licence
Updated in a year2,687
No repaint flag4,051

Pine Script v5: Indicators, Strategies and Libraries

ArrayOperationsFloat

by ricardosantos79
261 stars

This Pine Script v5 library exports basic element-wise operations on float arrays and draws nothing. Add, subtract, and multiply each return a new array the length of the first input, wrapping the second array by index when it is shorter. A divide function is

Library v5
Updated 4 years ago · None stated GitHub repository of ArrayOperationsFloat
257 stars

This strategy calculates dynamic support and resistance levels using pivot highs and lows alongside a custom smoothed trend filter and a 3-period EMA. It identifies entry opportunities when price breaks out relative to the trend filter and short-term EMA cross

Strategy v5 TrendSupport & resistance Repaints
Updated 7 weeks ago · None stated GitHub repository of 30s - ES 1m Strategy Candle Bar

Ichimoku Cloud

by harryguiacorn
220 stars

This indicator plots Ichimoku Cloud elements on the price chart, including Tenkan-sen, Kijun-sen, Senkou Span A and B lines with optional Chikou Span. It signals trend changes via Tenkan-sen and Kijun-sen crosses and places arrows at Kijun-sen direction shifts

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ichimoku Cloud

Test Request Security

by agutinbaigo28
147 stars

This indicator serves as a test script for verifying multi-timeframe and multi-symbol data requests using the request.security function. It fetches the one-hour closing price for the BINANCE:BTCUSDT trading pair and compares it alongside the current chart's cl

Indicator v5
Updated 6 weeks ago · MIT GitHub repository of Test Request Security

This indicator trains a single-neuron artificial neural network (perceptron) on each bar to classify price movement and plot an adaptive moving average on the main chart. It evaluates historical sample data to iteratively adjust weights using a step activation

Indicator v5 AI / machine learningMoving averages
Updated 1 year ago · None stated GitHub repository of Machine Learning: Perceptron-Based Strategy

3Commas Bot

by hasnocool
106 stars

This strategy overlays moving averages on the price chart to generate long and short trade signals compatible with 3Commas bot automation. It sets stop losses relative to recent swing pivots buffered by an ATR multiplier, while exits are handled by a risk-to-r

Strategy v5 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of 3Commas Bot
104 stars

This overlay strategy combines a machine-learning distance model with a MACD oscillator to open trades on the price chart. It compares recent history using cosine similarity or Euclidean and Lorentzian distance, then filters direction with selectable moving-av

Strategy v5 AI / machine learningOscillators & momentum
Updated 3 years ago · MIT GitHub repository of MLCEL and MACD Strategy

CCI Background

by be-thomas
65 stars

Calculates a 20-period Commodity Channel Index (CCI) and evaluates its percentile rank over the last 100 bars. It plots the CCI oscillator line in a separate pane alongside a zero level reference. The background dynamically changes using color gradients based

Indicator v5 Oscillators & momentum
Updated 6 days ago · GPL-3.0 GitHub repository of CCI Background

SMA RSI Strategy

by PythonForForex
64 stars

This strategy evaluates simple moving averages and the Relative Strength Index to generate trading signals. It calculates a 10-period SMA, a 30-period SMA, and a 14-period RSI. Long positions are entered when the fast SMA crosses above the slow SMA while RSI i

Strategy v5 TrendOscillators & momentum
Updated 4 years ago · None stated GitHub repository of SMA RSI Strategy

Day Trading Booster

by iamc1oud
56 stars

Day Trading Booster plots session highlights for Sydney, Tokyo, Frankfurt, London and New York sessions on the price chart. It shows opening ranges for selected sessions and day open reference levels derived from ATR. A tabular view displays global forex marke

Indicator v5 Sessions & timeSupport & resistance
Updated 2 months ago · None stated GitHub repository of Day Trading Booster

VWAP (Cumulative)

by milocaetano
48 stars

The VWAP Cumulative indicator calculates and plots a continuous Volume Weighted Average Price directly on the main price chart. Instead of resetting at session or daily boundaries, it computes a running cumulative VWAP using typical price and volume across all

Indicator v5 TrendMoving averages
Updated 3 days ago · MIT GitHub repository of VWAP (Cumulative)
43 stars

This indicator plots the percentage difference between a fast exponential moving average and a slow one, scaled by the close, in a separate pane. It treats that gap as a standardized measure of trend strength and draws a zero line. Users set both EMA lengths a

Indicator v5 Moving averagesOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Standardized MA Difference
43 stars

This strategy calculates support and resistance pivot levels based on short-term open price extremes and combines them with multi-timeframe open prices and MACD indicators. It executes trades with user-defined percentage-based stop-loss and take-profit targets

Strategy v5 Support & resistanceOscillators & momentum Repaints
Updated 2 years ago · None stated GitHub repository of Futures - New Script

All Candlestick Patterns

by TWODS-CAPITAL
37 stars

This indicator detects and labels multiple classic candlestick formations directly on the price chart. It calculates candle body and shadow dimensions relative to exponential moving averages and confirms prevailing trends with simple moving averages. When matc

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of All Candlestick Patterns
24 stars

This indicator plots market structure elements directly on the price chart, identifying internal and swing break of structure and change of character. It calculates bullish and bearish order blocks, equal highs and lows, and swing points while highlighting tre

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 12 days ago · Custom licence GitHub repository of Smart Money Concepts [LuxAlgo] test D

Benso RSI + PMARP

by benso87
24 stars

This indicator plots an RSI and a PMARP line in a separate pane. It calculates RSI from a chosen source and length, then overlays an SMA or EMA signal. Horizontal bull and bear control and critical levels scale the oscillator. Optional arrows mark regular and

Indicator v5 Oscillators & momentumDivergence
Updated 4 years ago · MPL-2.0 GitHub repository of Benso RSI + PMARP
20 stars

This indicator plots John Ehlers's predictive moving average on the price chart. It builds a weighted average of the selected source, applies a second weighted average, and projects a prediction with a slower trigger. It draws the higher of those two series an

Indicator v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of John F. Ehlers - Predictive Moving Average
16 stars

This indicator calculates and plots standard pivot points along with multiple support (S1-S5) and resistance (R1-R5) levels directly on the price chart. Users can select from several calculation methods, including Traditional, Fibonacci, Woodie, Classic, DeMar

Indicator v5 Support & resistance Repaints
Updated 2 years ago · None stated GitHub repository of Pivot Points Standard + TD + TL

Crossing EMAs C

by ruckard
13 stars

Crossing EMAs C is an overlay strategy designed to demonstrate moving average crossover signals integrated with Zignaly alert triggers. Despite its name, the script calculates 14-period and 28-period simple moving averages. It enters a long position when the f

Strategy v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Crossing EMAs C

This indicator calculates a Fear & Greed Index sentiment oscillator and formats its values according to the PineCoders external signal protocol for strategy integration. It outputs protocol-compliant numerical values (+1/-1 for filters, +2/-2 for entries, +3/-

Indicator v5 Oscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of F&G Cycle Signal for Backtesting-Trading Engine

EMA Ribbon (9/21/55) - Eterna

by EternaHybridExchange
9 stars

EMA Ribbon (9/21/55) is a TradingView strategy that calculates three exponential moving averages with periods 9, 21 and 55. It plots the EMAs on the price chart and colors the background ribbon according to bullish or bearish alignment. The strategy enters lon

Strategy v5 TrendMoving averages
Updated 7 months ago · MIT GitHub repository of EMA Ribbon (9/21/55) - Eterna
8 stars

This strategy identifies trend retracements and breakout entries using an adjustable moving average ribbon alongside higher-timeframe anchored moving averages, fractal pivots, and support and resistance level extensions. Bar colors can be customized using a 3-

Strategy v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of Pullback Trading Tool ALT

Inducement

by muammeryldrm42
7 stars

This strategy identifies Smart Money Concepts (SMC) liquidity sweeps around recent pivot highs and lows. It monitors recent candles for false breakouts where price wicks beyond a swing level but closes back within the range. When confirmed by a strong directio

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 3 months ago · MIT GitHub repository of Inducement

BTC Arbitrage

by suyons
7 stars

This indicator tracks and displays Bitcoin price premiums across different exchanges in a dashboard table on the price chart. It calculates the spread and percentage difference between CME Bitcoin futures and Binance BTCUSDT, as well as the Korean kimchi premi

Indicator v5 Screeners & dashboards
Updated 4 months ago · None stated GitHub repository of BTC Arbitrage
7 stars

This indicator plots standard Bollinger Bands alongside scaled Average True Range (ATR) bands directly on the price chart. It is designed to assist traders in identifying price consolidation zones, potential breakout levels, dynamic stops, and take-profit targ

Indicator v5 Moving averagesVolatility & bands
Updated 1 year ago · MPL-2.0 GitHub repository of Bollinger and ATR Bands

This strategy overlays a 90-period simple moving average from the one-hour and four-hour charts with a daily session VWAP on the price chart. It buys when VWAP is at or above the four-hour average and crosses above the one-hour average, and sells short in the

Strategy v5 TrendMoving averages Repaints
Updated 3 years ago · MIT GitHub repository of 4h Bullish Buy 1h Bearish Sell Session

FX Market Sessions

by itmakesyousick
7 stars

This overlay indicator draws up to four Forex trading sessions on the price chart, defaulting to London, New York, Tokyo, and Sydney. Each session uses a chosen timezone and clock range and can show a colored session range, an optional extension, Fibonacci lev

Indicator v5 Sessions & timeSupport & resistance
Updated 3 years ago · None stated GitHub repository of FX Market Sessions

MACD

by trsdn
6 stars

Standard Moving Average Convergence Divergence (MACD) indicator implementation. It calculates the difference between a fast exponential moving average and a slow exponential moving average to form the MACD line. It then smooths the MACD line with a third movin

Indicator v5 Oscillators & momentumMoving averages
Updated 7 days ago · MIT GitHub repository of MACD

Trend Following MOMO

by TradersPost
6 stars

This indicator calculates 8-period and 21-period Exponential Moving Averages to identify trend direction and momentum crossovers on the price chart. When the 8-period EMA crosses above the 21-period EMA, a buy signal triangle is plotted below the bar. A cross

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Trend Following MOMO

SMA Crossover

by DexWilder
4 stars

This strategy plots a fast and a slow simple moving average on the price chart. It enters long when the fast average crosses above the slow average and closes any open short at the same time. It closes the long and enters short when the fast average crosses be

Strategy v5 TrendMoving averages
Updated 3 days ago · None stated GitHub repository of SMA Crossover

RSI Mean Reversion

by latentwill
4 stars

This strategy calculates a short-term Relative Strength Index (RSI) oscillator to identify mean-reverting conditions. It triggers a long entry when the RSI drops below a customizable oversold threshold and a short entry when it rises above an overbought level.

Strategy v5 Oscillators & momentumMean reversion
Updated 8 days ago · None stated GitHub repository of RSI Mean Reversion

This indicator overlays a visual order-flow dashboard on the price chart using left-aligned labels. It shows a buyer-versus-seller percentage gauge, a signed delta reading, a cumulative volume delta value, and an eight-direction momentum compass colored by bul

Indicator v5 Screeners & dashboardsVolume
Updated 2 weeks ago · MIT GitHub repository of GHOST OrderFlow Dashboard — DerivEAPro
4 stars

This indicator identifies liquidity sweeps and stop hunts on price charts by detecting candles that breach recent high or low levels before closing back inside the previous range. Users can filter signals using lookback windows, minimum wick size relative to c

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 11 months ago · Custom licence GitHub repository of Liquidity Sweep Detector [Lab]

Linear Regression Channel

by Hugs-4-Bugs
4 stars

The Linear Regression Channel indicator calculates the slope, average and intercept of a linear regression line over the specified length using the chosen source. It plots the base regression line and upper and lower channels on the price chart. The channels a

Indicator v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Linear Regression Channel

GERMENCIK-AT

by Kalumur
4 stars

This indicator plots custom upper and lower bands on the price chart based on a weighted moving average using hlc3 source, length of 50, and a standard deviation multiplier of 2. It also includes Arnaud Legoux Moving Average with adjustable length, offset, and

Indicator v5 Moving averagesVolatility & bands Repaints
Updated 2 years ago · None stated GitHub repository of GERMENCIK-AT

Calculates Kaufman's Adaptive Moving Average (KAMA) based on Kaufman's Efficiency Ratio to adjust smoothing dynamically according to market volatility and efficiency. Plotted directly on the price chart, it adapts faster during trending markets and slows down

Indicator v5 Moving averagesTrend
Updated 3 years ago · None stated GitHub repository of Kaufman's Adaptive Moving Average (KAMA)

Inside Candle Detector

by might-tree
4 stars

The Inside Candle Detector identifies inside bar candlestick patterns where the current bar's high is lower than the previous bar's high and its low is higher than the previous bar's low. It categorizes inside candles as bullish or bearish based on the bar's o

Strategy v5 Candlestick patterns
Updated 3 years ago · None stated GitHub repository of Inside Candle Detector

Snagprofit WMA

by dearvn
4 stars

Snagprofit WMA is a multi-timeframe trend indicator that calculates a 125-period Weighted Moving Average across the 1-minute, 5-minute, 15-minute, and 1-hour timeframes alongside a local 50-period Simple Moving Average. It identifies momentum signals when pric

Indicator v5 Moving averagesTrend Repaints
Updated 4 years ago · None stated GitHub repository of Snagprofit WMA

Darvas Box AL SAT

by gocaman
3 stars

Calculates Darvas Box upper and lower channel boundaries based on configurable period length to identify trend breakouts. It plots top and bottom box levels directly on the price chart and plots buy (AL) and sell (SAT) signal labels when price crosses outside

Indicator v5 Support & resistanceBreakout
Updated 2 days ago · None stated GitHub repository of Darvas Box AL SAT

ADR % Ranges

by g-moe
3 stars

This indicator computes the Average Daily Range over the last specified number of days and plots the full ADR level along with one-third of the ADR and an anchor line on the price chart. It displays historical ADR levels from prior sessions and a table showing

Indicator v5 Volatility & bandsSupport & resistance
Updated 5 months ago · None stated GitHub repository of ADR % Ranges

Debug Test Generator

by monch1962
3 stars

This indicator collects test data for debugging Pine Script scripts. It gathers input values, output values, conditions, function calls, and edge cases into arrays. Users enable test generation and select types of tests to produce, including unit tests, integr

Indicator v5 Screeners & dashboardsAI / machine learning
Updated 7 months ago · None stated GitHub repository of Debug Test Generator

BTMM Foundation

by jcortes254
3 stars

BTMM Foundation is a Pine Script library providing core utility functions for Beat The Market Maker methodology scripts. It includes exportable functions for session detection across Asian, London, and New York sessions, tracking a three-day market cycle, time

Library v5
Updated 1 year ago · None stated GitHub repository of BTMM Foundation

This indicator marks bullish and bearish harami candlestick patterns on the price chart. The prior candle must have a long body, and the current candle must be a doji or a weak, small candle. A bullish signal also requires a lookback downtrend, while a bearish

Indicator v5 Candlestick patternsTrend
Updated 2 years ago · None stated GitHub repository of Harami Bullish/Bearish Pattern (Candlestick Pattern)
3 stars

The Directional Flow Oscillator combines momentum, cumulative volume delta, price range position, trend ratio, and relative volatility into a single bounded composite indicator. It fetches lower-timeframe volume data to calculate cumulative volume delta and no

Indicator v5 Oscillators & momentumVolume
Updated 2 years ago · GPL-3.0 GitHub repository of Directional Flow Oscillator

Currency Strength Chart

by itmakesyousick
3 stars

This indicator measures and compares the relative strength of major forex currencies including EUR, USD, JPY, GBP, CHF, AUD, CAD, and NZD in a separate pane. It plots individual currency strength as lines or histograms alongside a currency pair strength table.

Indicator v5 Screeners & dashboardsOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Currency Strength Chart
2 stars

This indicator detects trend-following pullback entries using the Rank Correlation Index (RCI) and a triple Exponential Moving Average (EMA) ribbon. It identifies bullish setups when price maintains an upward EMA alignment while RCI reverses from oversold leve

Indicator v5 Oscillators & momentumMoving averages
Updated 2 weeks ago · None stated GitHub repository of Ver16-19 5M Entry Signal

More Pine Script Categories

Browse the whole Pine Library

Third-party code. ForexR lists open-source Pine scripts from GitHub; it did not write, test or endorse them, and their summaries are generated automatically from each script's code and README. Indicators describe the past, and a strategy's backtest can look better than live trading. Check a script on a demo account before you rely on it. CFDs and leveraged forex are complex instruments with a high risk of losing money rapidly.

Learn to Use Pine Scripts

Free, plain-English guides: add a script to TradingView, read what it does, test it and avoid the common traps.

  1. 1Using this librarySearch, filters, licences and what the badges mean.
  2. 2Add a script to TradingViewCopy, paste into the Pine Editor, save and add to chart.
  3. 3Indicators, strategies and librariesWhat each type does and how to tell them apart.
  4. 4Spot a script that repaintsWhy some signals change after the bar closes.
  5. 5Backtest a strategyStrategy Tester settings that keep results honest.
  6. 6Send alerts to MT4 or MT5From a TradingView alert to an order in MetaTrader.
  7. 7What Pine Script isThe language, what it can and cannot do, and where to start.
  8. 8Write your first indicatorA complete script, line by line, in the Pine Editor.
  9. 9Read a script before you trust itA routine for checking inputs, logic and red flags.
  10. 10Edit a script safelyChange colours and lengths, add a filter or an alert.
  11. 11Pine Script alertsalertcondition(), alert(), placeholders and webhooks.
  12. 12Build a crossover strategyAn EMA cross strategy with an ATR stop, ready to test.

Trade Your Charts With a Regulated Broker

Compare regulated brokers on platforms, spreads, minimum deposit and leverage.

Compare brokers