Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 86)

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

Trailering A004

by ruckard
13 stars

Trailering A004 is an automated trading strategy designed to optimize entry and exit points while minimizing stop loss and maximizing take profit. It calculates signals using high and low closing moving averages and supports strict long or short filtering. The

Strategy v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Trailering A004

Mizan Trinity Oscillator

by eddiebelaval
7 stars

The Mizan Trinity Oscillator synthesizes normalized Commodity Channel Index (CCI), Chaikin Money Flow (CMF), and On-Balance Volume Rate of Change (OBV ROC) into a single composite oscillator plotted in a separate pane. Each component is scaled from 0 to 100 an

Indicator v5 Oscillators & momentumVolume
Updated 3 months ago · None stated GitHub repository of Mizan Trinity Oscillator

NY SMC Suite Strategy

by alboogycOdR
6 stars

This Smart Money Concepts strategy identifies trading setups based on Order Blocks, Fair Value Gaps, market structure alignment, and defined session killzones directly on the price chart. It calculates a confluence score combining active killzones, order block

Strategy v5 SMC / ICT / price actionSessions & time
Updated 7 months ago · None stated GitHub repository of NY SMC Suite Strategy

M&M Trading

by g-moe
3 stars

M&M Trading is an overlay indicator that combines momentum calculations with moving averages and a visual dashboard. It calculates a modified Chande Momentum Oscillator with adjustable multipliers to identify bullish and bearish momentum triggers, optionally c

Indicator v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of M&M Trading
2 stars

Calculates and displays a miniature higher timeframe candlestick chart directly on the price chart using a TradingView table element. It retrieves OHLC data for a user-selected timeframe and symbol via security calls, rendering bodies and wicks onto an adjusta

Indicator v5 Screeners & dashboards
Updated 8 months ago · None stated GitHub repository of Higher Time Frame Chart Overlay

Naga Disp v2

by nishpa800
1 stars

Marks a candle when a very high volume reading and a large displacement happen on the same bar. Volume tiers compare the bar against lookbacks of 1000, 2000, 3000 and 4000 bars, and displacement compares the candle range to a standard deviation multiple with a

Indicator v5 VolumeSessions & time
Updated 2 months ago · None stated GitHub repository of Naga Disp v2

Stochastic RSI

by TWODS-CAPITAL
37 stars

This indicator calculates and plots the standard Stochastic RSI oscillator in a separate pane. It derives a Relative Strength Index from the selected price source, applies the Stochastic oscillator formula to those RSI values, and smooths the results into %K a

Indicator v5 Oscillators & momentum
Updated 3 years ago · MIT GitHub repository of Stochastic RSI

Trailering B001

by ruckard
13 stars

Trailering B001 is an automated trading strategy designed to generate trade alerts and integrate with Zignaly copy-trading platforms. It utilizes custom moving average bounds (Curie High and Low closing MAs) to gauge price excursions and trigger long or short

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Trailering B001

ORION: Hybrid Strategy

by eddiebelaval
7 stars

This strategy identifies volatility breakout opportunities by constructing dynamic ATR-based price boxes and detecting volatility squeezes. Trades are filtered using an exponential moving average trend condition and designated session hours. Entries trigger up

Strategy v5 Volatility & bandsBreakout
Updated 3 months ago · None stated GitHub repository of ORION: Hybrid Strategy

MA Trend Percent Target Strategy is a trend-following overlay strategy that executes trades based on price crossovers with a moving average. It supports multiple moving average types, including SMA, EMA, WMA, VWMA, and HMA. Trades enter when price crosses abov

Strategy v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of MA Trend Percent Target Strategy

Higher-timeframe requests

by regalouisei
2 stars

This indicator calculates and plots higher-timeframe source data directly on the main price chart. It allows users to request higher-timeframe values using either a fixed timeframe setting or a dynamic multiplier of the chart's current timeframe. Users can tog

Indicator v5 Repaints
Updated 8 months ago · None stated GitHub repository of Higher-timeframe requests
1 stars

Mirror Oscillator Pro is a momentum oscillator plotted in a separate pane. It detects pivot highs and lows on a user-selected timeframe and price source using specified pivot lengths. The indicator builds multiple bands including highest-lowest ranges, ATR ban

Indicator v5 Oscillators & momentumVolatility & bands
Updated 7 weeks ago · None stated GitHub repository of Mirror Oscillator Pro by Morindok

Naga Disp v2 (Tick)

by nishpa800
1 stars

Marks a candle when a very high volume reading and a large displacement happen on the same bar. Volume tiers compare the bar against lookbacks of 1000, 2000, 3000 and 4000 bars, and displacement compares the candle range to a standard deviation multiple with a

Indicator v5 VolumeSessions & time
Updated 2 months ago · None stated GitHub repository of Naga Disp v2 (Tick)

Stochastic Slow Strategy

by TWODS-CAPITAL
37 stars

This strategy plots on the price chart and trades a slow stochastic oscillator. It smooths the stochastic %K with a three-period average and then smooths that result into %D. It enters long when %K crosses above %D while %K is below the oversold level, and it

Strategy v5 Oscillators & momentum
Updated 3 years ago · MIT GitHub repository of Stochastic Slow Strategy

Trailering bK003

by ruckard
13 stars

This Pine v5 strategy is a long-only template that sizes entries from the number of trigger conditions and manages exits from price's maximum favorable and adverse excursion. Take profit is a percentage by default, with an optional risk-reward ratio and option

Strategy v5
Updated 1 year ago · None stated GitHub repository of Trailering bK003
7 stars

The Per Bak Self-Organized Criticality indicator calculates a composite fragility score by blending weights for tail risk from the SKEW index, volatility regimes from VIX terms, credit stress from HYG and LQD, and positioning from short volume data. It plots t

Indicator v5 Volatility & bandsSupport & resistance
Updated 3 months ago · None stated GitHub repository of Per Bak Self-Organized Criticality
6 stars

The ORB + Fib + MACD Indicator combines Opening Range Breakout mechanics with Fibonacci retracement levels and MACD momentum filtering. It determines the high and low bounds of a user-defined initial session window, projects Fibonacci entry zones, and calculat

Indicator v5 Sessions & timeSupport & resistance
Updated 7 months ago · None stated GitHub repository of ORB + Fib + MACD Indicator
3 stars

This indicator calculates standard MACD line, signal line, and histogram values while evaluating swing high and swing low pivot points on price and MACD to detect divergence. It compares recent pivot levels to identify higher highs, lower lows, and trend state

Indicator v5 Oscillators & momentumDivergence Repaints
Updated 5 months ago · None stated GitHub repository of MACD - Divergence

How To Set Time Ranges

by regalouisei
2 stars

How To Set Time Ranges is a strategy template designed to demonstrate date and time filtering for backtesting. It calculates fast and slow simple moving averages to trigger long entries on bullish crossovers and close positions on bearish crossunders. Trades a

Strategy v5 Moving averagesTrend
Updated 8 months ago · None stated GitHub repository of How To Set Time Ranges
1 stars

Mirror Oscillator Signals Only is an overlay indicator that projects Fibonacci wave symmetry and calculates signals based on user-selected chart anchor points and Williams Fractals. The script uses interactive time and price coordinates to establish wave refer

Indicator v5 Oscillators & momentumSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Mirror Oscillator Signals Only

Naga Disp v2.1

by nishpa800
1 stars

Marks a candle when a very high volume reading and a large displacement happen on the same bar. Volume tiers compare the bar against lookbacks of 1000, 2000, 3000 and 4000 bars, and displacement compares the candle range to a standard deviation multiple with a

Indicator v5 VolumeSessions & time
Updated 2 months ago · None stated GitHub repository of Naga Disp v2.1

Supertrend

by TWODS-CAPITAL
37 stars

This indicator plots the Supertrend line on the price chart using TradingView's built-in Supertrend calculation. It derives the line from the average true range and a multiplier, then colors an uptrend green and a downtrend red. A light fill sits between the c

Indicator v5 TrendVolatility & bands
Updated 3 years ago · MIT GitHub repository of Supertrend

Trailering C002

by ruckard
13 stars

This strategy evaluates price excursion using Curie closing moving averages on the price chart to trigger trades and manage positions. It supports both long and short positions with configurable strategy date ranges and strict mode conditions. Built as an auto

Strategy v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Trailering C002

This overlay indicator draws prior month, week, and day reference levels on the price chart, plus current month levels. It plots prior month high and low, open and close, and point of control, current month high and low and point of control, prior week high an

Indicator v5 Support & resistanceSessions & time

ORB + Fib + MACD Strategy

by alboogycOdR
6 stars

This strategy builds a timed opening range and tracks session high and low on the price chart. It flags bullish and bearish breakouts of that range and uses Fibonacci levels for an entry zone, a default stop, and an optional take-profit extension. Take profit

Strategy v5 BreakoutSupport & resistance
Updated 7 months ago · None stated GitHub repository of ORB + Fib + MACD Strategy

MACD Signals

by g-moe
3 stars

The MACD Signals indicator plots dual Exponential Moving Averages (EMAs) and generates buy and sell signals directly on the price chart based on MACD crossovers filtered by trend context. Users can configure independent EMA and MACD parameter settings for long

Indicator v5 Oscillators & momentumMoving averages
Updated 5 months ago · None stated GitHub repository of MACD Signals

HTF Liquidity Levels

by regalouisei
2 stars

This indicator tracks and draws higher-timeframe liquidity levels directly on the price chart using customizable horizontal lines. It plots upper and lower liquidity reference boundaries across up to five user-configured timeframes, ranging from monthly down t

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 8 months ago · None stated GitHub repository of HTF Liquidity Levels
1 stars

Reflects past swing pivots across a chosen time axis on the price chart. The user selects a mirror time and a ratio; the script records confirmed pivot highs and lows that occurred before that time, using adjustable left and right lengths of five bars. When a

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Mirrored Pivots - Time Reflection

Naga Disp v2.1 (Tick)

by nishpa800
1 stars

Marks a candle when a very high volume reading and a large displacement happen on the same bar. Volume tiers compare the bar against lookbacks of 1000, 2000, 3000 and 4000 bars, and displacement compares the candle range to a standard deviation multiple with a

Indicator v5 VolumeSessions & time
Updated 2 months ago · None stated GitHub repository of Naga Disp v2.1 (Tick)

Supertrend Strategy

by TWODS-CAPITAL
37 stars

This strategy uses the built-in Supertrend calculation to generate long and short trade entries based on trend reversals. It triggers a long position when the Supertrend direction flips to indicate an uptrend and a short position when it flips to indicate a do

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

Trailering D002

by ruckard
13 stars

Trailering D002 is an execution strategy template designed for automated crypto trading on price charts. It evaluates High and Low Curie moving average closing lines to identify potential entry conditions across customizable time windows. The strategy manages

Strategy v5 Moving averages
Updated 1 year ago · None stated GitHub repository of Trailering D002
6 stars

This Pine Script indicator calculates the Opening Range Breakout (ORB) high and low within user-defined New York or London session times. It plots a colored box on the price chart marking the ORB range and its start bar index. After the session ends it detects

Indicator v5 BreakoutSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of ORB + ICT Hybrid Indicator

MACD Signals

by g-moe
3 stars

MACD Signals overlays buy and sell labels on the price chart by combining MACD crossovers with RSI conditions. A buy signal is generated when a bullish MACD crossover occurs within a user-defined bar limit after the RSI dips below an oversold threshold, while

Indicator v5 Oscillators & momentumMoving averages
Updated 5 months ago · None stated GitHub repository of MACD Signals
2 stars

This indicator tracks and visualizes cyclical turning points based on Hurst cycle principles in a separate pane. It identifies confirmed pivot highs or lows across multiple harmonic lengths ranging from half-cycle to 32x cycles. For each cycle length, it calcu

Indicator v5 Support & resistance
Updated 8 months ago · None stated GitHub repository of Hurst Diamond Notation Pivots
1 stars

Mirrored Price Polyline reflects price action across an interactive reference line drawn directly on the price chart. Users select two anchor points with custom time and price coordinates. The script calculates the slope between these points to define a centra

Indicator v5 Support & resistance
Updated 7 weeks ago · None stated GitHub repository of Mirrored Price Polyline

Technical Ratings

by TWODS-CAPITAL
37 stars

This indicator scores price using moving averages, oscillators, or both, then maps the result to buy, sell, and neutral ratings. It compares several simple and exponential averages, a Hull average, a volume-weighted average, and Ichimoku lines with price, and

Indicator v5 Oscillators & momentumMoving averages
Updated 3 years ago · MIT GitHub repository of Technical Ratings

Trailering E002

by ruckard
13 stars

Trailering E002 is a trading strategy that uses moving average closing lines to optimize entries, take profit levels, and stop loss execution. Applied directly on the main price chart, it tracks price excursion to refine trades and includes date filtering for

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Trailering E002

SMC Strategy Hub + Alerts

by eddiebelaval
7 stars

This indicator marks market structure shifts when price closes beyond the prior lookback high or low, then labels a buy or sell with an ATR-based stop and a take-profit distance set by the TP multiplier. Optional boxes highlight bullish and bearish fair value

Indicator v5 SMC / ICT / price actionBreakout
Updated 3 months ago · None stated GitHub repository of SMC Strategy Hub + Alerts
6 stars

This indicator tracks opening range breakout (ORB) windows for the London and New York sessions and identifies ICT-style liquidity grabs. It calculates the high and low boundaries during the configured session periods and plots visual boxes directly on the pri

Indicator v5 BreakoutSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of ORB + ICT Hybrid Indicator

MACD Signals with Alert System combines multiple technical indicators into a unified signal and alert generator overlaid on the price chart. It calculates a Hull Moving Average, MACD histogram, three Exponential Moving Averages, Slow Stochastic, and Time Segme

Indicator v5 Oscillators & momentumMoving averages
Updated 5 months ago · None stated GitHub repository of MACD Signals with Alert System

Ichimoku Kinkō Hyō

by regalouisei
2 stars

This indicator plots an enhanced version of the traditional Ichimoku Kinkō Hyō on the main price chart. It calculates adaptive Tenkan-Sen and Kijun-Sen lines using dynamic lookback periods adjusted by volume, ATR volatility, and Chikou trend filters. Users can

Indicator v5 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of Ichimoku Kinkō Hyō

Proximity GZI HV

by nishpa800
1 stars

Detects fair value gaps on the price chart and flags two proximity signals. The GZI signal appears when opposite fair value gaps overlap within a set number of bars, and the HV signal appears when a gap forms on a bar with the highest volume of the last 63, 25

Indicator v5 SMC / ICT / price actionVolume
Updated 2 months ago · None stated GitHub repository of Proximity GZI HV

Technical Ratings Strategy

by TWODS-CAPITAL
37 stars

A multi-indicator consensus strategy that computes combined rating signals from various moving averages and technical oscillators, including RSI, Stochastic, MACD, CCI, ADX, and Ichimoku Cloud. Depending on user configuration, trades are triggered by overall c

Strategy v5 TrendOscillators & momentum
Updated 3 years ago · MIT GitHub repository of Technical Ratings 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