Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 68)

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

1 stars

This strategy analyzes closing prices from three simultaneous multi-timeframe security feeds: 60-minute, 240-minute, and daily. It identifies confluence when all three closes are rising (allUp) or falling (allDown) from the prior bar. When allUp and no long po

Strategy v6 TrendSMC / ICT / price action
Updated 7 days ago · Apache-2.0 GitHub repository of PF MTF probe 07 - triple TF close
1 stars

This strategy identifies pivot-based Darvas Box levels on the price chart and trades re-entries following box sweeps. A long position arms when the price dips below the lower boundary and triggers when it closes back inside, provided the price is above a highe

Strategy v6 Support & resistanceBreakout
Updated 2 months ago · None stated GitHub repository of TN Sovereign Darvas Box v6
106 stars

This strategy plots modified Bollinger Bands and an exponential moving average on the price chart. It watches for closes crossing the upper or lower band, optionally filtered by the EMA trend and extra crossover or crossunder checks. Long stops use the recent

Strategy v5 Volatility & bandsMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Bands Modified (Stormer)
13 stars

This strategy plots a Noro trend ribbon on the price chart and uses ribbon side changes to choose long or short direction. It opens a long when price is below a high-low corridor during a long bias, and a short when price is above that corridor during a short

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon Q012

Swing Trade Strategy

by eddiebelaval
7 stars

Swing Trade Strategy evaluates market conditions by aggregating directional signals across ten trend and momentum indicators, including an Arnaud Legoux Moving Average, Relative Momentum Index, Double Exponential Moving Average, Directional Movement Index, and

Strategy v6 TrendOscillators & momentum
Updated 3 months ago · None stated GitHub repository of Swing Trade Strategy
1 stars

A test strategy from a reference corpus that calls a user-defined MACD histogram function on 60-minute, 4-hour and daily data with lookahead off. It goes long when all three histograms are positive and short when all three are negative, closing the opposite po

Strategy v6 Oscillators & momentumTrend
Updated 7 days ago · Apache-2.0 GitHub repository of PF MTF Probe 08 Triple TF MACD Histogram
1 stars

This strategy plots Donchian upper and lower channels along with the midpoint on the price chart. It generates long signals on a price crossover above the upper Donchian band when volume exceeds a moving average multiple if the filter is enabled, and short sig

Strategy v6 TrendBreakout
Updated 2 months ago · None stated GitHub repository of TN Sovereign Donchian Breakout

[RS]Donchian Fans

by ricardosantos79
261 stars

This indicator plots Donchian Channel boundary lines along with dynamic fan projections directly on the price chart. It calculates the highest high, lowest low, and median price over a customizable lookback period. Whenever price establishes a new channel high

Indicator v4 Support & resistanceTrend
Updated 4 years ago · None stated GitHub repository of [RS]Donchian Fans

MultiIndicator

by capissimo
114 stars

MultiIndicator combines multiple technical indicators into a single separate pane to save chart space. It calculates and displays market regime detection based on ordinary least squares regression, a Holt exponential smoothing crossover, normalized RSI, ADX, a

Indicator v4 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of MultiIndicator

This indicator implements John Ehlers' Hilbert Transform Trend vs Cycle Mode algorithm cross-checked against TA-Lib standards. It analyzes dominant cycle periods, phase changes, and sine wave components from a price input to determine whether the market is tre

Indicator v6 Trend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Hilbert Transform Trend vs Cycle Mode (HT_TRENDMODE)

Structural Wave Field is a market structure indicator that evaluates structural flow, internal wave energy, and structural integrity across multiple time horizons. It combines momentum, velocity, and acceleration with wave segmentation and Elliott-context sequ

Indicator v6 SMC / ICT / price actionTrend
Updated 3 days ago · MIT GitHub repository of Structural Wave Field [WavesUnchained]
1 stars

A test strategy from a reference corpus that studies start-up behaviour of a daily 26-period EMA requested from a lower-timeframe chart without lookahead. It goes long while the daily EMA is rising and short while it is falling, closing the opposite position f

Strategy v6 TrendMoving averages
Updated 7 days ago · Apache-2.0 GitHub repository of PF MTF Probe 09 Daily EMA Warmup
1 stars

This strategy filters fakeout signals using a 4-layer causal scoring system to ensure high-conviction entries on the price chart. It computes a sovereign score based on volume exceeding a moving average multiplier, alignment with higher-timeframe EMA, minimum

Strategy v6 TrendVolatility & bands Repaints
Updated 2 months ago · None stated GitHub repository of TN Sovereign Fakeout Filter
9 stars

This indicator quantifies the risk of a prevailing market structure break by combining trend context, structure, and momentum into a composite 0–100 risk score. It plots an RSI oscillator with momentum divergence lines in a separate pane while projecting key b

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 3 days ago · MIT GitHub repository of Structure Break Risk

Trend Line Methods

by eddiebelaval
7 stars

Trend Line Methods draws optional trend geometry on the price chart. The pivot span method stores recent pivot highs and lows using left and right confirmation bars, a pivot count, and a lookback length, then plots a high trend line and a low trend line with a

Indicator v6 TrendSupport & resistance
Updated 3 months ago · None stated GitHub repository of Trend Line Methods
1 stars

This indicator computes a confluence score from Gann angles and Fibonacci retracements anchored to a user base price, step size, swing low and high. It layers in RSI for oversold conditions and Bollinger Bands distance for additional context. The score increme

Indicator v5 Support & resistanceOscillators & momentum
Updated 7 weeks ago · None stated GitHub repository of Gann Time Machine Signal Engine
1 stars

This overlay strategy builds long and short signals from a fast EMA crossing a slow EMA. Optional filters require elevated volume versus a volume average, a set number of confirmation bars, alignment with a higher-timeframe EMA, and a minimum bar move versus A

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign Fakeout Filter v6

Volatility Stop

by ivansoft
1 stars

An indicator on the price chart that plots a trailing stop line offset from a chosen source by a multiple of the Average True Range. Settings set the source, the ATR length and the ATR factor. The line can be drawn as a line, circles, diamonds or arrows in one

Indicator v5 Volatility & bandsTrend
Updated 1 year ago · None stated GitHub repository of Volatility Stop

[RS]Standardized Trend Map

by ricardosantos79
261 stars

Standardized Trend Map calculates series momentum relative to active price range across 40 distinct lookback periods ranging from 2 to 80 bars on an exponential moving average source. Each standardized calculation rounds to an integer values of -1, 0, or 1 to

Indicator v4 TrendOscillators & momentum
Updated 4 years ago · None stated GitHub repository of [RS]Standardized Trend Map

Ehlers Laguerre Filter

by mihakralj
99 stars

The Ehlers Laguerre Filter is a smoothing indicator designed by John F. Ehlers that utilizes a four-element cascaded infinite impulse response filter. It applies time-warped Laguerre polynomials to the chosen price source to achieve low-lag trend filtering. Tr

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Laguerre Filter
1 stars

The script detects pivot highs and lows on the price chart using user-defined left and right bars. It projects future price paths with the golden ratio and calculates intersection points between paths. These intersections are stored in an array for geometric b

Strategy v5 Support & resistanceTrend
Updated 7 weeks ago · None stated GitHub repository of Geometric Path Backtest with BG
1 stars

This price-chart strategy enters long when a fast EMA crosses above a slow EMA and short when it crosses below, provided optional filters pass. Volume must exceed a multiple of its average, price must sit on the matching side of a higher-timeframe EMA, and the

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Tn Sovereign Fakeout v6

Volatility Stop MTF

by ivansoft
1 stars

An indicator on the price chart that plots an ATR-based volatility stop taken from a higher timeframe. The higher timeframe is picked in discrete steps, as a multiple of the chart timeframe, or as a fixed timeframe. It can detect when chart bars breach the hig

Indicator v5 Volatility & bandsTrend
Updated 1 year ago · None stated GitHub repository of Volatility Stop MTF

Calculates John Ehlers' Linear Predictive Filter based on the Griffiths Least Mean Squares adaptive predictor algorithm. It processes the source price through a roofing filter combining a highpass filter and SuperSmoother lowpass filter, followed by automatic

Indicator v6 Oscillators & momentumTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Linear Predictive Filter (LPF)

Example 9

by be-thomas
65 stars

This script retrieves non-standard Kagi chart data for the active symbol using a fixed reversal threshold of one. It extracts the closing price of the Kagi bars through the security function and plots the resulting values directly onto the main price chart pan

Indicator v4 Trend Repaints
Updated 6 days ago · GPL-3.0 GitHub repository of Example 9

The Stoller Average Range Channel (STARCHANNEL) plots volatility-based bands around a central baseline directly on the price chart. It calculates a middle line using a simple moving average of the selected price source and constructs upper and lower boundaries

Indicator v6 Volatility & bandsMoving averages
Updated 8 months ago · MIT GitHub repository of Stoller Average Range Channel (STARCHANNEL)
3 stars

HTF Condition Strategy is a multi-timeframe trading strategy that evaluates market structure conditions on both a higher timeframe and the current chart timeframe. Users can configure entry rules combining conditions such as bullish bias, higher lows, or lower

Strategy v5 TrendScreeners & dashboards
Updated 5 months ago · None stated GitHub repository of HTF Condition Strategy

NIFTY 5m Supertrend Scalper

by vedkanani123
1 stars

A price-chart indicator designed for the one-minute chart of Indian index instruments. It computes a Supertrend with ATR length 10 and multiplier 3 on confirmed five-minute bars, so a flip signal appears on the first one-minute bar after the five-minute close.

Indicator v6 TrendScalping
Updated 2 months ago · None stated GitHub repository of NIFTY 5m Supertrend Scalper
1 stars

A Fibonacci pullback strategy on the price chart. It finds the highest high and lowest low over a lookback, then draws long and short retracement levels at a chosen ratio from 0.236 to 0.786. A trade is only considered at one specific hour, in the direction of

Strategy v6 Support & resistanceTrend
Updated 2 months ago · None stated GitHub repository of TN Sovereign Fibonacci
47 stars

This indicator calculates a two-pole IIR Butterworth-style supersmooth lowpass filter and plots the resulting smoothed curve directly on the price chart overlay. It filters out high-frequency noise from market data with minimal lag. The user can adjust the cal

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Supersmooth Filter (SSF)

This indicator overlays multiple technical analysis tools onto the main price chart to establish multi-filter trend confluence. It calculates dual anchored VWAPs, dual Supertrend indicators, moving averages, Kijun-sen Donchian midlines, and weekly pivot points

Indicator v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of Ichimoku Cloud with Donchian Channels

PF poc exit-while-flat false

by pineforge-4pass
1 stars

PF poc exit-while-flat false is an overlay strategy designed to test Pine Script execution engine parity. It calculates 9-period and 21-period Exponential Moving Averages (EMA). When a bullish crossover occurs while flat, it places a limit buy order 2% below t

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of PF poc exit-while-flat false
1 stars

Golden Ichimoku by BITMOON618 calculates and plots dynamic Ichimoku clouds directly on the price chart based on a user-selected time range between two timestamps. The script determines a custom bar length from the range and generates three scaled cloud structu

Indicator v5 TrendSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Golden Ichimoku by BITMOON618
1 stars

This strategy pairs the Fisher Transform oscillator with a long-term exponential moving average trend filter to execute trend-aligned reversal entries. It enters long when the Fisher line crosses above its trigger line while price remains above the EMA, and en

Strategy v6 Oscillators & momentumTrend
Updated 2 months ago · None stated GitHub repository of Tn Sovereign Fisher v6

This strategy combines three technical indicators: the Boom Hunter Pro oscillator, the Hull Suite moving average, and a Volatility Oscillator. It calculates trade entries from indicator conditions, using recent swing high and low lookbacks to set stop loss lev

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Boom Hunter + Hull Suite + Volatility Oscillator Strategy

Moving Average Ribbon

by TWODS-CAPITAL
37 stars

This indicator plots up to four customizable moving averages directly on the price chart to create a ribbon visualizer for tracking trends. Users can independently toggle each line, choose from multiple calculation types including SMA, EMA, SMMA, WMA, and VWMA

Indicator v5 Moving averagesTrend
Updated 3 years ago · MIT GitHub repository of Moving Average Ribbon

Trade Permission Engine evaluates whether market structure currently permits long or short trades, alongside a decoupled Position Health score for managing existing positions. It analyzes alternating confirmed swing legs, Fibonacci retracement depths, time mat

Indicator v6 SMC / ICT / price actionTrend
Updated 3 days ago · MIT GitHub repository of Trade Permission Engine [WavesUnchained]

ID50

by g-moe
3 stars

The ID50 indicator identifies pullback opportunities to the 50-period exponential moving average (EMA) within an established trend. It plots a fast EMA and a slow EMA with a color-coded cloud between them to define trend direction. When price touches the slow

Indicator v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of ID50

Weighted Moving Average (WMA)

by mushroom-men-Trading
2 stars

The Weighted Moving Average indicator computes a weighted average of price data using an optimized circular buffer for efficient calculation. It plots the WMA line on the price chart as an overlay. The period setting determines the lookback window, and the sou

Indicator v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Weighted Moving Average (WMA)

PF poc exit-while-flat true

by pineforge-4pass
1 stars

This strategy is a validation probe designed to test order execution behavior when issuing bracket exit orders while flat alongside a pending limit entry. It calculates 9-period and 21-period exponential moving averages on price data. On a bullish EMA crossove

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of PF poc exit-while-flat true

Trend Breakout

by GammaExpansion
1 stars

Trend Breakout is a price-chart strategy that builds a simple moving average and upper and lower bands from a multiple of standard deviation. It enters long when close crosses above the upper band and short when close crosses below the lower band. Position siz

Strategy v6 TrendBreakout
Updated 7 days ago · MIT GitHub repository of Trend Breakout

NO.1 Major Daily Signal

by vedkanani123
1 stars

A price-chart indicator that marks only buy and sell labels, with no trail, cloud or dashboard. A signal closes any opposite position and flips direction. It combines a fast zero-lag EMA, slow EMA, Hull average and macro EMA with slope, separation, ADX, DMI sp

Indicator v6 TrendSessions & time Repaints
Updated 2 months ago · None stated GitHub repository of NO.1 Major Daily Signal

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