Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 57)

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

16 stars

This trend-following strategy generates long and short breakout signals using volatility channels plotted around a simple moving average. It calculates ATR bands for entries and trailing exits, calculating position sizing based on account equity and ATR risk p

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 3: ATR Channel

FilledValueGap A006

by ruckard
13 stars

This strategy enters trades in the opposite direction of filled value gaps, operating under the assumption that price action will resume the primary trend after filling a recent gap. It plots directly on the main price chart and supports MA-based trend filters

Strategy v5 SMC / ICT / price actionTrend
Updated 1 year ago · None stated GitHub repository of FilledValueGap A006

Calculates a composite carry and decay oscillator fusing impulse-autocorrelation half-life, a Hurst exponent approximation, path efficiency, and range expansion ratios. It evaluates whether an impulse is likely to persist or mean-revert, plotting the oscillato

Indicator v6 TrendOscillators & momentum
Updated 3 days ago · MIT GitHub repository of Market Memory & Decay Oscillator [WavesUnchained]
5 stars

This short-only strategy combines multi-timeframe exponential moving averages with MACD crossovers to find bearish trade opportunities. It calculates and plots two higher-timeframe EMAs directly on the price chart while monitoring MACD line crosses and zero-li

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

RoyalPrince Scanner

by IAMATOMIC001
3 stars

This indicator scans multiple symbols using RSI for overbought and oversold levels, TSI for trend strength, ADX for trend direction and strength, and Supertrend for trend reversals. It plots buy and sell signals on the price chart for each enabled symbol based

Indicator v5 Oscillators & momentumTrend
Updated 12 months ago · None stated GitHub repository of RoyalPrince Scanner

SSL Algo

by TamTH-Dev
2 stars

SSL Algo calculates and displays multi-moving-average SSL hybrid channels directly on the price chart. It combines a customizable baseline, a continuation channel, an exit indicator, and optional ATR bands alongside support EMAs. Users can toggle baseline line

Indicator v5 TrendMoving averages
Updated 6 weeks ago · None stated GitHub repository of SSL Algo

Momentum Indicator Strategy

by wynnforthework
2 stars

This trend-following strategy generates long signals by combining the Stochastic Momentum Index (SMI) with a Supertrend filter. It enters a long position when the SMI signal line crosses above an oversold threshold while the Supertrend indicates an uptrend. Po

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Momentum Indicator Strategy

Walk-Forward Lab

by jayadevrana
1 stars

Walk-Forward Lab is an educational overlay indicator that simulates trade execution and walk-forward testing directly within Pine Script. It evaluates EMA fast and slow line crossovers using ATR-based stop-loss levels and risk-reward ratio targets. A user-defi

Indicator v6 TrendMoving averages
Updated 4 days ago · MPL-2.0 GitHub repository of Walk-Forward Lab

VWAP Reclaim Strategy

by skipp-dev
1 stars

This overlay strategy trades long and short when price reclaims an anchored VWAP and then breaks a recent pullback high or low. Optional modes enter on a simple VWAP cross instead. It filters with VWAP slope, a short price-bias EMA, a stacked RSI bias, and rel

Strategy v6 TrendOscillators & momentum Repaints
Updated 4 days ago · None stated GitHub repository of VWAP Reclaim Strategy

Main Period Adaptive Cross

by pineforge-4pass
1 stars

A simple moving average crossover strategy, 10 against 30, that only trades when the chart timeframe is 15 minutes. On that timeframe it enters long when the fast average crosses above the slow one and short when it crosses below, reversing the position. On an

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of Main Period Adaptive Cross

DEPV2 DEBUG S2

by YuceSezar89
1 stars

DEPV2 DEBUG S2 is a multi-symbol indicator that aggregates signals across 20 cryptocurrency pairs using four methods: TREND, MOMENTUM, VOLATILITY and VOLUME. It supports signal modes including simultaneous confidence, sequential and automatic per-asset selecti

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

Adaptive Spectral Forecast

by vedkanani123
1 stars

A cycle-analysis indicator on the price chart. It analyzes a lookback window of 144 bars by default, extracts up to five dominant cycles, and projects a forecast line 55 bars ahead with confidence bands. Buy and sell signals can be limited to the direction of

Indicator v6 TrendAI / machine learning Repaints
Updated 2 months ago · None stated GitHub repository of Adaptive Spectral Forecast

IWBDT Strategy Indicator

by GreyssonEnterprises
1 stars

An indicator version of a multi-timeframe breakout idea that checks 9 and 18 period EMA direction on three higher timeframes, with the chart timeframe optional. Trend agreement is shown through background colours with adjustable transparency. Inputs set a risk

Indicator v4 TrendBreakout Repaints
Updated 3 months ago · MIT GitHub repository of IWBDT Strategy Indicator

The Infinite Impulse Response (IIR) Filter calculates a smooth moving average curve designed to reduce lag by incorporating momentum changes over a calculated lag period. It plots directly on the price chart and can dynamically change color based on whether th

Indicator v4 Moving averagesTrend
Updated 12 days ago · GPL-3.0 GitHub repository of Infinite Impulse Response (IIR) Filter

Nasdaq Prop Firm Strategy

by TradersPost
228 stars

This strategy uses multiple VWAP anchors and a custom Lull indicator to generate buy and sell signals on the Nasdaq price chart. It plots the VWAP trend line and three VWAP anchors with customizable colors and mitigation methods. The Lull indicator produces si

Strategy v6 TrendSupport & resistance Repaints
Updated 3 months ago · None stated GitHub repository of Nasdaq Prop Firm Strategy

Time Series Decomposition and Forecasting is an experimental indicator that decomposes close prices into trend and seasonality components. It evaluates a specified lookback window of price history to calculate centered moving averages, deseasonalized data, and

Indicator v4 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Time Series Decomposition and Forecasting

Altered OBV On MACD

by hasnocool
106 stars

This strategy calculates and plots 9, 21, 50, 90, and 200-period Simple Moving Averages on the main price chart. It constructs a modified On-Balance Volume (OBV) metric and calculates a MACD oscillator based on this custom volume series rather than price. Long

Strategy v5 Moving averagesVolume
Updated 2 years ago · GPL-3.0 GitHub repository of Altered OBV On MACD

Chandelier Exit

by mihakralj
99 stars

This indicator plots Chandelier Exit levels on the price chart. It computes true range and a Wilder RMA of true range over a lookback, then subtracts a scaled ATR from the highest high for the long exit and adds it to the lowest low for the short exit. The per

Indicator v6 TrendVolatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of Chandelier Exit
47 stars

Henderson Moving Average plots a finite impulse response smoother of the selected source on the price chart. It derives closed-form Henderson weights once, normalizes them to sum to one, and convolves them with a rolling window. The filter is designed to pass

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

This strategy trades Donchian channel breakouts on the price chart and can take both long and short positions. It sizes the first unit from a risk percentage of price and ATR, then adds smaller units when price advances by an ATR step and RSI is above or below

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 40: ULTIMATE

FilledValueGap B002

by ruckard
13 stars

FilledValueGap B002 is a strategy designed to execute trades when price moves to fill recently created gaps, operating under the assumption that price action will continue along the main trend direction. It uses Curie moving average closing lines for additiona

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of FilledValueGap B002

RR Dangov

by IAMATOMIC001
3 stars

RR Dangov is a price-chart strategy that combines optional confluence modules for entries. The trader selects a primary and a secondary source from Guppy moving averages, VWAP, an opening-range breakout, Supertrend, or CPR, and can add WaveTrend, stochastic, a

Strategy v5 TrendMoving averages
Updated 12 months ago · None stated GitHub repository of RR Dangov

SuperTrend

by TamTH-Dev
2 stars

SuperTrend indicator calculates ATR-based bands on the price chart and determines trend direction by comparing current price to the bands. It plots upper and lower SuperTrend bands that shift based on price action. Signals trigger when the trend flips from dow

Indicator v5 TrendVolatility & bands
Updated 6 weeks ago · None stated GitHub repository of SuperTrend

Multi-Order Breakout Strategy

by wynnforthework
2 stars

This breakout strategy enters long positions when the price moves above the upper Bollinger Band, Parabolic SAR, and a 100-period exponential moving average, provided ATR confirms elevated volatility. It allows opening multiple scaled entries up to a user-defi

Strategy v5 BreakoutVolatility & bands
Updated 1 year ago · None stated GitHub repository of Multi-Order Breakout Strategy

Mantle Keltner Regime

by pineforge-4pass
1 stars

A long-only strategy built on Keltner Channels. It enters long when price crosses above the upper band while the channel centre is above a longer trend EMA. It exits when price closes below the channel centre, or when price falls a chosen fraction of the chann

Strategy v6 Volatility & bandsBreakout
Updated 7 days ago · Apache-2.0 GitHub repository of Mantle Keltner Regime

DEPV2 DEBUG S20

by YuceSezar89
1 stars

This indicator watches up to twenty user-chosen symbols and scores each one with four signal classes: trend, momentum, volatility, and volume. Signal mode can use a single class, require several classes to agree, require them in a set order inside a bar window

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

This indicator plots a Supertrend built from ATR bands on the price chart. It raises a lower band and lowers an upper band from the selected source, then flips trend when the close crosses the opposite band. Green and red broken lines mark the active trend, wi

Indicator v5 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Supertrend From Scratch [Alorse]

Time Series Decomposition and Forecasting is an experimental overlay indicator that decomposes historical price action into trend, centered moving average, and seasonality components using array calculations. It calculates multiplicative seasonal indexes and f

Indicator v4 Trend
Updated 1 year ago · None stated GitHub repository of Time Series Decomposition and Forecasting

Anand's Strategy

by hasnocool
106 stars

Anand's Strategy is a multi-timeframe breakout strategy that determines overall bias using daily candle data and triggers entries on 15-minute breakouts. It calculates higher-timeframe trend direction by comparing previous daily closes against daily high and l

Strategy v5 TrendBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of Anand's Strategy
99 stars

Chebyshev Type I Filter (CHEBY1) calculates a second-order Chebyshev Type I lowpass digital filter directly on the price chart. It provides noise reduction and trend smoothing with steep roll-off characteristics governed by controlled ripple in the passband. T

Indicator v6 Moving averagesTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Chebyshev Type I Filter (CHEBY1)
16 stars

Implements an adaptive trend-following and range-trading strategy that switches behavior based on ADX regime detection. When ADX exceeds the threshold, it executes Donchian breakouts with fractional pyramiding and Chandelier trailing stops. In low ADX environm

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 41: Sector-Adaptive

FilledValueGap C002

by ruckard
13 stars

The FilledValueGap C002 strategy opens positions in the opposite direction of filled value gaps, assuming price action will resume the underlying trend after a gap fills. It includes customizable take profit, stop loss based on gap distance or percentage, trai

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of FilledValueGap C002

This indicator analyzes impulse momentum, swing pivot structure, and nearby clustered support and resistance zones to project three forward price paths on the chart. It calculates weighted probabilities for direct continuation, pullback continuation, and struc

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 3 days ago · MIT GitHub repository of Market Scenario Projector [WavesUnchained]
7 stars

BTC M2 Global Deviation [MIT] measures and visualizes the correlation between global fiat M2 money supply and Bitcoin price. It aggregates M2 economic data across major national central banks, converts all currencies to USD, and normalizes both the global M2 t

Indicator v6 TrendVolatility & bands
Updated 3 months ago · None stated GitHub repository of BTC M2 Global Deviation [MIT]

Jurik Moving Average (JMA)

by mushroom-men-Trading
2 stars

This indicator calculates and plots the Jurik Moving Average directly on the main price chart. It uses an adaptive smoothing algorithm that dynamically adjusts to market volatility to reduce lag while minimizing overshoot. The script does not generate buy or s

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

Map Regime Tracker

by pineforge-4pass
1 stars

The Map Regime Tracker strategy evaluates market structure using a 20-period exponential moving average and a 50-period simple moving average. It stores regime thresholds inside a map object initialized on the first bar. When the fast EMA is above the slow SMA

Strategy v6 TrendOscillators & momentum
Updated 7 days ago · Apache-2.0 GitHub repository of Map Regime Tracker

DEPV2 Debug S21

by YuceSezar89
1 stars

DEPV2 Debug S21 is a multi-symbol crypto research and evaluation tool plotted in a separate pane. It monitors up to 20 Binance cryptocurrency perpetual pairs by analyzing price action across four distinct signal engines: trend, momentum, volatility, and volume

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

Apex Nexus Flip Engine v10

by vedkanani123
1 stars

A trend flip indicator on the price chart with BUY and SELL labels. A zero-lag trail is built from ATR and an optional volume-weighted source, and it widens in choppy conditions. Flips need to pass gates for choppiness, baseline slope, volatility expansion, ef

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Apex Nexus Flip Engine v10
947 stars

The Kaufman Adaptive Moving Average (KAMA) calculates a moving average that adjusts its sensitivity based on market volatility and noise. It computes an Efficiency Ratio by comparing price directional change over a specified period to overall market volatility

Indicator v4 Moving averagesTrend
Updated 12 days ago · GPL-3.0 GitHub repository of Kaufman Adaptive Moving Average
257 stars

This indicator analyzes short-term price action on index futures and options charts by applying Rational Quadratic kernel smoothing to detect sideways consolidation ranges and potential breakouts. It processes pivot highs and lows over customizable loopback pe

Indicator v5 Support & resistanceTrend Repaints
Updated 7 weeks ago · None stated GitHub repository of SPX 30M - Trading Chart

Q-Trend + KVO Strategy

by TradersPost
228 stars

This strategy combines the ATR-banded Q-Trend indicator with the Klinger Volume Oscillator (KVO) to execute confluence trades. It enters long when a Q-Trend buy trigger aligns with a positive KVO value and a bullish candle confirmation, taking short trades und

Strategy v6 TrendVolume
Updated 3 months ago · None stated GitHub repository of Q-Trend + KVO Strategy

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