Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 56)

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

Neural Network

by zhuzp98
1 stars

A strategy that scores many indicators and trades when the total reaches a set threshold. Inputs weight an EMA trend, SuperTrend, Parabolic SAR, Hull average, RSI, MACD, WaveTrend, Stochastic, Bollinger and ATR signals, including divergences. Separate strong a

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

VHF Indicator

by JohnsonHsiao
1 stars

This indicator calculates the Vertical Horizontal Filter (VHF) to help identify whether a market is trending or ranging. It measures the difference between the highest and lowest close over a user-defined period and divides it by the sum of absolute bar-to-bar

Indicator v5 TrendVolatility & bands
Updated 3 years ago · None stated GitHub repository of VHF Indicator
257 stars

Calculates three weighted moving averages (11-period, 48-period, and 200-period WMAs) to evaluate market trend conditions directly on the price chart. It monitors crossovers between price and WMAs as well as crossovers between the moving averages themselves to

Indicator v5 TrendMoving averages
Updated 7 weeks ago · None stated GitHub repository of Snag - NEW SWING FAST
228 stars

This indicator computes moving average and RSI bias signals across the current timeframe and four higher timeframes. It sums biases from the MA and RSI to derive an overall bullish or bearish signal. The results appear in a configurable table that displays eac

Indicator v6 TrendMoving averages
Updated 3 months ago · None stated GitHub repository of Multi-Timeframe Analysis Template
114 stars

This indicator calculates key support and resistance levels by analyzing the first and second momentum derivatives of a Double Exponential Moving Average (DEMA). When the second derivative (momentum of momentum) crosses zero, it identifies local turning points

Indicator v4 Support & resistanceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Support and Resistance Levels

AlphaTrend

by hasnocool
106 stars

AlphaTrend calculates a trailing trendline using ATR bands combined with momentum or volume filters (MFI by default, or RSI when volume data is disabled). It plots the AlphaTrend line alongside a two-bar delayed reference line directly on the price chart. The

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of AlphaTrend

This indicator calculates a Gaussian-weighted moving average of a chosen price source and plots it on the price chart. It builds a finite impulse response window, weights past bars with a normalized Gaussian bell, and returns the weighted mean. Period sets the

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Gaussian-Weighted Moving Average (GWMA)

Dark Cloud Cover - Bearish

by TWODS-CAPITAL
37 stars

Identifies the two-candle Dark Cloud Cover bearish reversal candlestick pattern on price charts. The indicator evaluates the prevailing trend using optional simple moving averages (SMA 50 or SMA 200) and checks for a strong bullish candle followed by a bearish

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Dark Cloud Cover - Bearish
16 stars

This strategy plots on the price chart and trades Donchian breakouts in long or short directions. It sizes each unit from a risk percentage of price and an ATR-based initial stop, then adds units at a fixed ATR step up to a maximum. An ATR trail can exit, and

Strategy v6 TrendVolatility & bands
Updated 12 months ago · None stated GitHub repository of Seykota Alt 39: Adaptive Targets

This indicator classifies market state into bull, bear, or neutral regimes using three moving averages and ATR-based stop bands plotted directly on the price chart. It evaluates alignment across customizable MA types (SMA, EMA, DEMA, TEMA, or JMA) and filters

Indicator v6 TrendMoving averages
Updated 3 days ago · MIT GitHub repository of MA Regime Bands [WavesUnchained]

MTF EMA + MACD

by krosenfeld7
5 stars

This indicator plots two multi-timeframe exponential moving averages on the price chart and calculates a MACD from the chart source. It marks Long when the shorter-timeframe EMA is above the longer one and a counted sequence of MACD and signal crosses reaches

Indicator v4 TrendMoving averages Repaints
Updated 3 years ago · Apache-2.0 GitHub repository of MTF EMA + MACD
4 stars

This strategy calculates fast and slow exponential moving averages, the Relative Strength Index, and the Average True Range directly on the price chart. It enters long positions when the fast EMA crosses above the slow EMA with RSI above the minimum threshold

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of NQ Nasdaq Strategy [trugurpala]
3 stars

This overlay indicator draws supply and demand zones from prior swing highs and lows, treating supply as resistance and demand as support. It places price-action labels at swing points using higher-high, lower-high, higher-low, and lower-low tags. It also plot

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 5 months ago · None stated GitHub repository of CSW Technical-Analysis
3 stars

Price Action Market Structure Sweeps identifies swing and internal market structure events, including Break of Structure (BOS) and Change of Character (CHoCH). It overlays key high and low levels across daily, weekly, monthly, and yearly timeframes, while mark

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 12 months ago · None stated GitHub repository of Price Action Market Structure Sweeps

Gucci 1.0

by wynnforthework
2 stars

Gucci 1.0 is a Pine Script strategy that identifies trend reversals using 55 EMA and 200 EMA crossovers combined with custom high and low levels from recent closes. It plots open, close, high/low period values, and both EMAs on the price chart. Long signals fi

Strategy v5 TrendMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of Gucci 1.0

The Volatility Breakout (Larry Williams) strategy generates signals based on price movements relative to yesterday's range. Long entries occur when price surpasses the close by a user-defined multiple of the range, while short entries use a lower multiple. A t

Strategy v6 BreakoutVolatility & bands
Updated 4 days ago · MPL-2.0 GitHub repository of Volatility Breakout (Larry Williams) [JR]
1 stars

This indicator detects long-only trading setups centered on volume-weighted average price (VWAP) reclaim sequences. It calculates VWAP with standard deviation bands, tracking slope and price bias through an exponential moving average. Signals trigger on either

Indicator v6 TrendMoving averages
Updated 4 days ago · None stated GitHub repository of VWAP Reclaim (LONG-only) Indicator

MTF Second-Flip Continuation

by rosijay17-cmd
1 stars

A strategy that trades continuation after a second directional flip, intended for a 15-minute chart. Bias must agree between confirmed one-hour and four-hour structure. Lower-timeframe states are rebuilt relative to the bar open, the setup is frozen once the s

Strategy v6 TrendSessions & time
Updated 8 days ago · GPL-3.0 GitHub repository of MTF Second-Flip Continuation

DEPV2 DEBUG S18

by YuceSezar89
1 stars

This Pine Script indicator scans multiple Binance cryptocurrency symbols including BTCUSDT, ETHUSDT, and others. It computes signals across four method classes: trend, momentum, volatility, and volume. Different signal modes include single-method, simultaneous

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

A momentum consensus indicator drawn on the price chart. It scores RSI, rate of change, MACD, Bollinger position, MFI and smoothed OBV against a percentile lookback and issues buy and sell signals when the consensus passes a threshold, 0.618 by default. Option

Indicator v6 Oscillators & momentumTrend
Updated 2 months ago · None stated GitHub repository of Adaptive Momentum Classifier

Moving Average Simple

by ivansoft
1 stars

Plots a simple moving average on the price chart with adjustable length, source and offset. An optional second smoothing line can be added to the result using SMA, EMA, SMMA, WMA or VWMA, or SMA with Bollinger Bands whose width follows a multiplier. The defaul

Indicator v6 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Moving Average Simple
1 stars

An overlay indicator that is one component of a weighted scoring system. It draws a 200-bar trend EMA and four shorter EMAs of 9, 21, 55 and 100 bars, with fills between price and each average coloured by slope. It also converts the trend into weighted scores:

Indicator v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Neural Network Sub 11 Trend EMA
330 stars

Range Filter [Alorse] is a technical indicator overlay for TradingView designed to filter market volatility and identify price trends. It calculates a smoothed range based on historical volatility using a configurable sampling period and multiplier applied to

Indicator v5 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Range Filter [Alorse]
114 stars

Calculates classic pivot points, support, and resistance levels based on previous bar high, low, and close values. It generates long entry signals when the close price crosses above the central pivot point and short entry signals when it drops below. Position

Indicator v4 Support & resistanceTrend
Updated 1 year ago · None stated GitHub repository of Support and Resistance Strategy
106 stars

This strategy plots an AlphaTrend line on the price chart and trades crossovers against the same line two bars earlier. It builds the line from a smoothed true-range band and either Money Flow Index or RSI, depending on the no-volume setting. A crossover opens

Strategy v5 TrendVolatility & bands Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of AlphaTrend For ProfitView
99 stars

The Chande Kroll Stop calculates volatility-based adaptive trailing stops for long and short positions. It determines an initial volatility envelope by subtracting or adding a scaled Average True Range from the highest high or lowest low over a set lookback pe

Indicator v6 TrendVolatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of Chande Kroll Stop (CKSTOP)
47 stars

This indicator plots a Hamming-window finite impulse response moving average of a chosen price source on the price chart. It weights recent bars with the Hamming cosine window, renormalizes by the sum of weights, and uses only bars available during warm-up so

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Hamming Moving Average (HAMMA)
16 stars

This strategy trades Donchian breakouts on the price chart and tries to avoid choppy conditions. It can enter long or short when price breaks the entry channel and optional ADX, efficiency-ratio, and trend-strength filters pass. It exits on the shorter Donchia

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 3: Anti-Chop Filter

This indicator treats price action, RSI, or moving average relationships as binary Bernoulli trials to estimate trend probability and Shannon entropy over a rolling sample window. It calculates the proportion of bullish outcomes and measures market uncertainty

Indicator v6 Oscillators & momentumTrend
5 stars

MTF EMA + MACD Long Strategy is a trend-following long-only strategy that combines higher-timeframe Exponential Moving Averages with MACD crossovers. It calculates two multi-timeframe EMAs to establish overall trend direction and uses MACD crossovers to genera

Strategy v4 TrendOscillators & momentum Repaints
Updated 3 years ago · Apache-2.0 GitHub repository of MTF EMA + MACD Long Strategy

Pro V3 [SMRT Algo]

by IAMATOMIC001
3 stars

Pro V3 [SMRT Algo] is a multi-functional technical analysis overlay that generates buy and sell trading signals based on ATR supertrend logic and linear regression analysis. It offers optional moving average filtering alongside a suite of visual technical over

Indicator v5 TrendSupport & resistance
Updated 12 months ago · None stated GitHub repository of Pro V3 [SMRT Algo]

Sniper Algo

by TamTH-Dev
2 stars

Sniper Algo is a multi-indicator technical analysis suite that plots directly on the main price chart. It integrates Ichimoku Kinko Hyo components, automated support and resistance zones, dual exponential moving averages, and optional buy and sell signals. Use

Indicator v5 TrendSupport & resistance
Updated 6 weeks ago · None stated GitHub repository of Sniper Algo

Adaptive Market Profile

by regalouisei
2 stars

This indicator plots an adaptive trend channel and market profile directly on the price chart. It calculates linear regression channels either automatically or using a fixed bar period, with support for logarithmic scaling. The script divides the channel into

Indicator v6 TrendVolume
Updated 8 months ago · None stated GitHub repository of Adaptive Market Profile

Holt-Winters Moving Average (HWMA)

by mushroom-men-Trading
2 stars

The Holt-Winters Moving Average (HWMA) indicator applies a triple exponential smoothing algorithm to track price trends by filtering noise while maintaining responsiveness. It computes level, velocity, and acceleration components from a chosen price source ove

Indicator v6 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of Holt-Winters Moving Average (HWMA)
2 stars

Hull + Volatility + Boom Hunter is a strategy overlay that combines Hull Moving Average variations with Boom Hunter oscillator components. Drawn directly on the main price chart, it tracks market trend direction and momentum. Settings allow switching between s

Strategy v5 TrendMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of Hull + Volatility + Boom Hunter

VWAP Reclaim Indicator

by skipp-dev
1 stars

This overlay indicator plots an anchored VWAP and marks reclaim setups on the price chart. It can signal a simple VWAP cross or a reclaim, retest, and breakout of a rolling pullback high or low, filtered by trade direction and optional matching VWAP slope. A p

Indicator v6 TrendVolume Repaints
Updated 4 days ago · None stated GitHub repository of VWAP Reclaim Indicator

DEPV2 DEBUG S19

by YuceSezar89
1 stars

This indicator monitors and analyzes up to 20 cryptocurrency pairs across four core analytical dimensions: trend, momentum, volatility, and volume. It generates signals using several selectable modes, including single-factor triggers, simultaneous multi-method

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

IWBDT Strategy

by GreyssonEnterprises
1 stars

A strategy version of a multi-timeframe breakout approach. It reads trend from 9 and 18 period EMAs on three higher timeframes, with the chart timeframe optional, and can trade long and short sides independently. Settings include a risk-to-reward target, a ris

Strategy v4 TrendBreakout
Updated 3 months ago · MIT GitHub repository of IWBDT Strategy
947 stars

The Holt Exponential Moving Average (HEMA) indicator calculates a trend-following line using double exponential smoothing. It accounts for both level smoothing via the alpha length and trend adjustment via the gamma length. The indicator overlays directly on t

Indicator v4 Moving averagesTrend
Updated 12 days ago · GPL-3.0 GitHub repository of Holt Exponential Moving Average

Snag - SPY

by dearvn
257 stars

Snag - SPY is an overlay indicator that tracks market trends using three Weighted Moving Averages (WMA 13, WMA 48, and WMA 200). It plots the three WMAs directly on the main price chart and calculates crossovers between price and the moving averages, as well a

Indicator v5 TrendMoving averages
Updated 7 weeks ago · None stated GitHub repository of Snag - SPY
228 stars

This indicator calculates and plots trend direction across four customizable timeframes in a separate pane. It evaluates whether the close is above or below a moving average for each timeframe, assigning directional values that sum into an aggregate alignment

Indicator v6 TrendMoving averages
Updated 3 months ago · None stated GitHub repository of Multi-Timeframe Trend Alignment
114 stars

This script plots pivot-based support and resistance levels on the price chart while generating directional trade labels tagged with RSI values to measure momentum at turning points. It overlays multi-timeframe open and close step lines with background fills t

Indicator v4 Support & resistanceOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of Support and Resistance Strategy (v.2)

AlphaTrend Strategy

by hasnocool
106 stars

Calculates the AlphaTrend indicator using ATR combined with the Money Flow Index or RSI, plotting the primary trend line and its two-bar lagged counterpart directly on the price chart. The strategy opens long positions when AlphaTrend crosses above its lagged

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of AlphaTrend Strategy
47 stars

This indicator plots a Hanning-window finite impulse response moving average of a selected price source on the price chart. It weights the lookback with the classic raised-cosine Hanning coefficients, rebuilds those weights when the effective window grows duri

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Hanning Moving Average (HANMA)

Directional Movement Index

by TWODS-CAPITAL
37 stars

This indicator plots the Directional Movement Index in a separate pane. It calculates plus directional movement and minus directional movement from changes in highs and lows, smooths them with the DI length, and derives the ADX from the absolute difference of

Indicator v5 TrendOscillators & momentum
Updated 3 years ago · MIT GitHub repository of Directional Movement Index

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