Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 28)

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

A strategy that classifies each bar as bull or bear trend, bull or bear expansion, chop or neutral using EMA slope, ADX and an ATR ratio, with an optional higher timeframe EMA bias. Depending on the regime it uses trend pullback entries, expansion breakout ent

Strategy v6 TrendBreakout Repaints
Updated 8 days ago · GPL-3.0 GitHub repository of Adaptive Market Regime Hierarchy Strategy v1
1 stars

A separate-pane scanner that checks up to 25 user-chosen symbols, covering stocks, ETFs, futures and crypto, and records whether each is in a buy or sell regime based on a SuperTrend with adjustable ATR length and factor. A single alert reports which symbols f

Indicator v6 Screeners & dashboardsTrend
Updated 8 days ago · Custom licence GitHub repository of Watchlist Flip Scanner

MTF Confluence Lean

by MuhammadMuhamid
1 stars

A long-only spot strategy that enters when all enabled gates agree, each on its own timeframe, 15 minutes by default: Supertrend bullish, RSI above a threshold and below a cap, Volume Flow Indicator above a level, and a support check. One reward-to-risk stop a

Strategy v6 TrendOscillators & momentum
Updated 13 days ago · None stated GitHub repository of MTF Confluence Lean

Parabolic SAR

by AkashSasikumar47
1 stars

A Pine v6 indicator that draws the Parabolic SAR as green circles on the price chart, using the built-in stop-and-reverse calculation. Three inputs set the starting acceleration factor, the increment and the maximum. The dots sit below price in an uptrend and

Indicator v6 Trend
Updated 2 weeks ago · MIT GitHub repository of Parabolic SAR
1 stars

A long-only research strategy that enters when momentum, the close divided by the close several bars back minus one, crosses from zero or below to above zero. It exits when momentum turns negative or an ATR-based trailing stop is hit. Signals are decided on co

Strategy v5 TrendVolatility & bands
Updated 3 weeks ago · None stated GitHub repository of Momentum ATR Next-Bar Open

J 8

by moonyroy
1 stars

This strategy detects pin bars within an EMA volatility channel using custom user-defined types. It determines market direction based on price action relative to a 21-period EMA and a body-based ATR range. When a qualifying bullish or bearish pin bar prints in

Strategy v6 Candlestick patternsMoving averages
Updated 3 weeks ago · None stated GitHub repository of J 8

Kernal Cipher Strategy

by kdricha0602
1 stars

Kernal Cipher Strategy is a price-chart overlay that backtests the Kernal Cipher confirmed-bar signal engine. It enters long or short at the next bar's open when trend, regime, and oscillator filters agree, then exits on an adaptive ATR stop or an opposite sig

Strategy v6 TrendOscillators & momentum
Updated 5 weeks ago · MIT GitHub repository of Kernal Cipher Strategy

Moving Average (SMA)

by DEVfancybear
1 stars

The Moving Average (SMA) indicator calculates the simple moving average of close prices and plots it directly on the price chart. The length input sets the number of periods averaged, defaulting to 50 and ranging from 1 to 500. The lineColor input allows custo

Indicator v6 Moving averagesTrend
Updated 7 weeks ago · MIT GitHub repository of Moving Average (SMA)

TRAMA Cloud SIGIL

by dwightspitz
1 stars

A long-only strategy built on two TRAMA adaptive averages, a short one of 20 bars and a long one of 50 bars, each with its own source and optional timeframe. It buys when price crosses above the short average while that average is below the long one, or when t

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of TRAMA Cloud SIGIL
1 stars

A trend strategy on the price chart based on an ATR chandelier trailing line with a five-level trend state that marks warning and danger zones as price nears the line. A flip needs a minimum candle body. The multiplier can stay fixed or adapt using a simple me

Strategy v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Chandelier Flip Radar
1 stars

This indicator clusters confirmed pivots into support and resistance levels, scoring each by touch count and keeping the strongest per side. A signal appears when price tests a level that has held before, closes back away from it with a rejection candle, and a

Indicator v6 Support & resistanceTrend
Updated 2 months ago · Custom licence GitHub repository of Reactive Levels Signal Engine

An overlay indicator that marks confirmed swing highs and lows with arrows and tracks market structure. A bullish or bearish trend, and a change of character, needs at least four alternating confirmed swings, so one contradicting swing does not flip the trend.

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of Market Structure Change of Character

GrimmHA Strategy

by GreyssonEnterprises
1 stars

This strategy combines Heikin Ashi candlestick pattern recognition with Smoothed Moving Average (SMMA) trend filtering to generate long and short entries. It detects doji candles, three-line strikes, and engulfing patterns aligned with SMMA trends. Risk manage

Strategy v5 TrendMoving averages
Updated 3 months ago · MIT GitHub repository of GrimmHA Strategy
1 stars

This indicator implements an ICT and SMC decision engine directly on the price chart. It calculates Fair Value Gap consequent encroachment entry triggers alongside multi-tiered profit targets and structure-anchored stop losses. Trades are filtered through prem

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 3 months ago · None stated GitHub repository of Quantum Flow - FVG CE + TP Tiers

Swing OTE

by jchi18
1 stars

An overlay that detects swing points on a chosen structure timeframe and plots them on any chart. Major and minor swings are independent, each with its own strength setting, structure labels (higher high, higher low and so on) and optional zig-zag. Swings prin

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 4 months ago · None stated GitHub repository of Swing OTE

DigitalTrend Insight

by unemployedrabi
1 stars

Pine v4 overlay that combines several tools on the price chart. A dashboard label reports volatility, volume, RSI, short-term sentiment and a multi-timeframe trend panel built from the direction of a 50-period moving average on timeframes from one minute to mo

Indicator v4 Screeners & dashboardsTrend
Updated 4 months ago · MIT GitHub repository of DigitalTrend Insight

This short-only scalping strategy combines multi-timeframe analysis to identify panic selling opportunities. It uses higher-timeframe data (15-minute by default) to establish a downtrend context characterized by strong bearish candles with minimal lower wicks.

Strategy v6 TrendCandlestick patterns
Updated 4 months ago · MIT GitHub repository of Doc04 Greed Panic Scalper - Project Adapted

MTF RSI Management

by iyoshikawa
1 stars

An overlay indicator built around a fast and a slow smoothed RSI, a double-smoothed stochastic, an EMA trend line and an ADX filter, combined with a volume filter to grade setups from B to A+. Presets adapt settings for crude oil, Nasdaq, S&P 500 and Dow futur

Indicator v5 Oscillators & momentumTrend Repaints
Updated 5 months ago · None stated GitHub repository of MTF RSI Management
1 stars

An overlay toolkit for crypto charts that combines a volume profile with value area, an anchored VWAP with deviation bands, EMA 50 and 200 trend lines, a higher-timeframe EMA bias, and an order flow proxy built from lower-timeframe delta, relative volume and c

Indicator v6 VolumeSupport & resistance
Updated 5 months ago · MIT GitHub repository of Crypto AMT Toolkit v3 Precision

Renko MACD Futures Long Only

by PETERSAMUELOPS12
1 stars

A long-only futures strategy that simulates Renko bricks on a normal time chart and calculates MACD on the brick closes, which filters out time-based noise. A bullish MACD crossover on the bricks opens a long when price is above a trend SMA by a buffer. Exits

Strategy v6 Oscillators & momentumTrend
Updated 5 months ago · None stated GitHub repository of Renko MACD Futures Long Only

BVortex XAUUSD 1H

by Alberto082544
1 stars

This strategy trades XAUUSD on the one-hour chart. It builds a scaled Vortex oscillator from directional movement and flags bars that leave an upper or lower extreme with a matching candle. Entries also need ADX at or above a set minimum and a swing-pivot tren

Strategy v6 Oscillators & momentumTrend
Updated 5 months ago · None stated GitHub repository of BVortex XAUUSD 1H

QUANT-OMEGA Strategy

by princeleuel-code
1 stars

A strategy version of the QUANT-OMEGA regime and ensemble signal. It classifies the market with ADX and ATR, scores trend, mean-reversion and breakout signals into a confidence value, and enters only above set thresholds. Stops and targets are ATR multiples. P

Strategy v5 TrendMean reversion
Updated 5 months ago · None stated GitHub repository of QUANT-OMEGA Strategy

Trend Pullback Indicator

by Chovy-King
1 stars

An overlay that looks for pullbacks within an established trend using three EMAs (20, 60 and 144) that must be stacked in order and spread apart by an ATR multiple, with a rising or falling fast EMA and no recent crossover between the fast and middle lines. A

Indicator v6 TrendMoving averages
Updated 6 months ago · None stated GitHub repository of Trend Pullback Indicator

EMA Indicator

by Sandesh30-cloud
1 stars

Plots 50-period and 200-period Exponential Moving Averages directly on the price chart. The fast 50 EMA is drawn in orange, while the slow 200 EMA is drawn in blue to provide a simple visual reference for baseline trend analysis. The indicator has no configura

Indicator v5 TrendMoving averages
Updated 6 months ago · None stated GitHub repository of EMA Indicator

A separate-pane indicator that combines DMI, ADX, MACD and a squeeze signal. It plots plus and minus directional indicators with a selectable smoothing type (RMA by default) and an ADX line with an adjustable key level, and shades the background by trend direc

Indicator v6 Oscillators & momentumTrend
Updated 6 months ago · None stated GitHub repository of Directional Movement Index and ADX

Helion Trend Weave

by Focal-QuantAI
1 stars

An indicator on the price chart that draws a ribbon of moving averages, 8 by default, starting at a fast period and spaced by a fixed step. A volatility option compares a fast and slow ATR to stretch or shrink the periods between a floor and ceiling. It shades

Indicator v6 Moving averagesTrend
Updated 6 months ago · None stated GitHub repository of Helion Trend Weave

Estimates the Hurst exponent with detrended fluctuation analysis on log returns, indicating whether recent price behaviour leans toward trending or mean reverting around a 0.5 mid line. Inputs set the sample size, base and maximum scales, an optional smoothing

Indicator v5 TrendMean reversion
Updated 6 months ago · None stated GitHub repository of Hurst Exponent - Detrended Fluctuation Analysis

BTC ATH Golden Cycle

by ymlee1104
1 stars

This strategy overlays technical indicators and staged dip-buying logic designed for Bitcoin market cycles. It incorporates a geometric mean indicator, multi-timeframe EMA bands, a customizable range filter, and supply and demand zones directly onto the price

Strategy v6 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of BTC ATH Golden Cycle

ML Decision Tree Classifier

by haydarkadioglu
1 stars

The ML Decision Tree Classifier uses rule-based decision tree logic to evaluate trend, momentum, volume, and MACD indicators for market direction classification. It calculates exponential moving averages, relative strength index values, volume relative to a mo

Indicator v5 AI / machine learningTrend
Updated 8 months ago · None stated GitHub repository of ML Decision Tree Classifier

This Pine Script is a strategy that performs tactical dollar cost averaging with periodic cash top-ups. It accumulates a fixed cash amount each bar and deploys the full pile at a bullish crossover above a simple moving average, provided the date is within the

Strategy v6 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of Tactical DCA with Cash Top-up (Date Filter)

Supertrend 18/4.3

by trustdan
1 stars

A long-only strategy generated from the TrendLab research project, drawn on the price chart. It uses the built-in Supertrend with an ATR period of 18 and a multiplier of 4.3. It buys when the Supertrend turns to an uptrend and closes the position when it turns

Strategy v6 TrendVolatility & bands
Updated 9 months ago · MIT GitHub repository of Supertrend 18/4.3

This overlay indicator draws trendlines on the price chart and marks breakouts with optional targets. It builds a slope from successive changes in a wick or body source over a user-set period, then extends the line by a selected multiple of the bar interval. P

Indicator v5 TrendVolatility & bands
Updated 9 months ago · None stated GitHub repository of Trendline Breakouts With Targets [ Chartprime ]
1 stars

A chart-overlay trend filter that blends a slower smoothed moving average and a faster TEMA into one baseline, smooths it again with an EMA, and builds ATR bands around it. A close above the upper band sets a long regime, a close below the lower band sets a sh

Indicator v6 TrendVolatility & bands
Updated 9 months ago · None stated GitHub repository of TwinSmooth ATR Bands
1 stars

This strategy executes trades based on VuManChu-inspired WaveTrend signals combined with a 200 EMA trend filter and multi-timeframe confirmation from H1 and H4 charts. Entries are evaluated using WaveTrend oversold conditions, RSI, MFI, and an optional ADX fil

Strategy v6 Oscillators & momentumTrend
Updated 10 months ago · None stated GitHub repository of VMC Strat M15 Ultimate (ADX + Div)
1 stars

The Heikin Ashi Trend Follow Strategy calculates smoothed Heikin Ashi candle values from open, high, low and close prices and plots them on the price chart along with a trend EMA. It signals long entries when the Heikin Ashi close crosses above the trend EMA a

Strategy v5 TrendCandlestick patterns
Updated 11 months ago · None stated GitHub repository of Heikin Ashi Trend Follow Strategy
1 stars

This strategy looks for pullbacks to a 15-period EMA. A long needs price to touch or dip under the EMA, close back above it on a sufficiently large green candle, with the EMA above a 100-period EMA and a minimum pullback percentage. Shorts mirror this. Optiona

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of NakInvest EMA Pullback Strategy

Lab-Doi-03

by theteelek
1 stars

Lab-Doi-03 is a price-chart strategy that compares a 12-period and a 26-period exponential moving average requested from the daily timeframe. While the chart time is inside the start and end dates and the fast average is above the slow average, it records an i

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Lab-Doi-03

MACD Crossover

by Studentcodee
1 stars

This strategy executes automated trades based on the interaction between the MACD line and its signal line. It calculates the difference between two exponential moving averages and a signal line to monitor momentum shifts. The strategy enters a long position w

Strategy v6 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of MACD Crossover

SOLETH MTPI

by Mikelkulla
1 stars

This strategy detects relative performance between Solana and Ethereum using a liquidity-weighted supertrend (LWST) derived from fast and slow weighted moving averages of liquidity times close. It plots the Tsl2 trend line in a separate pane and issues buy sig

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of SOLETH MTPI
1 stars

This strategy uses 10, 50, and 200 period EMAs on the price chart to filter for bullish and bearish trend signals with a confirmation candle. It calculates position size based on a user-set risk percentage of equity divided by the distance to a stop price deri

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Reg T Margin Stock Strategy

Ehlers DMI

by munlit
1 stars

A separate-pane indicator that smooths price with a weighted average and a two-pole filter, then runs a directional movement calculation on the filtered series and plots one line coloured by its slope. The sign of the line sets a bullish or bearish state, whic

Indicator v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Ehlers DMI

Candle Strategy

by zhuzp98
1 stars

This Pine Script strategy identifies candlestick patterns such as engulfing, doji, hammer and star formations on the price chart. It applies SMA trend filters with fast and slow periods to confirm direction before plotting labels for bullish and bearish signal

Strategy v5 Candlestick patternsMoving averages
Updated 1 year ago · None stated GitHub repository of Candle Strategy

Bollinger Bands - 22MA

by techteam92
1 stars

Bollinger Bands - 22MA plots custom Bollinger Bands on the main price chart using a selectable center moving average from a choice of 22 different types, including Kalman filters, Jurik, Sine, and Hull moving averages. It generates buy and sell signals based o

Indicator v4 Volatility & bandsMoving averages
Updated 1 year ago · None stated GitHub repository of Bollinger Bands - 22MA

Moving Average Exponential

by Hurairahengg
1 stars

Calculates an Exponential Moving Average (EMA) and displays visual buy and sell trend signals directly on the price chart. The indicator calculates a 125-period EMA line by default and monitors crossover conditions between price and the EMA threshold. When pri

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Moving Average Exponential

SuperTrend-original

by darkshloser
1 stars

A Pine v4 script that plots three SuperTrend trailing stop lines on the price chart, based on the well-known ATR and midpoint approach. Each line has its own ATR period, multiplier, source and wicks-or-close option. A green line marks an up direction and a red

Indicator v4 Trend
Updated 2 years ago · Apache-2.0 GitHub repository of SuperTrend-original

Tweezer Lyfe

by RobACurtis
1 stars

Tweezer Lyfe is a TradingView strategy that identifies Tweezer reversal patterns on the price chart. It plots Bollinger Bands with RSI and stochastic indicators for momentum confirmation. Bullish signals require a prior bearish candle closing near the lower ba

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Tweezer Lyfe

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