Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 25)

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

1 stars

This strategy identifies trend phases using consecutive directional candle sequences, tracks the trend extreme, and monitors for order blocks confirmed by candle displacement. When price returns to test the identified order block, it enters long or short on a

Strategy v6 SMC / ICT / price actionCandlestick patterns
Updated 3 weeks ago · None stated GitHub repository of Höhlenmensch Strategie

Kernal Cipher 3

by kdricha0602
1 stars

Kernal Cipher 3 is a momentum trading strategy that plots signal diamonds on the price chart for breakout, reversal and continuation setups. It calculates EMAs of varying lengths to detect trend regime and slope, ADX for strength confirmation, WaveTrend oscill

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

MTF Confluence Engine

by mrme000m
1 stars

MTF Confluence Engine is a separate-pane indicator that evaluates trend, momentum, and volatility metrics across the current chart timeframe and two configurable higher timeframes. It combines EMA alignment, SuperTrend direction, RSI values, Bollinger and Kelt

Indicator v5 TrendOscillators & momentum Repaints
Updated 7 weeks ago · None stated GitHub repository of MTF Confluence Engine

Ultimate 5 EMA Quant Engine

by Pr-ashant-pawar
1 stars

A Pine v6 indicator that plots a 5-period EMA and runs a multi-step short-setup tracker on the price chart using data from a chosen timeframe. Signals are filtered by volume against its average and an RSI threshold, then graded A to D. Each grade has its own t

Indicator v6 TrendBreakout
Updated 7 weeks ago · None stated GitHub repository of Ultimate 5 EMA Quant Engine

Moving Average (EMA)

by DEVfancybear
1 stars

This script calculates and plots an Exponential Moving Average (EMA) based on the closing price directly on the main price chart. It functions as a classic trend-following reference, smoothing price action to help identify direction or dynamic support and resi

Indicator v6 TrendMoving averages
Updated 7 weeks ago · MIT GitHub repository of Moving Average (EMA)
1 stars

This lightweight indicator template calculates a simple moving average based on a user-selected price source and lookback length. It plots the calculated moving average line, dynamically coloring it green when the price is above the moving average and red when

Indicator v6 Moving averagesTrend
Updated 8 weeks ago · MPL-2.0 GitHub repository of Lightweight Indicator Template

Options Momentum SIGIL

by dwightspitz
1 stars

A strategy that builds two TRAMA adaptive averages, each compared with a delayed copy of itself to form a cloud on the price chart. Each can use its own timeframe, with 15-second data as the default, which needs a plan that supports seconds charts. An optional

Strategy v6 Oscillators & momentumTrend
Updated 2 months ago · MIT GitHub repository of Options Momentum SIGIL
1 stars

A price-chart trend indicator that works like a SuperTrend whose band distance adjusts itself. It measures how far past pullbacks have gone against recent trends, remembers a window of readings separately for up and down trends, and sets the band room from a c

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Self-Adaptive Trend Signals
1 stars

This Pine Script v6 strategy generates multi-layered trading signals plotted directly on the price chart. It combines eight modular signal engines: EMA crossover pullbacks, price action breakouts, RSI momentum and divergence, MACD histogram flips, volume surge

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Advanced Swing Strategy v6

APM v7 Multi-Factor

by rcaldwell67
1 stars

This indicator plots three exponential moving averages (8, 21 and 55 by default) on the price chart and marks a green triangle when at least three of five conditions agree. The conditions are EMAs stacked upward, RSI between 40 and 70, MACD above its signal li

Indicator v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of APM v7 Multi-Factor
1 stars

The Gold Trend indicator identifies market structure using swing highs and lows to categorize trends into uptrends, downtrends, or ranges directly on the price chart. It plots HH, HL, LH, and LL labels alongside optional zig-zag lines, background trend tinting

Indicator v5 TrendSMC / ICT / price action
Updated 2 months ago · None stated GitHub repository of Gold Trend (Market Structure)

GrimmHA Indicator

by GreyssonEnterprises
1 stars

An indicator that draws Heikin-Ashi candles in a separate pane, calculated from the open, high, low and close of each bar and coloured green or red by direction. The code also computes candle body and shadow measures such as average body size, shadow ratios an

Indicator v5 Candlestick patternsTrend
Updated 3 months ago · MIT GitHub repository of GrimmHA Indicator
1 stars

A strategy for a Taiwan mini index futures contract that combines a manually updated macro score with chart pattern breakouts. Growth, inflation, valuation and sentiment readings are typed in as inputs and produce a green, red or neutral bias. Entries need fou

Strategy v5 TrendBreakout Repaints
Updated 4 months ago · None stated GitHub repository of Mini Futures Macro Strategy v10

EMA Cross Strategy

by ashishgkwd
1 stars

EMA Cross Strategy is a Pine v4 strategy that plots a fast and a slow exponential moving average, 13 and 48 by default. It enters long when the fast EMA crosses above the slow one and short on the opposite cross, with a trade direction option for long only, sh

Strategy v4 Moving averagesTrend Repaints
Updated 4 months ago · None stated GitHub repository of EMA Cross Strategy

This strategy combines multi-timeframe trend bias, hourly liquidity sweeps, and lower-timeframe inversion fair value gap confirmations. It determines daily trend direction using historical daily candles, checks for a 1-hour liquidity sweep and reclaim against

Strategy v6 SMC / ICT / price actionTrend Repaints
Updated 4 months ago · MIT GitHub repository of Doc02 H1 Liquidity Sweep IFVG - Project Adapted

Crypto AMT Toolkit v2

by latifangren
1 stars

This indicator provides a comprehensive crypto trading toolkit on TradingView. It plots Volume Profile boxes using customizable lookback bars, row count, and value area percentage. VWAP lines with standard deviation bands are drawn alongside optional bands. Or

Indicator v6 VolumeVolatility & bands
Updated 5 months ago · MIT GitHub repository of Crypto AMT Toolkit v2

Index Futures Beat Buy and Hold

by PETERSAMUELOPS12
1 stars

A leveraged trend-following strategy for index futures that uses 20, 50 and 200 period EMAs to decide between long, flat and optional short positions. Leverage is higher in confirmed uptrends and steeper trends, lower for shorts, and reduced when ATR as a perc

Strategy v6 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of Index Futures Beat Buy and Hold

BVortex Strategy v1

by Alberto082544
1 stars

BVortex Strategy v1 calculates a scaled Vortex Indicator difference to detect overbought and oversold conditions relative to predefined upper and lower thresholds. It filters entries using market trend direction established by confirmed swing pivot highs and l

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

Trend Break Indicator

by Chovy-King
1 stars

An indicator version of a trend breakout strategy with BTC, gold and custom presets. It plots 20 and 60 EMAs and marks a triangle when a strong candle breaks the latest swing in the direction of the trend, after filters for higher-timeframe agreement, volume,

Indicator v6 BreakoutTrend
Updated 6 months ago · None stated GitHub repository of Trend Break Indicator

EMA Crossover Strategy

by Sandesh30-cloud
1 stars

This strategy tracks trend changes by calculating a 50-period fast Exponential Moving Average and a 200-period slow Exponential Moving Average. It triggers a long entry when the fast EMA crosses above the slow EMA and closes the position when the fast EMA cros

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

ATR Trend

by dtheran1
1 stars

Draws an ATR-based trend line on the price chart, inspired by Supertrend. The distance from the source, which can use highest high and lowest low, is set by a time period and an ATR weight. Ten smoothing types are available for the ATR. Options add a fast tren

Indicator v6 TrendVolatility & bands
Updated 6 months ago · None stated GitHub repository of ATR Trend
1 stars

An indicator in a separate pane that turns Heikin Ashi data into a momentum oscillator. It offers lookback modes, an engine choice including a Heikin Ashi blend, optional final smoothing, and adaptive fast and slow crossovers, plus a separate SMA 20 and 50 cro

Indicator v6 Oscillators & momentumTrend
Updated 6 months ago · None stated GitHub repository of Heikin Ashi Oscillator Trend Engine

BTC ATH Golden Cycle

by ymlee1104
1 stars

This strategy plots a Bitcoin all-time-high cycle model on the price chart. It starts from a chosen date and can show an Ichimoku cloud, a fast and slow geometric mean, and supply and demand boxes. Drop percentage, rise percentage, and a weight set the cycle l

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

Ichimoku Cloud Strategy

by Basant1Saini
1 stars

This strategy plots Ichimoku Cloud components on the price chart and generates trades based on trend confirmation. It enters long when a bullish Tenkan-Kijun cross occurs above the cloud or upon a bullish cloud breakout, with optional Chikou Span confirmation.

Strategy v5 TrendBreakout
Updated 8 months ago · None stated GitHub repository of Ichimoku Cloud Strategy

Gemini QUANTUM

by haydarkadioglu
1 stars

This overlay indicator plots a range-filter trend baseline on the price chart and marks BUY or SELL when the filter direction flips. It builds the filter from a smoothed average of source changes scaled by a multiplier, then trails price above or below that ra

Indicator v5 TrendSMC / ICT / price action Repaints
Updated 8 months ago · None stated GitHub repository of Gemini QUANTUM

ARC TrendStepper

by Tradehook-org
1 stars

ARC TrendStepper calculates and plots a stepped trend line directly on the price chart to filter out minor market noise. It updates the stepped value only when price changes exceed a configurable threshold calculated via Ticks, ATR, or percentage move. The ind

Indicator v5 TrendVolatility & bands
Updated 8 months ago · None stated GitHub repository of ARC TrendStepper

MTF Trend Guardian

by propuchon
1 stars

A strategy that combines a higher-timeframe trend filter with an RSI trigger. It goes long when price is above the previous higher-timeframe EMA and RSI crosses above its long threshold, and short in the mirror case. Positions close when RSI falls below or ris

Strategy v6 TrendOscillators & momentum
Updated 9 months ago · None stated GitHub repository of MTF Trend Guardian

Supertrend 17/3.2

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 17 and a multiplier of 3.2. 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 17/3.2
1 stars

Market Structure & S/R Zones plots swing pivot points, structural labels, and horizontal support and resistance zones directly on the price chart. Using configurable swing lengths, it identifies swing highs and lows to classify higher highs, higher lows, lower

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 9 months ago · MIT GitHub repository of Market Structure & S/R Zones
1 stars

Ranges with Targets is an indicator that draws horizontal support and resistance lines on the price chart using ATR-based calculations. It detects buy and sell signals from crossovers of close price with the upper and lower range levels. A target multiplier se

Indicator v5 TrendSupport & resistance
Updated 9 months ago · None stated GitHub repository of Ranges with Targets [ChartPrime]

A chart-overlay SuperTrend variant whose ATR multiplier shrinks for a limited number of bars after a divergence is found. Divergences are detected with pivots between price and a hidden oscillator, and shown as small markers. If a divergence in the trend direc

Indicator v6 TrendDivergence
Updated 9 months ago · None stated GitHub repository of SuperTrend Weighted by Divergence

VMC Strat Hybrid Trend

by matlaenousse
1 stars

VMC Strat Hybrid Trend is a long-oriented trading strategy plotted directly on the price chart. It combines an exponential moving average trend filter with WaveTrend, RSI, Stochastic RSI, and a custom Money Flow Index calculation. Long entries trigger when Wav

Strategy v6 TrendOscillators & momentum
Updated 10 months ago · None stated GitHub repository of VMC Strat Hybrid Trend

Ultra Clean Signals

by KirstonKK
1 stars

A minimal chart-overlay indicator that plots a 20 and a 50 EMA and prints large buy or sell labels on an EMA cross. A buy also needs volume above 1.5 times its 20-bar average, RSI between 35 and 65 and price above the fast EMA; a sell needs the opposite price

Indicator v6 Moving averagesTrend
Updated 10 months ago · None stated GitHub repository of Ultra Clean Signals

Ogi's Levels

by ognenmitev
1 stars

A multi-part overlay that draws support and resistance boxes from pivot highs and lows, sized as a multiple of ATR, with stop loss and two take profit lines based on an ATR stop distance and risk-to-reward ratios. It adds a trend label from a 50 and 200 bar si

Indicator v6 Support & resistanceTrend
Updated 11 months ago · Custom licence GitHub repository of Ogi's Levels
1 stars

This indicator detects swing highs and lows using configurable pivot lookback periods and plots upper and lower trendlines directly on the price chart. Slope angles are dynamically calculated using ATR, standard deviation, or linear regression methods. Breakou

Indicator v5 TrendSupport & resistance Repaints
Updated 11 months ago · None stated GitHub repository of Trendlines with Breaks LuxAlgo

EMA Pullback Strategy

by surajmateti
1 stars

This strategy plots a slow trend EMA and a faster entry EMA on the price chart. It opens a long position when price is above the trend EMA, closes below the entry EMA, and crosses back above that entry EMA. It exits with a percentage stop loss and take profit

Strategy v5 TrendMoving averages
Updated 11 months ago · None stated GitHub repository of EMA Pullback Strategy

This indicator plots Parabolic SAR circles and a configurable exponential moving average on the price chart. It treats the average of open, high, low, and close above the EMA as bullish and below it as bearish. A buy label appears when SAR is below the low, th

Indicator v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Parabolic SAR + EMA 200 + MACD Signals

Lab-Doi-02

by theteelek
1 stars

An experimental strategy lab script that tracks a simulated long position within a date window using a daily EMA 12 and EMA 26 cross as the trend filter. It opens the simulated long when the fast average is above the slow one on a confirmed bar, and closes it

Strategy v6 Trend
Updated 1 year ago · None stated GitHub repository of Lab-Doi-02

Keltner Channel

by Studentcodee
1 stars

The Keltner Channel strategy plots upper and lower bands on the price chart overlay using an exponential moving average or simple moving average combined with ATR or range calculations. The source crosses the bands to generate signals. It enters long positions

Strategy v6 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of Keltner Channel

SOLBTC MTPI

by Mikelkulla
1 stars

SOLBTC MTPI is a Pine Script strategy designed to gauge whether Solana is outperforming Bitcoin to determine market allocation. It calculates a composite trend signal using liquidity-weighted moving averages with Supertrend logic, DEMA filters, and normalized

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

This strategy builds Tenkan, Kijun and both Senkou span lines from adjustable periods. It goes long when price is above both cloud spans and Tenkan is above Kijun, and goes short in the mirror case. Each trade carries an ATR-based stop loss and take profit. Th

Strategy v5 TrendSupport & resistance
Updated 1 year ago · None stated GitHub repository of Ichimoku Cloud Strategy

Aroon Oscillator

by munlit
1 stars

A separate-pane indicator that computes the Aroon oscillator from how recently the highest high and lowest low occurred over a set length, then smooths it with a zero-lag filter that searches for a best gain value. A second signal line is derived from it. Inpu

Indicator v5 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of Aroon Oscillator
1 stars

This indicator calculates multiple smoothed versions of a chosen dataset using Kalman filters with adjustable gain parameters. It plots the resulting lines on the price chart for visual comparison. The main settings allow selection of the input source and togg

Indicator v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of Kalman Gain Parameter Mechanics

CM_EMA Trend Bars

by Hurairahengg
1 stars

CM_EMA Trend Bars is a trend-following indicator that plots buy and sell signal shapes on the price chart based on exponential moving average position. It calculates a single exponential moving average (EMA) using a customizable period, defaulting to 34 bars.

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of CM_EMA Trend Bars

theIndicator v2

by darkshloser
1 stars

A refactored version of a triple SuperTrend overlay. Each of three lines is calculated through helper functions from an ATR period, multiplier and a shared price source, with an option to use wicks or closing prices. Long stops plot in green and short stops in

Indicator v5 Trend
Updated 2 years ago · Apache-2.0 GitHub repository of theIndicator v2

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