Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 32)

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

Trend Following MOMO

by TradersPost
6 stars

This indicator calculates 8-period and 21-period Exponential Moving Averages to identify trend direction and momentum crossovers on the price chart. When the 8-period EMA crosses above the 21-period EMA, a buy signal triangle is plotted below the bar. A cross

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Trend Following MOMO

ZigZag Swing Cycle Average

by chaise-cogent
5 stars

The ZigZag Swing Cycle Average indicator measures and analyzes the average duration of bullish and bearish price swings. It utilizes TradingView's built-in ZigZag library to detect pivot legs based on configurable percentage deviation thresholds and depth para

Indicator v6 Screeners & dashboardsTrend Repaints
Updated 7 months ago · MIT GitHub repository of ZigZag Swing Cycle Average

Cerebr Sirius

by jerryinyang
5 stars

Cerebr Sirius is a multi-timeframe trend and momentum indicator overlay that combines exponential moving average trend analysis with VuManChu WaveTrend logic and Money Flow Index. It calculates fast and slow exponential moving averages to identify trend direct

Indicator v4 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Cerebr Sirius
5 stars

This indicator overlays multiple technical analysis tools onto the price chart to evaluate trend direction and trade setups. It computes an exponential moving average, a smoothed Stochastic RSI, a custom Williams Alligator using smoothed moving averages with o

Indicator v4 TrendMoving averages
Updated 3 years ago · Apache-2.0 GitHub repository of 200 EMA + Alligator + Stochastic

Simpleton v0.01_Claude is a multi-strategy trading engine designed for crypto markets that plots directly on the main price chart. It allows traders to execute individual strategies or combine signals into a multi-consensus model from up to twelve systems, inc

Strategy v6 TrendOscillators & momentum
Updated 2 days ago · None stated GitHub repository of Simpleton v0.01_Claude [12-Strategy Engine]

SMA Crossover

by DexWilder
4 stars

This strategy plots a fast and a slow simple moving average on the price chart. It enters long when the fast average crosses above the slow average and closes any open short at the same time. It closes the long and enters short when the fast average crosses be

Strategy v5 TrendMoving averages
Updated 3 days ago · None stated GitHub repository of SMA Crossover

BTC Trend Pullback

by trugurpala
4 stars

This strategy enters long when price and a fast EMA sit above a slower trend EMA and RSI crosses back above a pullback level. Shorts use the opposite RSI cross only when long-only mode is off. It sizes each order as a percentage of equity and places an ATR-bas

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · MIT GitHub repository of BTC Trend Pullback

动量策略-连续开单

by YooooungLee
4 stars

This strategy pairs dual exponential moving averages with a price momentum calculation to identify trend direction. It initiates long entries when the fast EMA trades above the slow EMA while momentum is positive, and enters short positions when the fast EMA f

Strategy v6 TrendOscillators & momentum
Updated 10 months ago · Apache-2.0 GitHub repository of 动量策略-连续开单

Linear Regression Channel

by Hugs-4-Bugs
4 stars

The Linear Regression Channel indicator calculates the slope, average and intercept of a linear regression line over the specified length using the chosen source. It plots the base regression line and upper and lower channels on the price chart. The channels a

Indicator v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Linear Regression Channel

Hull Suite by InSilico

by ShabbirHasan1
4 stars

Hull Suite by InSilico calculates and plots variations of the Hull Moving Average directly on the main price chart. It supports standard Hull MA, Exponential Hull MA, and Triple Hull MA calculations. The indicator renders the values as a single line or a fille

Indicator v4 TrendMoving averages
Updated 1 year ago · Custom licence GitHub repository of Hull Suite by InSilico

Calculates Kaufman's Adaptive Moving Average (KAMA) based on Kaufman's Efficiency Ratio to adjust smoothing dynamically according to market volatility and efficiency. Plotted directly on the price chart, it adapts faster during trending markets and slows down

Indicator v5 Moving averagesTrend
Updated 3 years ago · None stated GitHub repository of Kaufman's Adaptive Moving Average (KAMA)

Snagprofit WMA

by dearvn
4 stars

Snagprofit WMA is a multi-timeframe trend indicator that calculates a 125-period Weighted Moving Average across the 1-minute, 5-minute, 15-minute, and 1-hour timeframes alongside a local 50-period Simple Moving Average. It identifies momentum signals when pric

Indicator v5 Moving averagesTrend Repaints
Updated 4 years ago · None stated GitHub repository of Snagprofit WMA

This indicator marks bullish and bearish harami candlestick patterns on the price chart. The prior candle must have a long body, and the current candle must be a doji or a weak, small candle. A bullish signal also requires a lookback downtrend, while a bearish

Indicator v5 Candlestick patternsTrend
Updated 2 years ago · None stated GitHub repository of Harami Bullish/Bearish Pattern (Candlestick Pattern)
3 stars

The Directional Flow Oscillator combines momentum, cumulative volume delta, price range position, trend ratio, and relative volatility into a single bounded composite indicator. It fetches lower-timeframe volume data to calculate cumulative volume delta and no

Indicator v5 Oscillators & momentumVolume
Updated 2 years ago · GPL-3.0 GitHub repository of Directional Flow Oscillator

TQQQ MA+TSI

by yalili8521
2 stars

The TQQQ MA+TSI strategy executes trades based on triple simple moving average alignment combined with True Strength Index (TSI) divergence or momentum filters. Designed primarily for intraday stock trading, it evaluates price accumulation across fast, mid, an

Strategy v6 TrendOscillators & momentum
Updated 9 days ago · None stated GitHub repository of TQQQ MA+TSI
2 stars

This indicator detects trend-following pullback entries using the Rank Correlation Index (RCI) and a triple Exponential Moving Average (EMA) ribbon. It identifies bullish setups when price maintains an upward EMA alignment while RCI reverses from oversold leve

Indicator v5 Oscillators & momentumMoving averages
Updated 2 weeks ago · None stated GitHub repository of Ver16-19 5M Entry Signal

MATIC 2H ZEGUELA DEMABOT

by danielvm-git
2 stars

This strategy calculates up to three Double Exponential Moving Averages (DEMA) to determine trade entries directly on the price chart. It generates long signals on DEMA crossovers and short signals on crossunders, with conditional logic depending on active len

Strategy v4 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of MATIC 2H ZEGUELA DEMABOT

CTC Comet Strategy 7.2024.1

by wynnforthework
2 stars

This strategy executes trades based on dual exponential moving average trend alignment, customizable Bollinger Bands, and normalized ATR volatility thresholds. It enters positions in the direction of the moving average trend and manages risk using a dynamic st

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of CTC Comet Strategy 7.2024.1

This indicator calculates Mansfield Relative Strength by comparing the current asset's close against a reference index, sector, or industry benchmark. It plots the resulting relative strength curve alongside an exponential moving average in a separate pane, hi

Indicator v6 TrendMoving averages
Updated 1 year ago · MPL-2.0 GitHub repository of Mansfield Relative Strength indicator
2 stars

This indicator overlays trend and momentum analysis directly onto the price chart by combining a customizable moving average trend filter with dual QQE MOD calculations. It determines trend direction using selectable moving average types, including EMA, ALMA,

Indicator v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of 超级趋势 + QQE 集成指标

Inverse Choppiness Index

by ryangaraygay
2 stars

This indicator calculates the Choppiness Index to gauge market consolidation versus trending conditions. When the Choppiness Index indicates high choppiness above a threshold of 50 during a defined trading session, the script plots a transparent rectangle over

Indicator v5 TrendVolatility & bands
Updated 1 year ago · MIT GitHub repository of Inverse Choppiness Index
2 stars

Zig Zag Ratio Simplified plots ZigZag trend lines connecting swing highs and lows on the price chart. It calculates ratio relationships between market swings, displaying ratio labels, high and low price tags, and an optional status helper table. Main settings

Indicator v5 Support & resistanceTrend Repaints
Updated 3 years ago · None stated GitHub repository of Zig Zag Ratio Simplified

Chandelier Exit + MACD [UT]

by theupslidedown
2 stars

This indicator draws a Chandelier Exit on the price chart. It sets a long stop under the highest price and a short stop above the lowest price, each offset by a multiple of ATR, then trails the active stop as price moves. Direction turns long or short when pri

Indicator v5 TrendVolatility & bands Repaints
Updated 3 years ago · None stated GitHub repository of Chandelier Exit + MACD [UT]

Trendlines - JD

by JorisDuyck
2 stars

This indicator detects pivot highs and pivot lows to construct and plot dynamic trendlines directly on the price chart. It stores pivot coordinates inside a custom pseudo-3D array structure and connects consecutive points using either candle wicks or real bodi

Indicator v4 Support & resistanceTrend
Updated 5 years ago · MIT GitHub repository of Trendlines - JD

Tsh Arrow

by teshmi9z-beep
1 stars

An overlay that draws a SuperTrend-style trend line built from a volume-weighted moving average, selectable from SMA, EMA, WMA, RMA or VWMA types, with a fixed ATR factor. A k-nearest neighbours routine compares recent prices with the smoothed trend line to pr

Indicator v5 TrendAI / machine learning
Updated 2 days ago · MIT GitHub repository of Tsh Arrow

Ghost x Gemini

by mphinance
1 stars

A dashboard-style overlay meant to be added next to another indicator, showing a structured information panel of trend, volatility and momentum readings on the price chart. It draws on Hull trend, TRAMA, Keltner bands, swing structure, Williams %R exhaustion,

Indicator v6 Screeners & dashboardsTrend
Updated 3 days ago · Custom licence GitHub repository of Ghost x Gemini

AI Renko Supertrend

by ankurksoni
1 stars

A price-chart overlay that builds Renko-style bricks from an adaptive ATR and runs a Supertrend on them. ATR length is blended from short, base, long and slow readings, and the band factor and brick size widen or narrow depending on whether volatility is high

Indicator v6 TrendVolatility & bands
Updated 3 days ago · None stated GitHub repository of AI Renko Supertrend

I_ma

by GammaExpansion
1 stars

This indicator calculates and plots a wide selection of moving averages across multiple lookback lengths, including simple, exponential, running, weighted, volume-weighted, Hull, Arnaud Legoux, and linear regression curves. It also computes chained and volume-

Indicator v6 Moving averagesTrend
Updated 7 days ago · MIT GitHub repository of I_ma

EMA1-EMA2 Analiz

by engtuncay
1 stars

This indicator plots two exponential moving averages and two moving averages on the price chart. It calculates bullish and bearish crossovers between the primary moving averages to generate signals, displaying transition markers above and below bars as well as

Indicator v6 Moving averagesTrend
Updated 7 days ago · None stated GitHub repository of EMA1-EMA2 Analiz

Kinetic Kalman Breakout

by kanylbullen
1 stars

A strategy that fits a two-state Kalman filter, tracking position and velocity, to the close price, then builds bands around the filtered price using a multiple of the mean absolute error. It goes long when the close crosses above the upper band and short when

Strategy v6 TrendBreakout
Updated 8 days ago · None stated GitHub repository of Kinetic Kalman Breakout

A strategy that trades the trend flips of a volatility band trend line, either on the original flip or on a close crossing the trend level, with entries confirmed on bar close. It can reverse on an opposite signal, filter by session or higher timeframe trend,

Strategy v6 TrendVolatility & bands
Updated 8 days ago · GPL-3.0 GitHub repository of Adaptive Trend Flow Strategy Optimized v6

MTF Overlay Suite

by MuhammadMuhamid
1 stars

A price-chart overlay that collects many modules in one script: four SMAs, four EMAs, three Supertrends, VWAP, Bollinger Bands, standard pivot points, support and resistance zones, trendlines and an automatic Fibonacci retracement. Each moving average can use

Indicator v6 Moving averagesSupport & resistance Repaints
Updated 13 days ago · None stated GitHub repository of MTF Overlay Suite
1 stars

This Pine Script strategy detects pin bar patterns on the price chart using body size relative to ATR and shadow conditions for long and short signals. It applies engulfing candle confirmation and filters by EMA trend direction with volatility bands. Multiple

Strategy v6 TrendVolatility & bands
Updated 3 weeks ago · None stated GitHub repository of Pin Bar Strategy Developed
1 stars

A Pine v5 indicator in a separate pane that labels the market state using volatility and trend alignment. It plots ATR as a percentage of price, Bollinger Band width with its 50-bar average, and a squeeze and expansion flag. A 10, 20 and 50 EMA alignment marks

Indicator v5 Volatility & bandsTrend
Updated 7 weeks ago · None stated GitHub repository of Volatility Regime Detector

Kalman Flow

by vedkanani123
1 stars

An overlay indicator that runs price through a Kalman filter and builds adaptive noise bands from the tracking error around the estimate. The trend flips bullish when price closes above the upper band with positive velocity, and bearish when it closes below th

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Kalman Flow

India CCF Nifty

by raybird
1 stars

A futures strategy for NSE Nifty that requires agreement from SuperTrend, a 3 and 13 EMA cross with a 21 EMA trend, MACD, RSI, ADX, volume and relative strength against a benchmark. Entries come in two stages with a larger setup ladder, so it can add to a posi

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of India CCF Nifty
1 stars

This long-only strategy buys short-term oversold dips only inside a strong uptrend: price above a rising 200-period SMA and within a set percentage of its one-year high. Entry needs a two-period RSI below a threshold, then an up-close, and volatility below an

Strategy v6 Mean reversionTrend
Updated 2 months ago · Custom licence GitHub repository of Regime-Gated Dip Reversion

Pivot Breakout

by majohnst
1 stars

Pivot Breakout is an intraday strategy that identifies breakout opportunities using standard daily floor trader pivot points. It enters trades when price breaks above the calculated daily pivot, provided the prior daily close was within a defined approach dist

Strategy v6 BreakoutSupport & resistance Repaints
Updated 4 months ago · None stated GitHub repository of Pivot Breakout
1 stars

A strategy that rests a limit order at the session VWAP when a higher-timeframe 50 and 100 EMA stack shows an uptrend, VWAP is rising and price is above it, with the mirror image for shorts. The stop is an ATR multiple beyond VWAP and the target is a fixed rew

Strategy v6 Mean reversionTrend
Updated 4 months ago · None stated GitHub repository of VWAP Pullback Strategy MNQ

EMA Cloud

by rubbermetal
1 stars

EMA Cloud draws a ribbon of eighteen exponential moving averages from 5 to 200 periods, with fills between neighbouring lines colored by which average sits higher. It adds a 120-period RMA line, markers where the fastest EMA crosses the 200 EMA, golden and dea

Indicator v6 TrendMoving averages
Updated 4 months ago · MPL-2.0 GitHub repository of EMA Cloud
1 stars

This strategy identifies liquidity sweep scalp entries on lower timeframes by analyzing 15-minute higher-timeframe candles. It verifies a valid range candle using an EMA trend filter, average body size comparison, and wick balance thresholds. In an uptrend, it

Strategy v6 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of M15 Liquidity Sweep Scalp
1 stars

An overlay toolkit for crypto charts that mixes a volume profile and value area, a daily, weekly or monthly anchored VWAP with bands, EMA trend lines, a higher-timeframe EMA bias, and an order flow proxy from lower-timeframe delta, relative volume and cumulati

Indicator v6 VolumeSupport & resistance
Updated 5 months ago · MIT GitHub repository of Crypto AMT Toolkit v5 Signal Engine
1 stars

A long-only strategy built on a rolling cumulative volume delta estimated from where each bar closes within its range. It enters when buyers dominate by a set margin, price has stayed above a trend SMA for several bars, RSI is above a minimum and the session f

Strategy v6 VolumeTrend
Updated 5 months ago · None stated GitHub repository of Volume Delta Trend Reversal Long Only
1 stars

A trend indicator for the price chart that draws a moving-average trend line, 45 periods by default and selectable as SMA, EMA, WMA, HMA or VWMA, offset by an ATR multiple. It detects buying and selling pressure with an adjustable threshold, and can colour can

Indicator v6 TrendMoving averages
Updated 6 months ago · None stated GitHub repository of M45 Indicator - Aurolo
1 stars

A strategy for range box breakouts whose header comments describe changes from an earlier version: a tighter ATR stop, a trailing profit exit that triggers later, an EMA 50 direction filter, a stricter volume filter and a higher box quality score. Orders are f

Strategy v6 BreakoutTrend
Updated 7 months ago · None stated GitHub repository of Energy Block V12 Optimized

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