Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 36)

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

Close Cross SMA 152

by pineforge-4pass
1 stars

A minimal strategy that trades the close crossing a 152-period simple moving average. It enters long when the close crosses above the average and short when it crosses below, reversing the position each time. The length is fixed with no adjustable inputs, and

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of Close Cross SMA 152

Oleg Aryukov Strategy

by kanylbullen
1 stars

This strategy combines multiple technical indicators into a unified trading system, including RSI, Williams %R, TSI, KDJ, Bollinger Bands %B, Nadaraya-Watson filter, and an RCI Ribbon. Traders can individually toggle each indicator module on or off while custo

Strategy v6 Oscillators & momentumTrend
Updated 8 days ago · None stated GitHub repository of Oleg Aryukov Strategy
1 stars

The script calculates a weighted average of Heikin Ashi score values across four multi-timeframe periods derived from the signal timeframe. It also counts bullish and bearish signals from each timeframe and checks whether the required number of confirming sign

Indicator v6 TrendOscillators & momentum
Updated 13 days ago · None stated GitHub repository of DEPV2 A7 · MTF GÜÇ + TF ONAYI

SR+Trend v10

by MuhammadMuhamid
1 stars

A long-only crypto spot strategy that finds support and resistance from pivots on four timeframes (5 minutes to 4 hours) and enters on a retest of support within a set number of bars. It blocks entries where price pierced support and reclaimed it, can treat br

Strategy v6 Support & resistanceTrend
Updated 13 days ago · None stated GitHub repository of SR+Trend v10

CROSV

by kasutu
1 stars

A multi-layer chart overlay built around three EMAs of 20, 50 and 200 bars, with line colours that change by their relative order and a wide coloured zone around the 50 EMA. It adds automatic trend lines drawn from pivot points, with adjustable pivot period an

Indicator v5 Moving averagesTrend
Updated 2 weeks ago · None stated GitHub repository of CROSV

Kinetic Trend Envelope

by vedkanani123
1 stars

An adaptive trailing-stop indicator on the price chart from the GoemonYae trading system community edition. It estimates price with a selectable filter, measures volatility with a choice of estimators such as Yang-Zhang, and builds an envelope that trails pric

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Kinetic Trend Envelope

Manchu Strategy Indicator

by GreyssonEnterprises
1 stars

An indicator that shades a trading session window on the price chart, defaulting to a Chicago time zone morning session with weekday toggles. It adds a Donchian channel based trend fill, an optional 100 line, and a WaveTrend oscillator with buy, gold, sell and

Indicator v5 Sessions & timeOscillators & momentum
Updated 3 months ago · MIT GitHub repository of Manchu Strategy Indicator

No Wick + TQ Strategy

by riegodavid-git
1 stars

A strategy that places limit orders at the midpoint of a candle with no wick on the entry side, when a trend quality measure is above a bull threshold or below a bear threshold. Further filters cover close position within the candle, minimum body size relative

Strategy v6 TrendCandlestick patterns
Updated 4 months ago · None stated GitHub repository of No Wick + TQ Strategy
1 stars

KLSE Market Regime Dashboard displays a macro market regime overview and sector relative strength metrics in an on-chart table. It retrieves daily data from global macro benchmarks (FBMKLCI, Dow Jones, S&P 500, VIX) and key Malaysian sector leadership proxies

Indicator v5 Screeners & dashboardsTrend
Updated 4 months ago · None stated GitHub repository of KLSE Market Regime Dashboard
1 stars

Multi Variable Declaration is a strategy designed to demonstrate multiple variable declaration syntax within a trading model. It calculates a 12-period price channel midpoint alongside an exponential moving average spread (EMA 9 minus EMA 21) to establish tren

Strategy v6 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Multi Variable Declaration
1 stars

This indicator draws a four-line exponential moving average ribbon on the price chart with 8, 21, 48 and 200 period lines by default. Shaded clouds between the fast and slow pairs change colour with direction, and the 21 EMA acts as the pivot. Optional feature

Indicator v5 Moving averagesTrend Repaints
Updated 6 months ago · None stated GitHub repository of Saty Pivot Ribbon Pro

CROSS

by AlanGuo
1 stars

A long-only moving average strategy that can read its signals from another symbol. It enters when the signal symbol closes more than one percent above a 120-period SMA, EMA or RMA, and exits when it closes one percent below, or optionally when its high stretch

Strategy v6 TrendMoving averages Repaints
Updated 7 months ago · None stated GitHub repository of CROSS
1 stars

BTC ATH Golden Cycle v5 is a Bitcoin-focused strategy that models long-term market trends based on Bitcoin halving cycles. It combines a ZigZag pivot library, Neo-Ichimoku Cloud, Rainbow ribbon visualizer, Geometric Mean Index, and automated Supply and Demand

Strategy v6 TrendSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of BTC ATH Golden Cycle v5
1 stars

An indicator that sets trend direction from a fast and slow EMA on four-hour data, then looks for a crossover of the same EMAs on the chart timeframe, intended as fifteen minutes, in that direction. An optional volume-above-average check and a cooldown filter

Indicator v5 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of V14 4H EMA Trend with 15M Entries

Supertrend Enhanced

by haydarkadioglu
1 stars

Supertrend Enhanced plots a classic ATR Supertrend on the price chart and marks trend flips as buy and sell signals. It builds upper and lower bands from an ATR or a simple moving average of true range, then flips direction when price crosses the opposite band

Indicator v5 TrendVolatility & bands
Updated 8 months ago · None stated GitHub repository of Supertrend Enhanced
1 stars

An indicator on the price chart that smooths price with a Kalman filter, builds a band around it from a weighted average of bar ranges multiplied by a deviation setting, and runs a SuperTrend on the filtered line. Trend is set when the close moves outside the

Indicator v6 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Range Filtered Trend Signals
1 stars

A price-chart overlay that measures how fast an exponential moving average is turning. It takes the bar-to-bar change of a 20-bar EMA as its slope and the change in that slope as acceleration. When both exceed adjustable thresholds in the same direction, it ti

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Trend Slope Acceleration

An overlay indicator that marks reversal-style signals on the price chart: TD8 and TD9 counts, hammer, shooting star, bullish and bearish harami, and RSI divergence. Each signal can be switched on or off, and signals can be limited to long or short only. Marke

Indicator v5 Candlestick patternsDivergence
Updated 1 year ago · None stated GitHub repository of Price Action Signals and Filters
1 stars

This strategy goes long when a 13-period EMA crosses above a 34-period EMA and short on the opposite cross, closing each side on the reverse cross. A percentage trailing stop, set separately for longs and shorts, ratchets behind the close and is plotted as cir

Strategy v5 Moving averagesTrend Repaints
Updated 2 years ago · None stated GitHub repository of Verge EMA Crossover + Trailing Stop

TEMA Smoothing

by nvFede
1 stars

A Pine v4 overlay that plots three triple exponential moving averages of the close, with lengths of 10, 20 and 50 by default, drawn in red, blue and green. Each average is passed through a simple moving average controlled by a smoothing factor, which defaults

Indicator v4 Moving averagesTrend
Updated 3 years ago · None stated GitHub repository of TEMA Smoothing

RSI Oscillator (Hotch)

by rajatjpatel
1 stars

A separate-pane trend oscillator built from two smoothed moving averages, 21 and 315 bars by default. Each average is passed through a weighted filter and then an RSI, and the result is scaled to a range of roughly 0 to 200. Two lines are drawn with dynamic gr

Indicator v5 Oscillators & momentumTrend
Updated 4 years ago · None stated GitHub repository of RSI Oscillator (Hotch)

Simple Moving Average

by juliencrn
1 stars

Simple Moving Average is a minimal overlay indicator that plots two simple moving averages of the close on the price chart: a 20-period line in orange and a 50-period line in blue. The lengths are fixed in the code and there are no inputs, signals, fills or al

Indicator v5 Moving averagesTrend Archived
Updated 4 years ago · None stated GitHub repository of Simple Moving Average

Modified ADX

by hayashi19
1 stars

This indicator computes the standard ADX from directional movement, subtracts twenty so that zero becomes the usual trend-strength threshold, and draws the result as columns in a separate pane. Positive columns are green, brighter when rising, and negative col

Indicator v5 Oscillators & momentumTrend
Updated 4 years ago · None stated GitHub repository of Modified ADX
1 stars

A Pine v4 strategy that plots a 10-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of CRVBTC EMA Cross Strategy

Omar Edited WF

by Alorse
330 stars

Omar Edited WF is a trading strategy overlay built around Williams Fractals and multiple Exponential Moving Averages. It detects high and low fractal pivot points over configurable lookback periods alongside three adjustable EMA trendlines. Long entries are ma

Strategy v5 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Omar Edited WF
318 stars

This indicator calculates and plots two moving averages, which can be configured as either exponential or simple, along with a shaded fill between them to highlight trend direction. It also derives and plots upper and lower deviation levels using a customizabl

Indicator v5 Moving averagesTrend
Updated 2 months ago · MIT GitHub repository of TVT Short Term (1h)
257 stars

This overlay indicator smooths a rolling highest low and lowest high with a rational quadratic kernel, then holds a step line that switches between those two smoothed levels when the selected source crosses them. It plots that line as crosses on the price char

Indicator v5 TrendSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Donald - Highest-Lowest Visual

STRG-BBForce

by harryguiacorn
220 stars

STRG-BBForce is a Bollinger Bands trend-following strategy. It calculates standard Bollinger Bands and tracks directional alignment across the upper, lower, and basis lines. When all three lines slope upward, it opens a long position and closes short positions

Strategy v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of STRG-BBForce

This strategy identifies bullish and bearish Three Line Strike candlestick patterns combined with a dual moving average cloud and Volume Spread Analysis (VSA). It triggers long or short entries when a strike formation confirms in alignment with the moving aver

Strategy v5 Candlestick patternsTrend Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of 3LS 3 Line Strike Strategy [Kintsugi Trading]
57 stars

Implements an automated testing framework designed to validate an EMA Ribbon and MACD hybrid strategy. It verifies indicator calculations, trend context filters, signal generation, suppression rules, and cooldown mechanics using custom assertions. Test results

Strategy v6 Moving averagesOscillators & momentum
Updated 1 year ago · Apache-2.0 GitHub repository of EMA Ribbon Test Suite v1.5
47 stars

Calculates a finite impulse response moving average using Blackman window weighting. The Blackman window applies specific cosine constants to minimize spectral leakage, yielding a smooth trend-following curve. The calculation adapts dynamically during initial

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Blackman Moving Average (BLMA)
43 stars

This indicator calculates and plots the standard Directional Movement Index (DI+, DI-, and ADX) in an oscillator pane alongside colored horizontal zones representing trend strength stages: weak, medium, strong, and exhaustion. The ADX line dynamically shades b

Indicator v4 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Directional Movement Index
20 stars

This indicator calculates a deseasonalized centered moving average from the selected source data using chosen MA types like WMA, EMA, SMA or RMA. It plots the resulting value on the price chart and changes the color to green or red based on the direction of th

Indicator v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Modified Deseasonalized/Centered MA

This indicator calculates dynamic pivot highs and pivot lows over a configurable period to track price change rates and retracement levels. It plots visual markers at detected pivots and draws lines with labels displaying percentage movements, prices, and retr

Indicator v4 Support & resistanceTrend
Updated 6 years ago · None stated GitHub repository of Price Change Rate by Pivot Points - Dynamic
16 stars

This strategy enters long or short when a chart-timeframe Donchian breakout agrees with a higher-timeframe confirmation, using breakout, moving average, or both. It exits on a shorter Donchian channel and can flatten on a time rule. Position size risks a set p

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 17: Dual TF Confluence

DI Engulfing B002

by ruckard
13 stars

This strategy identifies trend-following engulfing setups filtered by a 200 EMA on the price chart. Long trades require price to be above the 200 EMA following three consecutive bearish candles engulfed by a bullish candle. Short entries mirror this structure

Strategy v5 TrendCandlestick patterns
Updated 1 year ago · None stated GitHub repository of DI Engulfing B002

TD Sequential

by davro
10 stars

This indicator overlays Tom DeMark's TD Sequential methodology on the main price chart. It tracks consecutive price comparisons where current closes are higher or lower than the close four bars ago, incrementing setup counts from one to nine. Upon completing a

Indicator v4 TrendOscillators & momentum
Updated 5 years ago · None stated GitHub repository of TD Sequential
9 stars

This indicator implements an L1 proximal regularized filter to smooth price action while preserving significant market trends. It calculates a dynamic noise threshold based on a 200-period ATR and applies soft-thresholding to estimated velocity updates. The in

Indicator v6 TrendVolatility & bands
Updated 4 months ago · MIT GitHub repository of L1 Proximal Filter [LuxAlgo]

Linear Regression Channel - Eterna

by EternaHybridExchange
9 stars

This strategy plots a linear regression of close and deviation bands on the price chart. It enters long when price crosses up from the lower band in an uptrend defined by an EMA and a rising regression line, and enters short on a rejection from the upper band

Strategy v5 TrendMean reversion Repaints
Updated 7 months ago · MIT GitHub repository of Linear Regression Channel - Eterna

Simple Hurst Exponent

by Anderson-ALGO
9 stars

This indicator estimates a simple Hurst exponent from the length of the scaled price path over a user-set lookback and plots it in a separate pane. A value above 0.5 is colored differently from a value below 0.5, with a dotted horizontal line at 0.5. An option

Indicator v4 TrendMean reversion
Updated 5 years ago · None stated GitHub repository of Simple Hurst Exponent

This indicator overlays a market structure dashboard on the price chart. It reads up to seven user-selected timeframes, each with an on/off switch and a trend weight, and shows columns for EMA trend, swing highs and lows, structure, order blocks, and fair valu

Indicator v6 Screeners & dashboardsSMC / ICT / price action
Updated 3 months ago · None stated GitHub repository of Market Structure Dashboard | Flux Charts

MA Crossover Table

by suyons
7 stars

MA Crossover Table is a multi-timeframe indicator that displays trend states in a table overlaid on the price chart. It computes SMA crossovers for lengths 10, 20 and 60 on timeframes 1, 5, 15 and 60. Bullish conditions trigger when successive SMAs are in uptr

Indicator v5 Moving averagesTrend
Updated 4 months ago · None stated GitHub repository of MA Crossover Table

This long-only strategy executes trades based on Ichimoku Kinko Hyo Tenkan-Sen and Kijun-Sen crossovers. It opens a long position when the Tenkan-Sen moves above the Kijun-Sen and closes the position when the Tenkan-Sen falls below the Kijun-Sen. Main settings

Strategy v5 TrendMoving averages
Updated 1 year ago · MPL-2.0 GitHub repository of Ichimoku Kinko Hyo TK Cross Strategy
6 stars

Capital41 Fusion Core Strategy is an overlay trading strategy that combines an exponential moving average trend filter, RSI, Williams %R, and volume/ATR expansion into a composite momentum oscillator. It executes long trades when the smoothed oscillator crosse

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · MIT GitHub repository of Capital41 Fusion Core Strategy

TheStrat Suite

by 345-strategies
5 stars

This indicator implements Rob Smith's TheStrat price action methodology across up to six configurable timeframes. It classifies candles into inside, directional, and outside bars, identifies patterns like hammers, shooters, and failed 2s, and calculates magnit

Indicator v6 Candlestick patternsSupport & resistance Repaints
Updated 4 days ago · MPL-2.0 GitHub repository of TheStrat Suite

Rolling Moving Average

by SiegerTerpstra
5 stars

This indicator plots a Rolling Moving Average, also called Wilder's smoothing or SMMA, on the price chart. It averages the selected source with a length-based Wilder formula that is seeded by a simple moving average, then can apply a second moving-average pass

Indicator v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Rolling Moving Average

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