Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 32)

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

Predicted Gold Signals

by XingHan98
1 stars

An overlay indicator for a five-minute gold chart that stops with an error on any other timeframe. At 08:00 and 19:00 Singapore time on weekdays it draws a buy and a sell entry line from the prior close with fixed offsets, a fixed dollar stop, and three take p

Indicator v5 Support & resistanceSessions & time
Updated 2 months ago · None stated GitHub repository of Predicted Gold Signals

GrimmHA Strategy Indicator

by GreyssonEnterprises
1 stars

An indicator that combines Heikin-Ashi candle recognition, doji detection and four smoothed moving averages with lengths of 21, 50, 100 and 200. It can show entry signals, trade levels, background colours and a statistics table, with a risk-to-reward ratio and

Indicator v5 Candlestick patternsMoving averages
Updated 3 months ago · MIT GitHub repository of GrimmHA Strategy Indicator

A/D Context v20.7

by VVASILEVSS
1 stars

A Pine v5 indicator in a separate pane built on Williams or Chaikin accumulation and distribution flow, a smoothing EMA, Chaikin Money Flow and ATR. It detects divergences between price and flow pivots, with cooldown bars and optional confirmation after the di

Indicator v5 DivergenceVolume
Updated 3 months ago · None stated GitHub repository of A/D Context v20.7
1 stars

A separate-pane indicator that estimates delta from each candle by adding volume on up candles and subtracting it on down candles, accumulates it into a cumulative value, and converts that to a Z-score over a rolling window. A histogram is coloured by whether

Indicator v5 VolumeOscillators & momentum
Updated 3 months ago · None stated GitHub repository of Detrended CVD Z-Score Oscillator

Fractal Sweep

by abhinaynatraj
1 stars

An indicator for futures that finds a sweep of a prior higher-timeframe candle's high or low, a return, and a change in state of delivery (CISD) confirmation, then draws the trade setup. It places entry, stop at the sweep extreme or CISD level and an R:R targe

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 3 months ago · None stated GitHub repository of Fractal Sweep

MTF RSI Signals

by iyoshikawa
1 stars

This indicator plots multi-timeframe RSI signals on the price chart. It calculates a smoothed RSI using short and long periods with EMA smoothing, then applies a Stoch filter for direction changes. Signals trigger on crossovers and levels, combined with ADX tr

Indicator v5 Oscillators & momentumTrend Repaints
Updated 5 months ago · None stated GitHub repository of MTF RSI Signals

Talons Ichimoku Breakout

by muammeryldrm42
1 stars

A strategy that computes Tenkan, Kijun and both Senkou lines from highest and lowest midpoints and plots the cloud with a coloured fill. It goes long when price is above the cloud, Tenkan crosses above Kijun and the cloud is green, and short on the mirrored co

Strategy v5 TrendBreakout
Updated 5 months ago · None stated GitHub repository of Talons Ichimoku Breakout

EMA + Trend + Liquidity

by kvmafthab-pixel
1 stars

This overlay plots a four-length exponential moving average ribbon and classifies trend on the price chart. It marks strong bullish when the 21-period average is above the 50 and 200 with a positive short slope, strong bearish when that stack is reversed, and

Indicator v5 TrendMoving averages
Updated 5 months ago · Custom licence GitHub repository of EMA + Trend + Liquidity

Eminiplayer Zones

by onlyspx
1 stars

This indicator turns pasted text lines of low price, high price and a zone label into horizontal zones on the price chart, for S&P 500 futures or index charts. For index symbols it subtracts a configurable futures-to-index spread from the zone prices. It can a

Indicator v5 Support & resistanceSessions & time
Updated 6 months ago · None stated GitHub repository of Eminiplayer Zones

High Margin Pro

by Sandesh30-cloud
1 stars

High Margin Pro is a long-only chart strategy. It plots a 50-period EMA, a 200-period EMA, and a 60-minute 200-period EMA. A long entry requires the fast EMA above the slow EMA, price above the higher-timeframe EMA and within one ATR below the fast EMA, an RSI

Strategy v5 TrendMoving averages
Updated 6 months ago · None stated GitHub repository of High Margin Pro

Order Blocks Only

by cavaldos
1 stars

Draws internal and swing order blocks as shaded boxes on the price chart, a stripped-down version of a smart money concepts tool. Block size is filtered either by ATR or by cumulative mean range, and a block is mitigated when price crosses it by close or by hi

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 6 months ago · None stated GitHub repository of Order Blocks Only

Kalman Filter

by Teerth1
1 stars

Applies a Kalman filter to the chosen price source to produce a smoothed estimate of the underlying price level, drawn on the main chart. Process noise and measurement noise inputs control how quickly the line adapts versus how smooth it is. Optional uncertain

Indicator v5 TrendMean reversion
Updated 6 months ago · None stated GitHub repository of Kalman Filter
1 stars

MACD Divergence - Reversal Hunter detects regular and hidden divergences between price action and the MACD line using pivot points. It generates buy signals on bullish divergences and sell signals on bearish divergences, with optional RSI filter for overbought

Strategy v5 DivergenceOscillators & momentum
Updated 8 months ago · None stated GitHub repository of MACD Divergence - Reversal Hunter
1 stars

A separate-pane indicator that studies how volume behaves around potential reversals. It measures volume relative to its average and its short-term trend, a delta volume proxy from candle colour, rate-of-change velocity and deceleration, and volume-price diver

Indicator v5 VolumeDivergence
Updated 8 months ago · MIT GitHub repository of Volume-Price Reversal Filter

ML KNN Predictor V2 Enhanced

by haydarkadioglu
1 stars

Calculates machine learning price predictions using a weighted K-Nearest Neighbors algorithm. It evaluates price position, trend, RSI, volatility, Fair Value Gaps, Support and Resistance levels, and volume to identify similar historical pattern matches. The in

Indicator v5 AI / machine learningSMC / ICT / price action
Updated 8 months ago · None stated GitHub repository of ML KNN Predictor V2 Enhanced
1 stars

A Pine v5 strategy that draws trendlines through confirmed swing highs and lows on the price chart. Swing pivots are confirmed after a set number of bars to the right, and a minimum slope angle removes flat lines. A trade mode setting chooses between breakout

Strategy v5 Support & resistanceBreakout
Updated 8 months ago · None stated GitHub repository of ATTraderAlgo Auto Trendline Trader

MNQ Gamma (1DTE)

by Juice-zhi
1 stars

A price-chart overlay that draws a static set of options gamma levels for MNQ (Micro Nasdaq-100 futures, scaled from QQQ options) expiring in one day. The center line and the one and two standard deviation bands are hardcoded numbers from a snapshot dated 2026

Indicator v5 Support & resistance
Updated 8 months ago · None stated GitHub repository of MNQ Gamma (1DTE)

ICT Premium/Discount

by Ahmed1926
1 stars

An overlay indicator that draws a premium and discount range on the chart, starting from a user-chosen date. It can show the range high and low with price text, a midline at the equilibrium level, optional 25 and 75 percent quartile lines, an optimal trade ent

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 9 months ago · None stated GitHub repository of ICT Premium/Discount

Draws dashed horizontal lines at the highs and lows of previous days, weeks and months on the price chart. Each period has its own colour and a lookback count for how many past periods to show. An optional gradient fades older levels, and projections extend pr

Indicator v5 Support & resistanceSessions & time Repaints
Updated 9 months ago · MPL-2.0 GitHub repository of Daily Weekly Monthly Highs & Lows
1 stars

The Multi-Symbol Dashboard indicator overlays a customizable panel on the price chart to monitor up to six cryptocurrency symbols at once. It displays RSI, MACD histogram, EMA values, percentage price change and volume data fetched via request.security for sym

Indicator v5 Screeners & dashboardsOscillators & momentum
Updated 9 months ago · MIT GitHub repository of Multi-Symbol Dashboard

Volume Profile Plus

by webcrack4
1 stars

This indicator calculates and plots volume profile histograms, market profile distributions, and key value area levels directly on the main price chart. Users can switch between standard volume analysis and time price opportunity modes, select visible, anchore

Indicator v5 VolumeSupport & resistance
Updated 9 months ago · None stated GitHub repository of Volume Profile Plus

Stratégie Vumanchu-SMC

by matlaenousse
1 stars

Stratégie Vumanchu-SMC combines Smart Money Concepts with Vumanchu momentum signals to execute trades directly on the price chart. It detects market structure transitions such as breaks of structure and changes of character, while mapping order blocks and fair

Strategy v5 SMC / ICT / price actionOscillators & momentum
Updated 10 months ago · None stated GitHub repository of Stratégie Vumanchu-SMC

MA Crossover Strategy

by surajmateti
1 stars

This long-only strategy calculates fast and slow moving averages to generate trend-following trade signals. It enters a long position when the fast moving average crosses above the slow moving average, and closes the trade when a bearish crossover occurs. Movi

Strategy v5 Moving averagesTrend
Updated 11 months ago · None stated GitHub repository of MA Crossover Strategy

NakInvest PFR Identifier

by feliperazeek
1 stars

This indicator marks a price failure and reversal candle pattern on the price chart. A bullish signal appears when the bar makes a lower low and a higher high than both of the previous two bars and closes above the prior close. A bearish signal is the mirror i

Indicator v5 Candlestick patterns
Updated 1 year ago · None stated GitHub repository of NakInvest PFR Identifier
1 stars

This script serves as a modular template for building multi-symbol screener dashboards overlaying the price chart in TradingView. It provides built-in configuration settings for screen numbering, layout column widths, and individual symbol enable/disable toggl

Indicator v5 Screeners & dashboards
Updated 1 year ago · MIT GitHub repository of Gold Standard Screener Template

TOTAL MTPI

by Mikelkulla
1 stars

This strategy calculates the TOTAL MTPI using a combination of multiple indicators including Trend Sniper, EMA, MAMA, Kijun Sen, Supertrend and others to determine the overall direction of the cryptocurrency market cap index. It signals long entries when the c

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of TOTAL MTPI

This strategy uses two simple moving averages, 10 and 20 periods by default. It enters long when the fast average crosses above the slow one and enters short on the opposite cross. Each trade is paired with an ATR-based stop loss and take profit, using separat

Strategy v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Moving Average Crossover Strategy

Fx Market Sessions

by munlit
1 stars

An overlay indicator that draws trading session boxes and labels for London, New York, Tokyo and optionally Sydney, using a chosen timezone. Each session has its own time range, colour, label and option to extend. Optional kill zone windows for open, rally and

Indicator v5 Sessions & time
Updated 1 year ago · None stated GitHub repository of Fx Market Sessions

MA Cross Strategy

by mkdir700
1 stars

A simple long-only strategy for the price chart built on two simple moving averages. It buys when the fast average crosses above the slow one and closes the position when the fast crosses back below. A stop loss and a take profit, entered as numeric inputs, ar

Strategy v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of MA Cross Strategy
1 stars

This indicator detects a selectable set of candlestick patterns and plots them on the price chart. Fast and slow simple moving averages provide a trend context for pattern interpretation. Users can turn individual formations on or off, including doji variants,

Indicator v5 Candlestick patternsMoving averages
Updated 1 year ago · None stated GitHub repository of Candlestick Patterns

SMC Lite

by munlit
1 stars

A lightweight Pine v5 smart money overlay with Spanish labels. It draws swing highs and lows and can show a zig-zag line and price action labels. From those swings it marks supply and demand boxes, tags break of structure and points of interest, and keeps a ch

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of SMC Lite

Gaps

by fiji-solutions
1 stars

The Gaps indicator measures and plots the percentage price gap between consecutive bars in a separate pane. It evaluates whether the current bar low is above the previous bar high or the current bar high is below the previous bar low, calculating the relative

Indicator v5 Candlestick patternsVolatility & bands
Updated 2 years ago · None stated GitHub repository of Gaps

Daily OHLC

by JoeTonDev
1 stars

An overlay that draws the current day's open, high, low and close as lines or markers on any intraday chart by requesting daily data. The open line is green when price is above it and red when below, and an optional background tint and a small triangle marker

Indicator v5 Support & resistanceSessions & time Repaints
Updated 2 years ago · None stated GitHub repository of Daily OHLC

algo-trade-indian-commodity

by akash-yellgetti
1 stars

A strategy-type script for the price chart that draws the high, low and midpoint of the first part of each session, set by start hour and minute inputs, with alerts when price crosses the high or low. It adds VWAP and a SuperTrend with adjustable ATR period, m

Strategy v5 Sessions & timeTrend
Updated 2 years ago · None stated GitHub repository of algo-trade-indian-commodity

Stochastic RSI

by RobACurtis
1 stars

A course example file that holds two oscillators for a separate pane. The first is a Stochastic RSI with adjustable RSI length, stochastic length and K and D smoothing, drawn with 80, 50 and 20 reference lines. The second is a MACD with selectable SMA or EMA t

Indicator v5 Oscillators & momentum
Updated 2 years ago · None stated GitHub repository of Stochastic RSI
1 stars

This strategy plots the Supertrend indicator directly on the price chart using an Average True Range period and factor multiplier. It generates long entry orders when the Supertrend turns upward and short entry orders when it turns downward, simultaneously dis

Strategy v5 TrendVolatility & bands
Updated 2 years ago · MPL-2.0 GitHub repository of Hello World, Supertrend

Stochastic RSI MTF

by kritarth2121
1 stars

This strategy computes a smoothed Stochastic RSI and compares it with a signal line taken from the four-hour timeframe. It goes long when the four-hour reading is above its signal, the chart reading crosses up through 30 and price is above an exit EMA. It goes

Strategy v5 Oscillators & momentumMean reversion
Updated 2 years ago · None stated GitHub repository of Stochastic RSI MTF

ZigZag PA Strategy

by merdunal
1 stars

This strategy builds a zigzag from candle direction flips, optionally on an alternate timeframe (60 by default) or Heikin Ashi candles. From the last five zigzag points it measures XABCD ratios to flag harmonic patterns such as Bat, Butterfly and ABCD, and plo

Strategy v5 Support & resistanceBreakout Repaints
Updated 2 years ago · None stated GitHub repository of ZigZag PA Strategy
1 stars

This indicator plots a volume profile directly on the price chart. It calculates cumulative volume over a configurable lookback depth and displays it as horizontal bars. A point of control line marks the highest volume level and can be shown or hidden. Bullish

Indicator v5 VolumeSupport & resistance
Updated 3 years ago · MIT GitHub repository of Woverine - Volume Profile
1 stars

A price-chart overlay that projects a high, mid and low estimate for the next three bars. It averages the open-to-close midpoints, the open-to-close changes and the high-low ranges over a configurable lookback, then chains each estimate into the next. It impor

Indicator v5 Oscillators & momentumTrend

ATR Trailing Stop

by JohnsonHsiao
1 stars

This indicator plots an ATR trailing stop on the price chart. It multiplies the average true range by a user multiplier and ratchets the stop with price while the close stays on the same side of the line. When price crosses the stop, the line flips to the oppo

Indicator v5 Volatility & bandsTrend
Updated 3 years ago · None stated GitHub repository of ATR Trailing Stop

Hotch Build File

by rajatjpatel
1 stars

A strategy template rather than a finished system. It provides a session filter, weekday selection, backtest start and stop dates, a long, short or both direction setting, and plots for stop loss, take profit and entry price while a trade is open. The long and

Strategy v5 Sessions & time Repaints
Updated 4 years ago · None stated GitHub repository of Hotch Build File
1 stars

This Pine v5 strategy compares a 20-period EMA with a 50-period SMA. It enters long when the EMA is above the SMA and short when below, and also contains a second set of pullback entries and crossover-based closes. The code mixes two overlapping rule sets, so

Strategy v5 TrendMoving averages Archived
Updated 4 years ago · None stated GitHub repository of Moving Average Strategy

This strategy builds a normalised band reading from Bollinger Bands, Keltner Channels or the average of both, using Heikin Ashi closes over a 200-bar window by default, with an optional EMA smoothing. Bullish and bearish breakout levels at one and zero define

Strategy v5 Volatility & bandsBreakout
Updated 4 years ago · None stated GitHub repository of Breakout Bollinger Band and Keltner Channel Strategy
330 stars

This strategy enters long when the MACD line crosses above its signal after RSI has been oversold within the last ten bars, and enters short on a MACD cross under after a recent overbought RSI. Each side can be switched off. Default stop loss and take profit a

Strategy v5 Oscillators & momentum
Updated 2 months ago · None stated GitHub repository of MACD Long Strategy [Alorse]
318 stars

This indicator plots four customizable moving averages directly on the main price chart using default lengths of 3, 8, 21, and 50 periods. It fills the space between adjacent averages in green or maroon depending on trend alignment. Additionally, it computes B

Indicator v5 Moving averagesTrend
Updated 2 months ago · MIT GitHub repository of Multiple Moving Averages

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