Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 28)

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

7 stars

This strategy plots a daily VWAP, a 90-period simple moving average from the one-hour chart, and a 50-period EMA plus a 90-period SMA from the 15-minute chart on the price chart. It enters long when VWAP crosses above the one-hour average, or while VWAP remain

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

FX Market Sessions

by itmakesyousick
7 stars

This indicator highlights up to three customizable market trading sessions, such as London, New York, and Tokyo, directly on the price chart using colored boxes and labels. Users can adjust time zones, session hours, colors, border styling, and fill transparen

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

Confluence

by trsdn
6 stars

Confluence is an overlay indicator that calculates metrics across three classic tools: Bollinger Bands, the Relative Strength Index (RSI), and the Moving Average Convergence Divergence (MACD). It plots the upper, lower, and basis lines of the Bollinger Bands d

Indicator v5 Volatility & bandsOscillators & momentum
Updated 7 days ago · MIT GitHub repository of Confluence

WebhookMessageLibrary

by TradersPost
6 stars

WebhookMessageLibrary is a helper library designed to construct structured JSON payload messages for automated trading integrations like TradersPost. It defines custom exported types and constants for trade actions, market sentiments, quantities, limit prices,

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

Edge 71

by subos2008
6 stars

Edge 71 plots prior-window extremes on the price chart and marks breakout entries. It takes the highest high over a long lookback and the lowest low over a short lookback, both excluding the current bar. A green arrow appears when the bar high exceeds that pri

Indicator v5 BreakoutSupport & resistance Repaints
Updated 2 years ago · Custom licence GitHub repository of Edge 71

MACD Signal Cross

by latentwill
4 stars

This strategy evaluates EMA momentum crossovers filtered by an RSI oscillator. It enters a long position when a fast EMA crosses above a slow EMA while RSI remains above 40. Conversely, it enters a short position when the fast EMA crosses below the slow EMA wh

Strategy v5 Moving averagesOscillators & momentum
Updated 8 days ago · None stated GitHub repository of MACD Signal Cross

SMC Order Block + FVG

by LePotoRico2105
4 stars

SMC Order Block + FVG is an intraday strategy combining market structure breaks, order blocks, and fair value gaps. It identifies breaks of structure using pivot points, isolates order blocks following strong ATR-based impulses, and tracks fair value gaps. Lon

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 7 months ago · MIT GitHub repository of SMC Order Block + FVG
4 stars

This strategy demonstrates fixed-fraction position sizing based on a set percentage of account equity at risk. It calculates trade quantity dynamically using an Average True Range (ATR) stop distance. Long entries trigger when price crosses above a 50-period s

Strategy v5 Moving averagesVolatility & bands
Updated 11 months ago · Custom licence GitHub repository of Fixed-Fraction Sizing Example
4 stars

This indicator combines the Moving Average Convergence Divergence (MACD) and Stochastic RSI into a single separate pane display. It calculates the standard MACD line, signal line, and histogram alongside Stochastic RSI %K and %D oscillator curves. Extreme over

Indicator v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of Momentum Suite (MACD + StochRSI)

Improvisando [Alorse]

by Hugs-4-Bugs
4 stars

Improvisando [Alorse] is a price-chart strategy that plots three exponential moving averages and a TTM Squeeze-style oscillator. It opens a long when price is above all three averages and the oscillator is rising while still below zero. Shorts use the opposite

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Improvisando [Alorse]

Interactive ATR Stop Loss

by ShabbirHasan1
4 stars

This indicator plots an interactive ATR-based trailing stop loss on the price chart. Traders click to set the starting point, with the stop loss trailing dynamically based on price action. It triggers on wick or close breaches of the ATR bands and displays fil

Indicator v5 Volatility & bandsSupport & resistance
Updated 1 year ago · Custom licence GitHub repository of Interactive ATR Stop Loss

Dip Finder

by Kalumur
4 stars

Dip Finder is a multi-indicator oscillator and screening tool designed to identify market bottoms and potential reversal points. It calculates a WaveTrend oscillator with customizable overbought and oversold levels, combined with Awesome and Acceleration Oscil

Indicator v5 Oscillators & momentumVolatility & bands
Updated 2 years ago · None stated GitHub repository of Dip Finder
4 stars

Calculates Fair Value Gaps (FVGs) by comparing price action across three bars and plots their magnitude in a separate pane. Upward and downward gaps are displayed as colored bars, with smaller, insignificant gaps rendered transparent based on settings. In addi

Indicator v5 SMC / ICT / price action
Updated 3 years ago · None stated GitHub repository of FVG Histogram [DojiEmoji]

Doji Marker

by might-tree
4 stars

Doji Marker identifies and highlights Doji candlestick patterns on the price chart based on a user-defined body-to-range ratio. When the absolute distance between the open and close prices is less than or equal to a specified fraction of the total bar range, t

Indicator v5 Candlestick patterns
Updated 3 years ago · None stated GitHub repository of Doji Marker

Snag - Swing Trade Long Term V3 is an overlay indicator designed to track long-term trends using three Weighted Moving Averages (13, 48, and 200 periods). It plots the WMAs directly on the price chart and evaluates crossovers between price and moving averages,

Indicator v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of Snag - Swing Trade Long Term V3

Regime HA on EMA strategy

by aofwittawat
4 stars

This overlay strategy classifies trend from a higher-timeframe Heikin Ashi close and an exponential moving average of that close. When the confirmed price is above the average it enters long and closes any short; when price is below it enters short and closes

Strategy v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of Regime HA on EMA strategy

Boll-Ort Tarama

by gocaman
3 stars

This overlay indicator plots a 200-period simple moving average labeled EMA-1, a narrow Bollinger band set with a 2.0 multiplier, and a wider band set with a 3.0 multiplier, filling the gaps between the two upper and lower lines on the price chart. It recolors

Indicator v5 Volatility & bandsMoving averages
Updated 2 days ago · None stated GitHub repository of Boll-Ort Tarama

ZigZag OrderBlock Retracement

by ricksimpsontrading
3 stars

This indicator plots multi-length ZigZag swing structures, detected order blocks, and retracement levels directly on the price chart. It computes up to four separate ZigZag lengths to track price swings across multiple horizons with color coding for bullish, b

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 10 days ago · None stated GitHub repository of ZigZag OrderBlock Retracement
3 stars

This Pine Script v5 library exports detectYinYangCrown, which builds a standard MACD from close using caller-supplied fast, slow, and signal lengths. It tracks histogram color and a small state machine: a green histogram that rises to a peak, then declines, th

Library v5 Oscillators & momentum
Updated 7 weeks ago · None stated GitHub repository of YZM YinYang Crown Library

7 in 1

by g-moe
3 stars

The 7 in 1 indicator plots multiple customizable moving averages directly on the price chart to reduce indicator clutter. Traders can toggle each moving average on or off, selecting between Simple Moving Average (SMA) and Exponential Moving Average (EMA) types

Indicator v5 Moving averagesTrend
Updated 5 months ago · None stated GitHub repository of 7 in 1

Debug Memory Profiler

by monch1962
3 stars

This Pine Script indicator estimates and tracks memory usage for variables, arrays, and series in Pine Script scripts. It calculates total memory usage and breaks it down by type using type-based estimates. The script tracks changes over bars, detects potentia

Indicator v5 Screeners & dashboards
Updated 7 months ago · None stated GitHub repository of Debug Memory Profiler

BTMM Enhanced Foundation

by jcortes254
3 stars

BTMM Enhanced Foundation is a Pine Script utility library designed for Beat The Market Maker (BTMM) system calculations. It provides core helper functions for multi-session detection across Asian, London, and New York trading sessions, three-day market cycle a

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

MOTO ka NagAstra

by HelloMoto069
3 stars

NagAstra draws a Gaussian-kernel smoothed estimate of the selected source on the price chart. With repainting smoothing enabled, it rebuilds line segments on the latest bar and marks slope reversals with triangle labels. Disabling that option plots only the en

Indicator v5 Trend Repaints
Updated 1 year ago · None stated GitHub repository of MOTO ka NagAstra
3 stars

Calculates a Relative Strength Index oscillator and detects regular and hidden bullish or bearish divergences using pivot points. It displays in a separate pane below the main chart, highlighting divergence occurrences between price movement and the RSI oscill

Indicator v5 Oscillators & momentumDivergence Repaints
Updated 1 year ago · None stated GitHub repository of Sapphire RSI Divergence Indicator

This indicator calculates and plots a custom Exponential Moving Average (EMA) directly on the main price chart. It uses an initial Simple Moving Average over a user-defined period to seed the exponential calculation, applying standard alpha weighting to smooth

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Exponential Moving Average (Trend Following)
3 stars

This strategy plots long and short markers on the price chart. It builds a composite index from RSI change and a short RSI average, then requires that index, a one-minute cumulative volume delta, and a relative volatility index to agree. EMA, SMA, and VWAP rel

Strategy v5 Oscillators & momentumVolume Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Composite RVI CVD Strategy

Currency Strength Chart

by itmakesyousick
3 stars

The Currency Strength Chart calculates and plots the relative strength of major fiat currencies, including EUR, USD, JPY, GBP, CHF, AUD, CAD, and NZD, in a separate chart pane. It evaluates cross-pair exchange rates using configurable data sources like price,

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

Q-Trend

by middlechild0
2 stars

Q-Trend is a trend-following indicator that calculates a dynamic trend line using price channels and an ATR volatility offset. It plots a colored trend line directly on the price chart, switching between bullish and bearish modes when price breaches the upper

Indicator v5 TrendVolatility & bands
Updated 5 months ago · None stated GitHub repository of Q-Trend

Alpy Vix

by avatar-lavventura
2 stars

This strategy calculates a rolling volume-weighted average price and Chris Moody's Williams Vix Fix to detect market bottoms and oversold volatility spikes. It plots in a separate pane and colors chart bars based on filtered exhaustion criteria and price actio

Strategy v5 Volatility & bandsMean reversion Repaints
Updated 7 months ago · None stated GitHub repository of Alpy Vix

This strategy plots a fast and a slow simple moving average on the price chart and enters long when the fast average crosses above the slow average, or short on a cross below. Longs also require ADX above a threshold, RSI below 65, ATR above a minimum, and a b

Strategy v5 TrendOscillators & momentum
Updated 8 months ago · MIT GitHub repository of Quantum Entanglement (Filtered MA Crossover)

Swing Structure - Clean BOS

by ifreddyman2014-tech
2 stars

Swing Structure - Clean BOS identifies market structure by plotting swing high and low points, Break of Structure (BOS) lines, and Order Blocks directly on the price chart. It features an optional displacement filter requiring breakout candles to exceed an ave

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 8 months ago · None stated GitHub repository of Swing Structure - Clean BOS

This strategy enters long when the close breaks above the prior lookback high and volume exceeds its simple moving average, but only if a VIX regime score is at least three. The score counts whether the VIX to three-month VIX ratio and the VIX level sit below

Strategy v5 BreakoutVolatility & bands Repaints
Updated 10 months ago · MIT GitHub repository of Auto Breakout Strategy mit VIX Heatmap Gate

Box Scalper

by wynnforthework
2 stars

This strategy draws on the price chart and combines a momentum zigzag, a custom QQE built from RSI, ADX directional strength, an SSL filter, and a coefficient-of-variation weighted average. Box period, deviation, and threshold inputs set the box filter, while

Strategy v5 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of Box Scalper

My Fib Pivots

by ashwagamma
2 stars

The My Fib Pivots indicator plots daily pivot points on the price chart along with Fibonacci retracement levels from 0.236 to 2.0. It displays the last period's pivot, latest classic pivot range (CPR), retired CPR, and rolling pivots. Users can toggle visibili

Indicator v5 Support & resistance
Updated 1 year ago · None stated GitHub repository of My Fib Pivots

Dual MA Crossover with Time Filter calculates a short simple moving average and a long simple moving average, plotting both on the main price chart. It identifies bullish crossovers and bearish crossunders to display Buy and Sell labels on the chart. A user-de

Indicator v5 TrendMoving averages Repaints

Custom Session OHL

by ryangaraygay
2 stars

Custom Session OHL calculates and plots the open, high, and low price levels established during a user-specified time session. It tracks the session opening price along with the highest and lowest prices reached during that window, plotting them directly on th

Indicator v5 Sessions & timeSupport & resistance
Updated 1 year ago · MIT GitHub repository of Custom Session OHL

Breakout Indicator

by Web3Degenerate
2 stars

Breakout Indicator plots high and low threshold levels for a chosen timeframe, such as daily, directly on the price chart. When price closes above the high or below the low, the indicator displays a breakout shape and marks ATR-based stop loss and take profit

Indicator v5 BreakoutSupport & resistance
Updated 2 years ago · None stated GitHub repository of Breakout Indicator

Mc War v3

by tuanmcwar
2 stars

Mc War v3 is a price-chart indicator that finds swing highs and lows over a user-set lookback and draws upper and lower order-block zones as boxes. It limits how many bearish and bullish blocks stay visible and can use candle bodies instead of wicks for zone e

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 years ago · None stated GitHub repository of Mc War v3
2 stars

This strategy enters long positions when the fast SMA of 10 periods crosses above the slow SMA of 30 periods. It calculates the trailing stop price as the position average price multiplied by one minus the trailing stop percentage divided by 100. The strategy

Strategy v5 TrendMoving averages
Updated 2 years ago · Apache-2.0 GitHub repository of Trailing Stop Strategy
2 stars

Jens Rabe Academy - Indicator 1 combines multiple trend and market condition tools directly on the main price chart. It calculates exponential moving averages (10, 21) and simple moving averages (30, 40, 50, 150, 200), identifies distribution days (D-Days) bas

Indicator v5 Moving averagesTrend Repaints
Updated 2 years ago · MIT GitHub repository of Jens Rabe Academy - Indicator 1

HTF Candles & Pivots

by itmakesyousick
2 stars

This overlay indicator draws higher-timeframe candles as boxes on the price chart, with a selectable timeframe, candle thickness, wicks, history, vertical divisions, and optional fill for negative candles. It can plot pivot levels, including an optional centra

Indicator v5 Candlestick patternsSupport & resistance
Updated 3 years ago · None stated GitHub repository of HTF Candles & Pivots

Multi ZigZag

by WISEPLAT
2 stars

This indicator calculates and plots up to four independent ZigZag lines on the price chart simultaneously using customizable length periods. It identifies high and low pivot points across multiple time horizons to display market structure and trend swings. Use

Indicator v5 Support & resistanceTrend Repaints
Updated 3 years ago · None stated GitHub repository of Multi ZigZag

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