Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 64)

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

Price Volume Trend (PVT)

by mushroom-men-Trading
2 stars

This indicator calculates Price Volume Trend as a running sum of volume scaled by the bar's relative price change. It plots the cumulative PVT line and a simple moving average signal in a separate pane, plus a dashed zero line. The signal period sets the lengt

Indicator v6 VolumeTrend
Updated 9 months ago · None stated GitHub repository of Price Volume Trend (PVT)

PF IES probe 01 - adx regime

by pineforge-4pass
1 stars

PF IES probe 01 is a Pine Script v6 strategy that calculates ADX with a custom DI chain using ta.rma smoothing and manual plus/minus DM flow. It applies an ATR-ratio volatility gate comparing current ATR to its 42-period SMA to classify regimes into four categ

Strategy v6 TrendVolatility & bands
Updated 7 days ago · Apache-2.0 GitHub repository of PF IES probe 01 - adx regime
1 stars

A strategy that buys pullbacks in uptrends and sells rallies in downtrends. Trend comes from fast and slow EMAs with a minimum slope, an optional higher-timeframe EMA check defaulting to daily, and an ADX filter. A setup arms when price stretches an ATR distan

Strategy v6 Mean reversionTrend Repaints
Updated 8 days ago · GPL-3.0 GitHub repository of Trend-Aligned Mean Reversion Strategy

DEPV2 Debug S48

by YuceSezar89
1 stars

DEPV2 Debug S48 is a multi-symbol crypto indicator that monitors up to 20 cryptocurrency pairs across four analytical categories: trend, momentum, volatility, and volume. It evaluates trading conditions using several signal modes, including single-dimension tr

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 Debug S48

EMA Trend Ribbon

by vedkanani123
1 stars

A simple price-chart indicator that plots five exponential moving averages, defaulting to 8, 13, 21, 34 and 55 periods, as a ribbon with a shaded fill between the fastest and slowest. The ribbon is green when the averages are stacked in bullish order, red when

Indicator v6 Moving averagesTrend
Updated 2 months ago · None stated GitHub repository of EMA Trend Ribbon
1 stars

A Pine v4 strategy that plots a 21-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of SNXBTC EMA Cross Strategy

Trimean

by everget
947 stars

The Trimean indicator calculates Tukey's trimean measure of central tendency over a user-defined lookback period. It determines the 25th percentile, median, and 75th percentile of the selected source series to output a robust, outlier-resistant smoothed curve

Indicator v4 Moving averagesTrend
Updated 12 days ago · GPL-3.0 GitHub repository of Trimean
106 stars

BankNifty Bearish Intraday is an intraday short strategy designed for the Bank Nifty index. It evaluates multiple momentum and trend indicators across multiple timeframes, including MACD downticks on 5-minute, 15-minute, and 60-minute resolutions, an RSI below

Strategy v5 Oscillators & momentumTrend Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of BankNifty Bearish Intraday

This indicator calculates John Ehlers' 2-Pole Butterworth Filter, an infinite impulse response (IIR) second-order lowpass filter designed to remove high-frequency market noise with minimal phase lag. It processes price data using trigonometric functions and hi

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers 2-Pole Butterworth Filter (BUTTER2)

Colored fill

by be-thomas
65 stars

This indicator plots two simple moving averages of close, one over five bars and one over twenty bars, in a separate pane. It shades the area between the two plots green when the shorter average is above the longer average and red when it is below. There are n

Indicator v4 Moving averagesTrend
Updated 6 days ago · GPL-3.0 GitHub repository of Colored fill

Harami Cross - Bearish

by TWODS-CAPITAL
37 stars

This indicator identifies the bearish Harami Cross candlestick pattern on the price chart. The pattern consists of a long bullish candle followed by a Doji whose entire high-to-low range is contained within the real body of the preceding candle. Trend directio

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Harami Cross - Bearish
13 stars

Ruckard Kayseri A003 is a trend-following trading strategy based on moving average crossovers using a primary smoothed moving average and a fast moving average. It features built-in date filtering and integrated Zignaly webhook alert message formatting for aut

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Kayseri A003

This strategy calculates trend direction across three user-defined higher timeframes using dual Simple Moving Averages, filtered by On-Balance Volume and Commodity Channel Index conditions alongside fractal pivot swings. Entries trigger when multi-timeframe tr

Strategy v5 TrendMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of Fractals with Pivot Trendlines Strategy

Quadruple EMA (QEMA)

by mushroom-men-Trading
2 stars

The Quadruple Exponential Moving Average (QEMA) indicator calculates a smoothed, low-lag moving average by cascading four exponential moving average stages with dynamic warmup compensation. It plots directly on the price chart as an overlay line. Users can adj

Indicator v6 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of Quadruple EMA (QEMA)
1 stars

This strategy builds a directional bias from three exponential moving averages drawn on the price chart. It scores bullish and bearish alignment of the fast, slow, and trend averages, plus whether price is above or below that structure, and treats a score at o

Strategy v6 TrendMoving averages
Updated 7 days ago · Apache-2.0 GitHub repository of PF IES probe 02 - three-ema bias

DEPV2 DEBUG S5

by YuceSezar89
1 stars

DEPV2 DEBUG S5 monitors a multi-ticker basket of up to twenty cryptocurrency pairs across four analytical dimensions: trend, momentum, volatility, and volume. It evaluates market signals using customizable modes, including individual method triggers, simultane

Indicator v6 Screeners & dashboardsTrend Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S5

Evasive SuperTrend

by vedkanani123
1 stars

A SuperTrend variant for the price chart based on ATR bands around the midpoint of each bar. When price comes closer to the active band than a noise threshold measured in ATRs, the band is pushed away by an expansion amount instead of tightening, which reduces

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Evasive SuperTrend
1 stars

This overlay strategy builds a weighted score from three factors. Trend is positive when a fast EMA is above a slow EMA and negative otherwise. Momentum is positive when 14-period RSI is above 50. The volatility factor is positive when close is above a 20-peri

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of TN Multi-Factor Sovereign V6
330 stars

MACD + Divergences [Alorse] is a momentum strategy that calculates the MACD oscillator and identifies regular and hidden divergences using pivot high and low points. It filters trade signals with dual Exponential Moving Averages (EMA 150 and 600) to ensure tra

Strategy v4 Oscillators & momentumDivergence Repaints
Updated 2 months ago · None stated GitHub repository of MACD + Divergences [Alorse]

This indicator plots John Ehlers' two-pole Super Smoother as a line on the price chart. It applies a two-pole IIR Butterworth-style lowpass to the selected source, averaging the current and previous values and mixing them with two prior filter outputs. Length

Indicator v6 Trend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers 2-Pole Super Smoother Filter (SSF2)
13 stars

Ruckard Kayseri B003 is a trend-following strategy designed to generate trade entries based on the interaction between a fast moving average and a main smoothed moving average. It incorporates customizable position management features, including fixed percenta

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Kayseri B003

VWAP and VWMA

by Web3Degenerate
2 stars

This indicator plots either a Volume Weighted Average Price (VWAP) or a Volume Weighted Moving Average (VWMA) directly on the price chart, coloring the line based on whether the close is above or below it. It generates trading signals by combining the trend fi

Indicator v5 Moving averagesCandlestick patterns
Updated 2 years ago · None stated GitHub repository of VWAP and VWMA

P_syn_strategy_full

by GammaExpansion
1 stars

P_syn_strategy_full is a crossover strategy that plots the 20-period simple moving average of close on the price chart. It generates long signals on crossover and short signals on crossunder. Long entries use limit and stop orders with 10 percent equity positi

Strategy v6 TrendMoving averages
Updated 7 days ago · MIT GitHub repository of P_syn_strategy_full

DEPV2 DEBUG S50

by YuceSezar89
1 stars

This indicator is a debug pane for a multi-symbol signal model. It watches up to twenty user-chosen symbols, defaulting to Binance perpetual crypto pairs, and combines four method classes: trend, momentum, volatility, and volume. Signal mode selects a single c

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S50

Neural Network

by zhuzp98
1 stars

A Pine version 4 strategy that scores long and short setups by adding weighted votes from many indicator conditions: EMA trend, SuperTrend, Parabolic SAR, Hull moving average, RSI, MACD, WaveTrend, stochastic, Bollinger Bands and ATR. It trades when the score

Strategy v4 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of Neural Network
1 stars

A Pine v4 strategy based on a Guppy-style ribbon of 22 exponential moving averages: seven fast ones from 3 to 21 and fifteen slow ones from 24 to 66, with an optional 200 EMA. It trades when the ribbon groups line up in order, with an option for earlier signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of Super Guppy Strategy

This strategy evaluates trades using an SMA baseline, Hull Moving Average trend filter, and ATR volatility conditions. It triggers long entries when price exceeds the baseline by an ATR qualifier distance while trading above the HMA trend bias, with an optiona

Strategy v5 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Baseline Cross Qualifier Volatility Strategy with HMA Trend Bias

The Ehlers 3-Pole Butterworth Filter calculates a smoothed low-pass trend line based on John F. Ehlers' 3-pole Infinite Impulse Response (IIR) filter design. It filters out high-frequency noise while minimizing lag compared to standard moving averages. The ind

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers 3-Pole Butterworth Filter (BUTTER3)

Conditional Colors

by be-thomas
65 stars

This script calculates a Simple Moving Average (SMA) of close prices and dynamically changes its plot color based on whether the average is rising or falling. When the SMA is higher than its previous bar value, it plots in the bullish color; otherwise, it uses

Indicator v4 Moving averagesTrend
Updated 6 days ago · GPL-3.0 GitHub repository of Conditional Colors

Hull Moving Average

by TWODS-CAPITAL
37 stars

This indicator calculates and plots the standard Hull Moving Average (HMA) directly on the main price chart. The HMA aims to reduce lag while preserving smoothing by combining weighted moving averages over half-length and full-length periods, followed by a fin

Indicator v5 Moving averagesTrend
Updated 3 years ago · MIT GitHub repository of Hull Moving Average
1 stars

This strategy calculates candle-position buying pressure derived from the close relative to the high-low range, smoothed through a double exponential moving average chain with a momentum overlay. It evaluates a multi-step pressure ladder to identify bullish an

Strategy v6 Oscillators & momentumTrend
Updated 7 days ago · Apache-2.0 GitHub repository of PF IES Probe 04 - Pressure Gauge

DEPV2 DEBUG S6

by YuceSezar89
1 stars

DEPV2 DEBUG S6 is a multi-symbol cryptocurrency indicator that combines signals from trend, momentum, volatility, and volume methods. It generates buy and sell signals based on user-selected modes including simultaneous confirmation of at least N methods, sequ

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S6

GROK NO.1 Major Move

by vedkanani123
1 stars

An indicator for the price chart that marks buy and sell flips and then stays on that side until a reversal. A flip needs several conditions on a closed bar, including a broken ATR trail for consecutive closes, a close through the last confirmed swing, an impu

Indicator v6 TrendBreakout Repaints
Updated 2 months ago · None stated GitHub repository of GROK NO.1 Major Move

Volatility Stop

by ivansoft
1 stars

Plots a trailing stop level on the price chart based on ATR, drawn as crosses that are green in an uptrend and red in a downtrend. The stop follows the highest or lowest source value since the last flip, offset by an ATR multiple. Inputs set ATR length, source

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

TRXBTC EMA Cross Strategy is a trend-following cryptocurrency strategy that executes trades based on single Exponential Moving Average price positioning and candle color. It plots a customizable EMA on the main price chart and triggers a long position when a b

Strategy v4 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of TRXBTC EMA Cross Strategy
261 stars

The Multiple Regression Polynomial Forecast indicator calculates linear and polynomial regression forecasts using array data sampled from price series. It plots projected regression channel lines directly on the price chart to visualize trend direction and pot

Indicator v5 TrendSupport & resistance
Updated 4 years ago · None stated GitHub repository of Multiple Regression Polynomial Forecast

This indicator calculates John F. Ehlers' 3-Pole Super Smoother Filter (SSF3), an advanced infinite impulse response filter designed to remove high-frequency market noise while retaining rapid responsiveness to price changes. It evaluates a selected input sour

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers 3-Pole Super Smoother Filter (SSF3)

Ichimoku Cloud

by TWODS-CAPITAL
37 stars

This indicator plots the classic Ichimoku Cloud on the price chart. It calculates the conversion line and base line as midpoints of the highest and lowest prices over their lengths, then averages those lines for Leading Span A and uses a longer midpoint for Le

Indicator v5 TrendSupport & resistance
Updated 3 years ago · MIT GitHub repository of Ichimoku Cloud
13 stars

This strategy draws on the price chart and trades long, short, or both using simple moving averages of an ohlc4 source together with ADX and directional-index key levels. It can display a high and low closing moving-average ribbon and limit activity with optio

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Ruckard Lunatic A003

This indicator classifies market behavior into momentum, mean-reversion, noise, or mixed regimes. It fuses four statistical predictability sensors—Variance Ratio across multiple horizons, return autocorrelation, Hurst exponent approximation, and fractal effici

Indicator v6 TrendMean reversion
Updated 3 days ago · MIT GitHub repository of Predictability Regime Index [WavesUnchained]

Regularized EMA (REMA)

by mushroom-men-Trading
2 stars

The Regularized EMA indicator plots a single smoothed average of a chosen price source on the price chart. It blends an exponential moving average update with a regularization term controlled by lambda, where zero applies maximum smoothing and one matches a st

Indicator v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Regularized EMA (REMA)

P_syn_tuples

by GammaExpansion
1 stars

This indicator serves as a synthetic test script demonstrating tuple destructuring syntax in Pine Script v6. It calls multiple technical functions that return tuples, including a custom min-max function on candle bodies, MACD, Supertrend, Bollinger Bands, and

Indicator v6 TrendOscillators & momentum
Updated 7 days ago · MIT GitHub repository of P_syn_tuples

DEPV2 DEBUG S7

by YuceSezar89
1 stars

DEPV2 DEBUG S7 is a Pine Script v6 indicator that draws in a separate pane. It tracks up to twenty user-selected symbols, defaulting to Binance USDT perpetual crypto pairs. Signals use trend, momentum, volatility, and volume methods alone, together, or in a ti

Indicator v6 Screeners & dashboardsTrend Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S7

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