Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 21)

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

3 stars

This strategy plots a fast and a slow exponential moving average on the price chart and shades the background by which average is higher. It enters a long position when the fast average crosses above the slow average and closes that long when the fast average

Strategy v5 TrendMoving averages
Updated 7 months ago · MIT GitHub repository of EMA Crossover Trend Following
3 stars

BTMM Comprehensive Risk Management is an overlay indicator that calculates position sizing, stop loss levels, and multiple take profit targets based on the Beat The Market Maker methodology. It supports various stop loss methods including ATR, EMA, Asian Range

Indicator v5 Support & resistanceScreeners & dashboards

MOTO ka AgniAstra

by HelloMoto069
3 stars

MOTO ka AgniAstra is a price-chart overlay that smooths the selected source with a Gaussian window and draws upper and lower bands from a scaled mean absolute error. When repainting smoothing is on, it recalculates the curve across recent bars and marks band c

Indicator v5 Volatility & bandsTrend Repaints
Updated 1 year ago · None stated GitHub repository of MOTO ka AgniAstra

Sapphire FiboBands Strategy

by sapphire-edge
3 stars

This strategy plots Fibonacci Bollinger Bands on the price chart. It generates buy and sell signals based on selected Fibonacci ratios (1.618, 2.618, or 4.236) combined with Bollinger Band calculations using a configurable source and length. Trades enter on ma

Strategy v5 Volatility & bandsSupport & resistance
Updated 1 year ago · None stated GitHub repository of Sapphire FiboBands Strategy

This indicator marks bullish and bearish engulfing candlestick patterns on the price chart. A bullish signal needs a bullish candle after a bearish candle, a high-low range that covers the previous bar, and a floored body that covers the previous body. A beari

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Engulfing Bullish/Bearish (Candlestick Pattern)

Supertrend Strategy

by imzeeshan
3 stars

This systematic trend-following strategy executes long trades based on Supertrend indicator flips. Entry occurs when the Supertrend direction turns bullish, provided the date range and optional benchmark filter are satisfied. The benchmark filter verifies whet

Strategy v5 TrendVolatility & bands
Updated 2 years ago · MIT GitHub repository of Supertrend Strategy

This time-based strategy trades overnight holding periods on the New York Stock Exchange, plotting execution labels directly on the price chart. It triggers a fixed long entry ten minutes before the regular session ends at 15:50 New York time. The strategy exe

Strategy v5 Sessions & time
Updated 2 years ago · GPL-3.0 GitHub repository of Buy Before Close, Sell After Open (NYSE)

This indicator plots the Relative Strength Index and Money Flow Index together in a separate pane. It calculates both oscillators using user-defined lookback lengths and price source inputs. Horizontal reference lines mark standard levels at twenty, fifty, and

Indicator v5 Oscillators & momentumVolume
Updated 2 years ago · MIT GitHub repository of Relative Strength Index And Money Flow Index

This strategy overlays a linear regression channel and two moving averages on the price chart. It uses the regression deviation and optional Supertrend ATR filter to qualify direction, and can enter on a moving-average cross when that option is enabled. Long t

Strategy v5 TrendMoving averages Repaints
Updated 3 years ago · None stated GitHub repository of Fedra Algotrading Strategy Trailing Stop

Currency Strength Chart

by itmakesyousick
3 stars

Calculates and plots the relative strength of eight major forex currencies in a separate pane using logarithmic price differences across currency pairs. It visually displays relative currency performance using customizable lines, histograms, or dynamic table o

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

Greeffer's Hedge Mode Study is an indicator that plots multiple EMAs along with Donchian channels directly on the price chart. It calculates EMAs from 8, 17 and 72 periods using higher timeframe data from 240 minutes. The script monitors price action against t

Indicator v5 Moving averagesSupport & resistance
Updated 4 years ago · CC0-1.0 GitHub repository of Greeffer's Hedge Mode Study
2 stars

This indicator detects and draws trendlines, zones, and neutral bands directly on the price chart. It generates long and short breakout signals when price breaches detected trendlines, displaying configurable target and stop-loss lines based on an adjustable r

Indicator v5 BreakoutSupport & resistance
Updated 7 months ago · None stated GitHub repository of SilverHawk Trendline Breakouts

Alper

by avatar-lavventura
2 stars

Alper is a trend-following strategy based on a custom volatility stop calculation using the Average True Range. It tracks price extremes and computes a trailing stop level to determine market direction. When the price trades above the volatility stop, the scri

Strategy v5 TrendVolatility & bands
Updated 7 months ago · None stated GitHub repository of Alper
2 stars

This strategy calculates MACD, ADX trend strength, ATR, and a rolling VWAP resetting at fixed bar intervals. It plots the VWAP line, stop loss levels, and profit targets directly on the price chart. Long positions enter when MACD crosses above its signal line

Strategy v5 TrendOscillators & momentum Repaints
Updated 8 months ago · MIT GitHub repository of MACD & VWAP Strategy with ATR SL/Targets

Smart Money / LIT - M1 Structure & OB

by ifreddyman2014-tech
2 stars

This overlay indicator marks market structure on the price chart. It finds swing highs and lows with a configurable pivot length, flags displacement candles whose body exceeds the recent average body by a set factor, and can label breaks of structure. It also

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 8 months ago · None stated GitHub repository of Smart Money / LIT - M1 Structure & OB

Mean Reversion

by nxtaiapp
2 stars

This strategy executes mean-reversion trades using Bollinger Bands combined with a fast RSI oscillator and MACD confirmation. It enters long or short positions when price reaches band extremes during oversold or overbought RSI levels, with optional MACD trend

Strategy v5 Mean reversionScalping
Updated 11 months ago · MIT GitHub repository of Mean Reversion
2 stars

This strategy is written for Bitcoin and draws on the price chart. It combines moving averages, an SSL channel, ADX, RSI, stochastic, and a volume oscillator with high-volume thresholds to generate buy and sell signals. Users can limit testing to a date range

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of TLC_STRATEGY_EMARSIADX for BTC
2 stars

This strategy overlays Bollinger Bands and Keltner Channels on the price chart alongside an internal KDJ oscillator. It identifies a volatility squeeze when Bollinger Bands contract inside the Keltner Channels. Long entries trigger after price closes below the

Strategy v5 Volatility & bandsOscillators & momentum
Updated 1 year ago · None stated GitHub repository of BB-Keltner Squeeze with KDJ strategy

QQE MOD 副图指标

by iceberg211
2 stars

This indicator calculates a dual Quantitative Qualitative Estimation (QQE) momentum oscillator alongside Bollinger Bands in a separate pane. It computes smoothed Relative Strength Index values paired with Wilder-style ATR trailing bands across two independent

Indicator v5 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of QQE MOD 副图指标
2 stars

Multi-Indicator Trading System plots 50-period and 200-period exponential moving averages alongside buy and sell signals directly on the price chart. Signals trigger when a short-timeframe EMA crossover aligns with higher timeframe trend filters from 1-hour or

Indicator v5 TrendMoving averages Repaints
Updated 1 year ago · MIT GitHub repository of Multi-Indicator Trading System

HAZZONES

by ashwagamma
2 stars

This indicator plots support and resistance zones on the price chart using Heikin Ashi data. It detects strong bullish and bearish trends by counting consecutive Heikin Ashi candles that meet specific body and wick conditions. Up to 15 support and 15 resistanc

Indicator v5 Support & resistanceCandlestick patterns
Updated 1 year ago · None stated GitHub repository of HAZZONES

Whale Detector

by scallywag41
2 stars

This indicator highlights bars with unusually high trading activity by comparing current volume against a simple moving average. It triggers a detection flag when volume exceeds a user-defined multiple of the average volume and also surpasses an absolute block

Indicator v5 Volume
Updated 2 years ago · None stated GitHub repository of Whale Detector
2 stars

Calculates higher timeframe Exponential Moving Averages, Average True Range, and optional RSI momentum filters to determine market regimes. Enters long positions during bullish regimes and allows scaling in through pyramiding as price advances by a user-define

Strategy v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Bitcoin Regime Pyramid Strategy

Mc War OB + EMA

by tuanmcwar
2 stars

Plots 34-period and 89-period exponential moving averages alongside Smart Money Concept order blocks directly on the price chart. It visualizes bullish and bearish order block zones as customizable boxes, identifies confluence between order blocks and fair val

Indicator v5 SMC / ICT / price actionMoving averages
Updated 2 years ago · None stated GitHub repository of Mc War OB + EMA
2 stars

Relarive Strength Index calculates the RSI oscillator using a configurable source such as close prices, a period length, and an offset value. It plots the RSI line directly on the price chart along with dotted horizontal lines marking overbought at 80 and over

Indicator v5 Oscillators & momentum
Updated 2 years ago · Apache-2.0 GitHub repository of Relarive Strength Index
2 stars

Weekend Trend Trader Overlay plots a 20-bar highest close as a resistance line and a ratcheting trailing stop on the price chart. It reads a chosen index, by default NASDAQ:NDX, on the chart timeframe and compares that close with a 10-bar simple moving average

Indicator v5 TrendSupport & resistance
Updated 2 years ago · None stated GitHub repository of Weekend Trend Trader Overlay
2 stars

Combined Candle Counter overlays multiple technical analysis tools directly onto the price chart. It features configurable EMA and SMA moving average presets with automated toggles based on intraday, daily, or weekly timeframes. The indicator draws 52-week hig

Indicator v5 Moving averagesSupport & resistance Repaints
Updated 2 years ago · MIT GitHub repository of Combined Candle Counter

Saty Pivot Ribbon

by mikah13
2 stars

Saty Pivot Ribbon plots a three-EMA ribbon on the price chart to show trend direction and dynamic support or resistance. Fast, pivot, and slow exponential moving averages form two colored clouds that switch between bullish and bearish colors. Optional convicti

Indicator v5 TrendMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of Saty Pivot Ribbon

HTF Candles & Pivots

by itmakesyousick
2 stars

This multi-functional indicator overlays higher timeframe (HTF) candles directly on the main chart alongside custom pivot points and an anchored Volume Profile. It calculates pivot levels from R5 to S5, Central Pivot Range (CPR), and price range forecasts whil

Indicator v5 Support & resistanceVolume
Updated 3 years ago · None stated GitHub repository of HTF Candles & Pivots
2 stars

This indicator plots a momentum-based ZigZag on the price chart from a QQE calculation driven by a multi-timeframe RSI. It marks bullish and bearish ZigZag segments, optional divergence and convergence between price and that RSI, and an optional Supertrend lin

Indicator v5 Oscillators & momentumDivergence
Updated 3 years ago · None stated GitHub repository of Modified Momentum QQE-ZigZag
2 stars

[CBB] MTF Penta RSI Strategy is an overlay strategy that tracks momentum across multiple time horizons using five distinct Relative Strength Index (RSI) calculations: a smoothed 4-period RSI, alongside 14, 30, 70, and 120-period RSIs. It evaluates whether thes

Strategy v5 Oscillators & momentumTrend
Updated 3 years ago · None stated GitHub repository of [CBB] MTF Penta RSI Strategy

Sassiz Ichimoku

by sassiz-root
2 stars

This overlay strategy plots a full Ichimoku set on the price chart: Tenkan, Kijun, displaced Chikou, and Senkou Spans A and B with a colored cloud. It marks a long when a confirmed Tenkan cross above Kijun occurs with price and Chikou above the lines and cloud

Strategy v5 TrendOscillators & momentum
Updated 3 years ago · MIT GitHub repository of Sassiz Ichimoku

The script computes a Nadaraya-Watson kernel regression estimate using a rational quadratic kernel on the input source. It plots the estimate as a line on the price chart. Bullish and bearish color changes occur when the estimate crosses or reverses direction

Indicator v5 TrendMoving averages
Updated 3 years ago · None stated GitHub repository of Nadaraya-Watson: Rational Quadratic Kernel Non-Repainting

My Strategy

by storm0611
2 stars

The script implements a basic moving average crossover trading strategy directly on the price chart. It calculates a 14-period and a 28-period simple moving average (SMA) and plots them as green and red circles. It enters a long position when the fast SMA cros

Strategy v5 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of My Strategy

LevelZ

by ClimberMel
2 stars

LevelZ plots key session-based price levels directly on the main price chart. It calculates and displays the open, high, and low of the current regular trading hours (RTH) session, the overnight session high and low, and yesterday's RTH open, high, low, and cl

Indicator v5 Support & resistanceSessions & time Repaints
Updated 4 years ago · MIT GitHub repository of LevelZ

Impulse

by DaniilOkrug
2 stars

Impulse marks the start of a two-candle bullish or bearish push on the price chart when the second candle stays beyond a Fibonacci fraction of the first candle's range. It tracks each move's high and low, cancels the setup if price crosses back through the cho

Indicator v5 Candlestick patternsSupport & resistance
Updated 4 years ago · MIT GitHub repository of Impulse
1 stars

Marks buy and sell signals on the price chart using a 50 and 200 EMA trend filter, an optional weekly trend confirmation, volume spikes against a moving average and RSI levels. Two buy styles can be enabled: accumulation after a bottom, and momentum breakout.

Indicator v5 TrendBreakout
Updated 2 days ago · None stated GitHub repository of Institutional Buy & Sell v6

Calm Kamaz

by Va3elina
1 stars

A one-minute strategy for perpetual crypto contracts that buys sharp drops. Entry needs a low RSI on three-minute candles, a price a set percentage below the hourly high, and a fall over two hours. Up to six larger buys can follow lower down a fixed ladder, an

Strategy v5 Mean reversionScalping Repaints
Updated 2 days ago · None stated GitHub repository of Calm Kamaz

Imbalance

by teshmi9z-beep
1 stars

An indicator that highlights imbalances, or fair value gaps, with yellow boxes on the price chart. It looks at three-bar sequences and draws a box where the low of one bar and the high of the bar two candles later do not overlap, in either direction. A strict

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 days ago · MIT GitHub repository of Imbalance

AIO Blue

by jometa9
1 stars

A forex-oriented overlay that shades up to three trading sessions, by default New York, London and Tokyo, with optional range boxes, trendlines, mean lines, session VWAP and high and low markers for each. It also contains simple price alerts for EURUSD and GBP

Indicator v5 Sessions & time
Updated 5 days ago · None stated GitHub repository of AIO Blue

EMA 20/50 Cross

by quantxaashish
1 stars

This indicator calculates 20-period and 50-period exponential moving averages (EMAs) to identify trend direction and crossover signals. It plots both EMA lines directly on the chart and displays visual shape markers below or above price bars whenever a bullish

Indicator v5 Moving averagesTrend
Updated 2 weeks ago · MIT GitHub repository of EMA 20/50 Cross

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