Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 70)

Open-source Pine scripts that show the direction of the trend or trade with it: Supertrend variants, moving-average systems, ADX and trend filters.

Pine scripts3,870
Code shown here2,160open licence
Updated in a year2,525
No repaint flag3,292

Trend: Indicators, Strategies and Libraries

47 stars

Ultrasmooth Filter (USF) calculates a noise-reduced trend curve using a two-pole infinite impulse response (IIR) filter structure with momentum enhancement. Designed to minimize lag while suppressing price fluctuations, it computes efficiently with constant O(

Indicator v6 Moving averagesTrend
Updated 8 months ago · MIT GitHub repository of Ultrasmooth Filter (USF)

This indicator detects market accumulation phases and bottom formations over time rather than generating single-point buy signals. It evaluates five scoring components: trend loss, range formation, volatility compression, liquidity behavior, and early bullish

Indicator v6 TrendVolatility & bands
Updated 3 days ago · MIT GitHub repository of Vein: Accumulation Phase 4H [WavesUnchained]

This intraday strategy is designed for short-term scalping on equity and index markets like SPY. It evaluates price movement using configurable exponential and Hull moving averages combined with an ATR-based Supertrend calculation. The script plots signal arro

Strategy v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of J8 30 123 SPY Scalping PRO 2 Jerry
1 stars

This indicator calculates a Fibonacci-scaled sinusoidal wave cycle derived from two user-selected chart reference points. Plotted directly on the main price chart, it projects an extended trendline alongside moving averages adjusted by normal and inverse slope

Indicator v5 TrendSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Hyper Fibo System {Morindok}

NO.1 V1 Fast Confirmed Flip

by vedkanani123
1 stars

A price-chart indicator that builds an adaptive core line by blending a Kaufman-style adaptive average with a zero-lag EMA, then surrounds it with ratcheting ATR trail rails. A buy label means the active side flips long and a sell label flips short, committed

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of NO.1 V1 Fast Confirmed Flip
1 stars

A Keltner channel breakout strategy. It goes long when the close crosses above the upper band and short when it crosses below the lower band, only if ADX is above a threshold and price is on the matching side of a 200 EMA. Each trade exits at the channel midli

Strategy v6 BreakoutVolatility & bands
Updated 2 months ago · None stated GitHub repository of TN Sovereign Keltner
114 stars

This indicator plots a zigzag-like moving average and a stepline on the price chart. It fetches previous bar prices from two input timeframes using the security function with gaps off and lookahead on. The zzoid function creates a smoothed curve via cumulative

Indicator v4 Moving averagesTrend Repaints
Updated 1 year ago · None stated GitHub repository of Straightened Price Curve

Vein Execution 15m is an execution and timing overlay designed to complement higher-timeframe context. It monitors lower-timeframe micro structure shifts, liquidity sweeps, rejection candles, engulfing patterns, and follow-through momentum. The script calculat

Indicator v6 TrendSMC / ICT / price action
Updated 3 days ago · MIT GitHub repository of Vein: Execution 15m [WavesUnchained]

J8 Refactor

by g-moe
3 stars

J8 Refactor is a multi-indicator trading strategy that combines a custom Supertrend, multiple moving average filters, RSI levels, and MACD logic with Bollinger Bands. It executes entries based on multi-condition alignment and offers customizable exits, includi

Strategy v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of J8 Refactor

NO.1 V1 Final Regime Router

by vedkanani123
1 stars

An overlay signal indicator that routes between three exclusive modes: a trend mode using Supertrend flips or Donchian continuation, a range fade mode, and a transition mode that trades breakouts of a finished Asia range. Shock candles, gaps, micro-ranges and

Indicator v6 Sessions & timeTrend Repaints
Updated 2 months ago · None stated GitHub repository of NO.1 V1 Final Regime Router
99 stars

This indicator calculates John Ehlers Trendflex in a separate pane. It pre-filters the chosen source with a two-pole SuperSmoother, sums the difference between the current filtered value and recent filtered values as a cumulative slope, then divides that slope

Indicator v6 Oscillators & momentumTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Trendflex (TRENDFLEX)

Vein Exhaustion is a price-chart indicator that scores how stretched a directional move is before structure confirms a turn. It builds separate bull and bear scores from consecutive directional bars, EMA distance in ATR units, RSI and MFI extremes, volume-base

Indicator v6 TrendOscillators & momentum
Updated 3 days ago · MIT GitHub repository of Vein: Exhaustion [WavesUnchained]

NO.1 V3 Dual-Regime Router

by vedkanani123
1 stars

A price-chart indicator that classifies the market into trend, range, transition or shock regimes using an adaptive core, ATR, ADX, choppiness and efficiency measures. Each regime has its own sleeve: trend-following on structure and momentum, range-edge revers

Indicator v6 TrendBreakout
Updated 2 months ago · None stated GitHub repository of NO.1 V3 Dual-Regime Router

KC Combo Bear v4.6

by nishpa800
1 stars

Overlays a Keltner Channel and an ATR supertrend on the price chart and marks candles where several built-in detectors agree on the same bar. The detectors cover pullback patterns, displacement, relative volume and high-volume bars, shown as lettered markers.

Indicator v5 Volatility & bandsTrend
Updated 2 months ago · None stated GitHub repository of KC Combo Bear v4.6
1 stars

TN Sovereign Lorentzian v6 is a quantitative strategy that classifies price action regimes using multi-dimensional indicators and causal volume auditing. It generates entry signals based on RSI center-line crossovers, 10-period momentum, and price alignment re

Strategy v6 AI / machine learningTrend
Updated 2 months ago · None stated GitHub repository of TN Sovereign Lorentzian v6

This strategy takes long trades only. It enters when a fast simple moving average crosses above a slower one and either weekly CCI or ADX meets its threshold, depending on the toggles. It closes the long when price falls below a third moving average, and it ca

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Buy Only Strategy with Dynamic Re-Entry and Exit

Parabolic SAR

by TWODS-CAPITAL
37 stars

This indicator calculates and plots the standard Parabolic Stop and Reverse directly on the price chart using cross markers. It tracks potential trend direction and reversal points as price moves, plotting dots above or below the price candles. The main input

Indicator v5 Trend
Updated 3 years ago · MIT GitHub repository of Parabolic SAR

Vein: Pullback identifies temporary counter-trend retracements and signals when they end versus when structure breaks. It calculates a multi-layer confluence score from 0 to 10 based on trend quality, move weakness, structure preservation, and Fibonacci retrac

Indicator v6 TrendOscillators & momentum
Updated 3 days ago · MIT GitHub repository of Vein: Pullback [WavesUnchained]
3 stars

The Jerry Buy Zone Strategy calculates standard MACD line values and applies Bollinger Bands directly to the MACD line to identify momentum breakouts. Long entries trigger when the MACD line crosses above zero while remaining above the upper Bollinger Band, or

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Jerry Buy Zone Strategy
1 stars

A price-chart indicator that extends a three-regime signal engine (trend, range edge reversal, breakout) with higher-timeframe context and a transparent confidence score. The higher timeframe uses the previous completed bar, either auto-selected or set manuall

Indicator v6 TrendBreakout Repaints
Updated 2 months ago · None stated GitHub repository of NO.1 V4 MTF Confidence Fusion

KC Combo Bear v4.7

by nishpa800
1 stars

Overlays a Keltner Channel and an ATR supertrend on the price chart and marks candles where several built-in detectors agree on the same bar. The detectors cover pullback patterns, displacement, relative volume and high-volume bars, shown as lettered markers.

Indicator v5 Volatility & bandsTrend
Updated 2 months ago · None stated GitHub repository of KC Combo Bear v4.7
1 stars

This strategy executes trades based on MACD line crossovers filtered by trend direction and histogram slope. Long positions open on bullish MACD crossovers when price is above the trend EMA and histogram momentum is rising. Short positions open on bearish cros

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Tn Sovereign MACD v6
47 stars

This indicator calculates the Williams Gator Oscillator derived from Bill Williams Alligator lines and plots dual histograms in a separate pane. The upper histogram displays the absolute difference between the Jaw and Teeth moving averages, while the lower his

Indicator v6 Oscillators & momentumMoving averages
Updated 8 months ago · MIT GitHub repository of Williams Gator Oscillator

Parabolic SAR Strategy

by TWODS-CAPITAL
37 stars

This strategy implements a custom Parabolic SAR algorithm to generate trend-following entries. It plots current and next-bar SAR levels directly on the main price chart. When the SAR flips, the strategy places stop orders to reverse positions from long to shor

Strategy v5 Trend
Updated 3 years ago · MIT GitHub repository of Parabolic SAR Strategy

Trend Trader Strategy

by eddiebelaval
7 stars

Calculates a dynamic trend level based on recent highest and lowest prices adjusted by a weighted moving average of Average True Range. It plots the Trend Trader Line directly on the price chart and colors bars according to the active trend direction. Long ent

Strategy v5 TrendVolatility & bands
Updated 3 months ago · None stated GitHub repository of Trend Trader Strategy

PF probe 54 - MTF roll state

by pineforge-4pass
1 stars

This strategy detects roll states in multiple timeframes to generate trading signals on the price chart. It fetches close prices from 60m, 240m and daily bars using request.security. Long entries trigger on a 60m roll up with flat 240m state or on a daily high

Strategy v6 TrendBreakout
Updated 7 days ago · Apache-2.0 GitHub repository of PF probe 54 - MTF roll state
1 stars

A price-chart indicator that combines trend, range edge reversal and transition breakout sleeves, with shock conditions blocking new signals. It uses an adaptive core, causal trail, completed ranges and a previous completed higher-timeframe filter. Presets suc

Indicator v6 TrendBreakout Repaints
Updated 2 months ago · None stated GitHub repository of NO.1 V5 Ultimate Adaptive Engine

TN Sovereign Market Structure v6 is an overlay strategy that identifies market structure breaks and trends using pivot points, a 50-period Exponential Moving Average (EMA), and the Ichimoku Cloud. It detects Break of Structure (BOS) signals when price closes p

Strategy v6 SMC / ICT / price actionTrend
Updated 2 months ago · None stated GitHub repository of TN Sovereign Market Structure v6
99 stars

Ehlers Ultimate Channel calculates volatility bands around an adaptive smoothed centerline based on John Ehlers' smoothing algorithm. It applies a specialized infinite impulse response filter to both price and True Range, constructing an upper, middle, and low

Indicator v6 Volatility & bandsSupport & resistance
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Ultimate Channel (UCHANNEL)

Piercing - Bullish

by TWODS-CAPITAL
37 stars

Identifies the two-candle bullish Piercing Line reversal pattern during a downtrend directly on the price chart. It checks for a long bearish candle followed by a bullish candle opening at or below the prior low and closing above its midpoint. Users can filter

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Piercing - Bullish
13 stars

Ruckard Walcrypto DoubleDonchian is a trend-following breakout strategy built on two Donchian Channels with an optional exponential moving average filter. Position entries trigger when price achieves a new high or low on the primary channel, provided the optio

Strategy v5 TrendBreakout
Updated 1 year ago · None stated GitHub repository of Ruckard Walcrypto DoubleDonchian

This indicator draws support and resistance zones on the price chart from reversal bars that later reach ATR-based targets. Weak and strong labels depend on travel distance, adverse move, and how quickly the target is hit. Nearby same-direction zones merge, a

Indicator v6 Support & resistanceOscillators & momentum Repaints
Updated 3 days ago · MIT GitHub repository of Vein: Reversal Zones [WavesUnchained]

Vdubus Pattern Gen V2

by eddiebelaval
7 stars

Vdubus Pattern Gen V2 is a TradingView indicator that identifies and plots chart patterns, harmonic shapes, and structural reversals based on multi-scale ZigZag structures and smoothed momentum physics. It draws fast entry structures, slow macro context struct

Indicator v5 TrendSupport & resistance Repaints
Updated 3 months ago · None stated GitHub repository of Vdubus Pattern Gen V2
3 stars

This trading strategy evaluates moving average slope and concavity changes to identify trend direction and entry signals. Traders can choose between Hull, EMA, SMA, WMA, or ALMA moving averages, filtered by secondary trend EMAs for long and short positions. Si

Strategy v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of Jerry Strategy / Dashboard
1 stars

This multi-timeframe strategy combines higher-timeframe trend context with lower-timeframe execution. It evaluates macro trend direction on a higher timeframe using Exponential Moving Average crosses and a Supertrend indicator. On the lower timeframe, entry si

Strategy v6 TrendMoving averages Repaints
Updated 2 months ago · None stated GitHub repository of TN Sovereign MTF Dual-Layer v6
114 stars

This indicator overlays a Renko-style brick channel on the price chart. It sets brick size as a fraction of the previous close, choosing that fraction from the chart timeframe, then steps two brick levels when price moves beyond that size. It colors the fill g

Indicator v4 TrendSupport & resistance
Updated 1 year ago · None stated GitHub repository of ZigZag via Renko Emulator

Buy/Sell Strat

by hasnocool
106 stars

This strategy plots a fast and a slow exponential moving average on the price chart and trades their crossovers. It enters long when the fast average crosses above the slow average, volume is above 85 percent of the prior five-bar average, and price is above t

Strategy v5 TrendMoving averages Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Buy/Sell Strat

This indicator calculates John Ehlers' Ultimate Smoother Filter, a two-pole infinite impulse response filter designed to reduce market noise while minimizing lag. It computes filter coefficients using exponential decay and trigonometric functions, then applies

Indicator v6 Moving averagesTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Ultimate Smoother Filter (USF)

This strategy executes breakout trades using two Donchian Channels alongside an optional 200-period EMA trend filter. Entries trigger when the price sets a new highest high or lowest low over the primary Donchian Channel period. Exits are managed via a shorter

Strategy v5 BreakoutTrend
Updated 1 year ago · None stated GitHub repository of Ruckard Walcrypto DoubleDonchian B002

This indicator plots calendar-spread context for commodity futures on the price chart. It maps the chart symbol to front and next month contracts automatically, or uses manual symbols, then calculates the spread as a difference or ratio. Fast and slow EMAs, a

Indicator v6 TrendOscillators & momentum
Updated 3 days ago · MIT GitHub repository of Vein: Spread Context [WavesUnchained]
3 stars

The Krypton Indicator overlays trend analysis, buy and sell zones, and sentiment tracking directly onto the price chart. It calculates a dual moving average trend filter, renders supply and demand zones, and plots a sentiment line to identify market momentum.

Indicator v5 TrendSupport & resistance Repaints
Updated 5 months ago · None stated GitHub repository of Krypton Indicator

P&P Cloud Professional

by vedkanani123
1 stars

A price-chart indicator that plots a fast and slow EMA cloud, defaulting to 9 and 21 periods, in green when bullish and red when bearish. The cloud can be locked to a chosen timeframe, with a wait-for-close option that is off by default, so locked higher-timef

Indicator v6 Moving averagesTrend Repaints
Updated 2 months ago · None stated GitHub repository of P&P Cloud Professional

KC Combo Bull v4

by nishpa800
1 stars

Overlays a Keltner Channel and an ATR supertrend on the price chart and marks candles where several built-in detectors agree on the same bar. The detectors cover pullback patterns, displacement, relative volume and high-volume bars, shown as lettered markers.

Indicator v5 Volatility & bandsTrend
Updated 2 months ago · None stated GitHub repository of KC Combo Bull v4
1 stars

This Pine Script v6 strategy uses multi-timeframe analysis to identify intraday trends and generate trading signals. It requests higher-timeframe data for trend context via EMAs and Supertrend direction. On the local timeframe it plots EMA cross signals for lo

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Tn Sovereign MTF Intraday v6
106 stars

This strategy executes high-pyramiding trades using a combination of dynamic support and resistance breakout channels, the Supertrend indicator, and an array of predefined price levels. It tracks recent 100-bar extremes to permit buys on breakouts and manages

Strategy v5 TrendSupport & resistance
Updated 2 years ago · GPL-3.0 GitHub repository of Buy/Sell Test for More Freq

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