Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 4)

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

Imbalance + 3EMA

by linkcla
4 stars

This overlay indicator plots three exponential moving averages on the price chart and marks imbalance zones with boxes. Each EMA has its own length, color, and visibility toggle, with defaults of 10, 50, and 200. Fair value gaps are detected across three bars

Indicator v5 Moving averagesSMC / ICT / price action
Updated 2 years ago · None stated GitHub repository of Imbalance + 3EMA

POC & Volume Profile

by ChiefTechDev
4 stars

Calculates and plots a horizontal volume and price distribution profile across user-defined row bins directly on the price chart. It measures price activity between high and low boundaries, tallies price occurrences or volume per level, and draws color-gradien

Indicator v5 VolumeSupport & resistance Repaints
Updated 2 years ago · None stated GitHub repository of POC & Volume Profile
4 stars

This strategy executes trend-following trades based on Bollinger Band breakouts confirmed by a long-term moving average filter. A long position opens when the price crosses above the upper Bollinger Band, provided the band spread meets a minimum threshold and

Strategy v5 Volatility & bandsTrend
Updated 2 years ago · None stated GitHub repository of Bollinger Trend - Strategy V1
4 stars

This overlay strategy combines a Supertrend with a k-nearest-neighbors filter. It smooths price and the Supertrend with weighted moving averages, then uses neighbor count and lookback length to form an AI trend signal. Traders can allow long, short, or both di

Strategy v5 TrendVolatility & bands
Updated 2 years ago · None stated GitHub repository of AI Volume Supertrend Strategy

3 Bar Gap

by kevinhhl
4 stars

The 3 Bar Gap indicator identifies fair value gaps and price imbalances across a three-bar pattern directly on the price chart. It calculates displacement between the price boundaries of two bars ago and the current bar. To filter out market noise during quiet

Indicator v5 SMC / ICT / price actionVolatility & bands
Updated 3 years ago · None stated GitHub repository of 3 Bar Gap
4 stars

This TradingView indicator provides scalping money management tools by displaying a customizable panel on the chart. It shows risk management details such as deposit size, maximum risk per trade as a percentage, and commission adjustments. The indicator plots

Indicator v5 ScalpingScreeners & dashboards
Updated 3 years ago · MIT GitHub repository of Scalping Money Management
4 stars

Calculates a 5-period Exponential Moving Average (EMA) to identify short and long trade setups based on price distance from the average. It triggers entries when price breaks the high or low of an alert candle that formed completely outside the 5 EMA. The stra

Strategy v5 Moving averagesBreakout
Updated 3 years ago · None stated GitHub repository of 5 EMA Strategy: Power of Stocks
4 stars

This indicator plots a separate-pane oscillator from a user-selected source. Named presets and a custom mode set the low-pass period, lookback, and Tr values used by the oscillator. The period is then scaled by hour, day, week, or month multipliers selected fr

Indicator v5 Oscillators & momentum
Updated 3 years ago · None stated GitHub repository of Boom Hunter - Oscillator

Bollinger Bands

by bfoura
4 stars

This indicator calculates standard Bollinger Bands using a simple moving average and standard deviation multiplier. Instead of plotting continuous band lines, it evaluates whether the current price trades within a configurable threshold distance of the band bo

Indicator v5 Volatility & bandsMean reversion
Updated 4 years ago · None stated GitHub repository of Bollinger Bands
4 stars

This strategy plots custom upper and lower bands on the price chart using configurable moving average types and deviation multipliers. It opens long or short positions when price crosses above or below these envelopes, with optional RSI oscillator filters for

Strategy v5 Volatility & bandsMoving averages
Updated 4 years ago · MIT GitHub repository of Bollinger Bands Strategy
4 stars

Snag - Detect Bull Bear is an indicator that identifies bull and bear market phases on the price chart. It uses a customizable ZigZag to detect trend reversals, tracking high and low points. The script applies Fibonacci-based rules to confirm breakout shifts b

Indicator v5 TrendSupport & resistance
Updated 4 years ago · None stated GitHub repository of Snag - Detect Bull Bear
4 stars

Leonidas Trend Following System is a trend following indicator that plots key, long-term, and short-term exponential moving averages directly on the price chart. It calculates trend signals through EMA crossovers and price changes relative to the center line,

Indicator v5 TrendOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Leonidas Trend Following System

EMA and ADX v1

by aofwittawat
4 stars

This indicator calculates an Exponential Moving Average (EMA) and an Average Directional Index (ADX) to signal trend entries and exits directly on the price chart. It triggers a long signal when the close is above the EMA and a short signal when below, optiona

Indicator v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of EMA and ADX v1

ALMA Tarama

by gocaman
3 stars

This indicator plots an Arnaud Legoux moving average on the price chart and colors it by slope. It marks an entry label when the average turns up and an exit label when it turns down, and it fires matching alerts. A separate exponential moving average is drawn

Indicator v5 Moving averagesTrend
Updated yesterday · None stated GitHub repository of ALMA Tarama
3 stars

This strategy plots Bollinger Bands on the price chart and enters long only when flat. It buys on a strong bullish close above the middle band or on a small-body pullback that tags the middle band with a long lower wick. The stop sits below the signal bar by a

Strategy v5 Volatility & bandsBreakout
Updated 2 days ago · None stated GitHub repository of H4 布林ATR型態多單策略

GBPUSD H1 QuadLayer

by GifariKemal
3 stars

An institutional order block and EMA pullback indicator designed for GBPUSD on the 1-hour timeframe. It filters trading signals based on specific London and New York session kill zones, ATR volatility thresholds, signal quality metrics, and day or hour multipl

Indicator v5 SMC / ICT / price actionMoving averages
Updated 4 days ago · MIT GitHub repository of GBPUSD H1 QuadLayer
3 stars

The strategy plots SuperTrend and ADX indicators directly on the price chart. It generates long signals on SuperTrend bullish flips combined with ADX above the set threshold and closes positions on SuperTrend bearish flips or when stop-loss or take-profit leve

Strategy v5 TrendOscillators & momentum
Updated 12 days ago · None stated GitHub repository of OctaStack SuperTrend + ADX

This indicator calculates a multi-timeframe MACD line alongside signal lines and volatility bands in a separate chart pane. It offers nine customizable moving average types, including SMA, EMA, DEMA, TEMA, Hull MA, Volume Weighted MA, and Least Squares MA. Use

Indicator v5 Oscillators & momentumMoving averages
Updated 4 weeks ago · None stated GitHub repository of MACD Bands - Multi Timeframe [TradeMaster Lite]

This strategy combines fractal-based supply and demand order blocks with Awesome Oscillator divergence detection. It generates long signals when price interacts with a demand zone alongside a confirmed bullish divergence, and short signals at supply zones with

Strategy v5 SMC / ICT / price actionOscillators & momentum
Updated 5 weeks ago · None stated GitHub repository of Combined Strategy - Supply/Demand + AO Divergence
3 stars

This strategy implements a daily Bitcoin trend-following system combining exponential moving averages (EMA 25, 52, and 144) with daily and 4-hour MACD indicators. It triggers long and short positions based on EMA alignments, zero-line momentum segments, and hi

Strategy v5 TrendOscillators & momentum
Updated 7 weeks ago · None stated GitHub repository of BTC 1D MACD 回测对比

AI Bot - Manual Alerts

by thanhcong1211
3 stars

AI Bot - Manual Alerts is an overlay indicator that scores buy and sell conditions from optional MACD, EMA, RSI, and break-of-structure checks. It treats the share of enabled conditions that fire as a confidence value and sends a JSON buy or sell alert once pe

Indicator v5 Oscillators & momentumMoving averages Repaints
Updated 3 months ago · None stated GitHub repository of AI Bot - Manual Alerts

Mc War

by tuanmcwar
3 stars

The Mc War indicator identifies Smart Money Concepts market structure elements directly on the main price chart. It detects swing highs and lows using pivot calculations to label higher highs, lower highs, higher lows, and lower lows. The script draws lines an

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 4 months ago · None stated GitHub repository of Mc War
3 stars

The Buy/Sell Position Strategy combines a long-term Exponential Moving Average (EMA) with a short-term Relative Strength Index (RSI) to capture pullbacks in an uptrend. It enters a long position on the price chart when the price is above the EMA filter and the

Strategy v5 TrendOscillators & momentum
Updated 4 months ago · None stated GitHub repository of Buy/Sell Position Strategy

MTF Confluence Dashboard

by WiseManAlgo
3 stars

This indicator calculates a multi-timeframe trend and momentum score across five configurable timeframes for up to three symbols. It evaluates price relative to a fast EMA along with RSI momentum, weighting each timeframe to generate a normalized confluence sc

Indicator v5 Screeners & dashboardsTrend
Updated 4 months ago · None stated GitHub repository of MTF Confluence Dashboard
3 stars

The Linchuan Event Indicator plots multi-timeframe opening price zones alongside key moving averages and Bollinger Bands in a separate indicator pane. It tracks opening price lines and colored expansion zones across 5-minute, 30-minute, 1-hour, and 4-hour time

Indicator v5 Support & resistanceMoving averages
Updated 5 months ago · None stated GitHub repository of Linchuan Event Indicator
3 stars

This indicator measures the percentage change of the close over a configurable lookback and compares it with a breakout threshold. It marks upward and downward momentum regimes with a faint background tint on the price chart, plots a translucent close line, an

Indicator v5 Oscillators & momentumBreakout
Updated 6 months ago · None stated GitHub repository of Polymarket Overlay (trader-ai)

DIY Entry Signals

by benso87
3 stars

This indicator plots optional moving averages on the price chart and generates entry signals based on custom conditions from multiple technical indicators. Users select which indicators contribute to long or short signals, choose confirmation of candles, and c

Indicator v5 Oscillators & momentumMoving averages
Updated 6 months ago · MPL-2.0 GitHub repository of DIY Entry Signals

CryptoSwarmStrategy

by aegntic
3 stars

CryptoSwarmStrategy is a chart overlay strategy that enters long when a fast EMA crosses above a slow EMA, RSI is below the oversold level, and volume exceeds its 20-bar average. It enters short on the opposite EMA cross with RSI above overbought and the same

Strategy v5 Moving averagesOscillators & momentum
Updated 6 months ago · MIT GitHub repository of CryptoSwarmStrategy

AI Debug Helper

by monch1962
3 stars

AI Debug Helper is a Pine Script indicator that provides AI-powered debugging suggestions for PineScript code. It loads a simulated database of common error patterns such as series index out of bounds, division by zero, Na propagation, infinite loops, and best

Indicator v5 AI / machine learningScreeners & dashboards
Updated 7 months ago · None stated GitHub repository of AI Debug Helper

GainzAlgo EA

by saadkhan371
3 stars

GainzAlgo EA is a trend-following strategy designed for scalping and intraday trading, optimized for gold and liquid assets. It establishes trend direction using a three-EMA alignment alongside RSI momentum filters and an optional higher-timeframe trend confir

Strategy v5 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of GainzAlgo EA
3 stars

This strategy calculates standard Bollinger Bands and Average True Range to implement a basic mean-reversion system. It opens long positions when price drops below the lower band and short positions when price pierces above the upper band. Open trades are exit

Strategy v5 Mean reversionVolatility & bands
Updated 7 months ago · MIT GitHub repository of Bollinger Band Mean Reversion

RitstaR-Algo

by ritstar
3 stars

This overlay indicator scores each confirmed bar from zero to six using fast, slow, and trend EMAs, higher-timeframe bias, RSI, MACD, ATR, and volume. It plots buy and sell labels when the score meets the minimum entry threshold and exit labels when the opposi

Indicator v5 TrendOscillators & momentum
Updated 8 months ago · None stated GitHub repository of RitstaR-Algo
3 stars

This indicator plots a fast and a slow exponential moving average on the price chart and marks buy and sell signals for Bitcoin scalping. A buy appears when the fast EMA crosses above the slow EMA, RSI is above its buy threshold, the MACD line is above its sig

Indicator v5 TrendOscillators & momentum
Updated 1 year ago · MIT GitHub repository of BTC 1–5 min Scalping Signals

ATR-SB Algo

by TheMikerik
3 stars

This indicator tracks market trends using an ATR trailing line derived from close prices and a risk multiplier, inspired by the UT Bot algorithm. It plots the trailing line directly on the price chart, identifies bullish and bearish regime flips, highlights si

Indicator v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of ATR-SB Algo

Brahmāstra

by HelloMoto069
3 stars

Brahmāstra plots a fixed 10-period exponential moving average on the price chart and marks candles that sit entirely beyond it. A red candle whose low is above the average gets a cross, and a later green candle that opens below and closes above that candle's h

Indicator v5 Moving averagesCandlestick patterns
Updated 1 year ago · None stated GitHub repository of Brahmāstra

This strategy combines volume surge detection, Fibonacci retracements, moving averages, and ATR volatility for trade execution. Long positions trigger when price exceeds the 0.618 Fibonacci level, price stays above a 200-period SMA, a fast EMA crosses above a

Strategy v5 TrendMoving averages
Updated 1 year ago · MIT GitHub repository of Optimized Volume + Fibonacci + Trend + ATR Strategy

This indicator plots a fast and a slow simple moving average on the price chart and marks a buy when the fast average crosses above the slow average and a sell when it crosses below. It creates alert conditions that send structured JSON messages with the signa

Indicator v5 Moving averages
Updated 1 year ago · MIT GitHub repository of Moving Average Crossover with External URL Notification

200DMA Entry

by FinDeckDao
3 stars

The 200DMA Entry strategy plots the 200-day simple moving average on the price chart. It generates long signals when the close crosses above the 200 MA on the prior bar. Positions are sized at 1 percent of account equity. The strategy exits at a 2.5 times take

Strategy v5 Moving averagesTrend
Updated 1 year ago · MIT GitHub repository of 200DMA Entry
3 stars

This strategy template overlays a demonstration system of Parabolic SAR, regression channels, and Supertrend on the price chart while packaging TV-Hub webhook commands. It generates buy, sell, and close alert messages for selected crypto exchanges. Inputs set

Strategy v5 TrendSupport & resistance Repaints
Updated 2 years ago · MIT GitHub repository of TV-Hub Boilerplate / Template Strategy

VSA Wyckoff Volume

by codingfordummies911
3 stars

Calculates a Wilder's moving average on volume to categorize activity into six distinct levels ranging from Ultra High to Very Low based on user-defined ratio thresholds. It plots volume as color-coded histogram columns in a separate pane to help identify volu

Indicator v5 Volume
Updated 2 years ago · None stated GitHub repository of VSA Wyckoff Volume
3 stars

This indicator detects and highlights Doji candlestick patterns directly on the price chart. It checks whether the absolute difference between the candle's open and close prices falls below a user-defined threshold relative to the closing price. The script dif

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Doji (Candlestick Pattern)
3 stars

This strategy opens a long base order and preplaces up to seven limit safety orders below entry, increasing size by a volume scale as price falls. It recalculates an average entry and closes the whole position when price reaches a take-profit percentage above

Strategy v5 Mean reversionSupport & resistance
Updated 2 years ago · Custom licence GitHub repository of Fibonacci Martingale Strategy

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