Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 45)

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

Seykota Alt 22 is a trend-following strategy combining 55-bar Donchian channel breakouts for entries with a Parabolic SAR trailing stop for exits. Position sizing and initial stop-loss levels are determined using Average True Range (ATR). The strategy supports

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 22: Parabolic SAR

This indicator applies Singular Spectrum Analysis (SSA) to decompose price data into distinct structural components, including the underlying trend, long-term periodic cycles, short-term periodic cycles, and high-frequency noise. Using a configurable window le

Indicator v6 TrendOscillators & momentum
Updated 4 months ago · MIT GitHub repository of Singular Spectrum Decomposition [LuxAlgo]
8 stars

This strategy combines moving averages, ATR volatility bands and ADX trend strength on the price chart. It calculates ADX from price data and adjusts the ATR multiplier dynamically based on whether ADX is rising or falling. Long and short entries are controlle

Strategy v4 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of MA+ATR+ADX+PP Strategy

EMA Cloud

by lunarticktrading
7 stars

This indicator plots a fast and a slow exponential moving average on the price chart and fills the space between them as an EMA cloud. The fill is green when the fast average is at or above the slow average and red when it is below. Arrows mark bullish crossov

Indicator v6 Moving averagesTrend
Updated 2 weeks ago · None stated GitHub repository of EMA Cloud

RSI Trend Strategy

by SynergOps
7 stars

The RSI Trend Strategy combines a short-period Relative Strength Index with 30-period and 100-period Simple Moving Averages to identify trading opportunities on the main price chart. Long positions trigger when a 5-period RSI drops below 30 while price sits ab

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · MPL-2.0 GitHub repository of RSI Trend Strategy

This strategy tests a short-only trend-following system based on 50-period and 200-period exponential moving averages. It enters short when the fast EMA is below the slow EMA, the close crosses below the fast EMA within a defined lookback period, and a bearish

Strategy v4 Moving averagesTrend
Updated 3 years ago · Apache-2.0 GitHub repository of 50 EMA + 200 EMA Short Strategy (Not Good)

USTA

by Kalumur
4 stars

USTA combines multiple trend-following mechanisms on the price chart, primarily integrating SuperTrend and AlphaTrend overlay components. It calculates ATR-based volatility trailing lines to determine overall market direction, displaying visual buy and sell si

Indicator v5 TrendVolatility & bands
Updated 2 years ago · None stated GitHub repository of USTA

Snagprofit WMA MA

by dearvn
4 stars

Snagprofit WMA MA is a multi-timeframe trend indicator overlaid on the price chart. It calculates a weighted moving average across 1-minute, 5-minute, 15-minute, and 1-hour timeframes alongside a simple moving average on the active chart. Momentum shapes signa

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

Jash Test

by jash-git
3 stars

This indicator plots five exponential moving averages of lengths 3, 13, 34, 55 and 144 on the price chart. Fast lines are red and orange, slower lines are blue and purple, and a black 144-period average acts as a trend filter. It draws buy and sell labels when

Indicator v5 TrendMoving averages Repaints
Updated 4 weeks ago · None stated GitHub repository of Jash Test

This indicator identifies and plots market structure and smart money concept elements directly on the price chart. It detects swing structure, internal structure, liquidity sweeps, and strong or weak highs and lows. It also visualizes order blocks with buying

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 12 months ago · None stated GitHub repository of Price Action Smart Money Concepts [BigBeluga]

Radius Trend [ChartPrime]

by wynnforthework
2 stars

This indicator tracks directional market movement directly on the price chart using adaptive curved bands. It measures volatility via a smoothed high-low bar range, setting an initial boundary when trend flips occur. As the trend persists across bars, the scri

Indicator v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Radius Trend [ChartPrime]

SMC HTF Confluence

by skipp-dev
1 stars

SMC HTF Confluence calculates multi-timeframe market structure and setup scores using confirmed higher-timeframe data. It evaluates exponential moving averages for trend alignment, RSI for divergences, ATR for volatility regimes, and Bollinger Band Squeezes re

Indicator v6 TrendSMC / ICT / price action Repaints
Updated 4 days ago · None stated GitHub repository of SMC HTF Confluence

Drawing Delete Halt

by pineforge-4pass
1 stars

This validation strategy monitors price crosses against a dynamic level derived from a 20-period simple moving average drawn as a line object. It enters a long position when the closing price crosses over the line level and exits when price crosses under it. A

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of Drawing Delete Halt

EMA-Flat

by riegodavid-git
1 stars

A separate-pane indicator that measures how flat an exponential moving average is. It takes the absolute one-bar change of the EMA and divides it by the ATR, then plots that ratio as a histogram. Bars are teal when the ratio is below a flat threshold and orang

Indicator v5 TrendVolatility & bands
Updated 4 months ago · None stated GitHub repository of EMA-Flat
1 stars

Corpus Array Stats Helpers is an experimental Pine Script strategy designed to test array manipulation and moving average functions. During the first 50 bars, the script collects close prices into an array to perform statistical calculations like sum, average,

Strategy v5 Moving averagesTrend
Updated 4 months ago · MIT GitHub repository of Corpus Array Stats Helpers

MA+SQZ+STO V1

by gabriel-klettur
1 stars

This strategy combines exponential moving averages, a Stochastic oscillator, and Squeeze Momentum calculations to identify long trade entries on the price chart. It enters long positions when the Stochastic K line crosses above D in oversold territory while pr

Strategy v5 TrendOscillators & momentum
Updated 7 months ago · None stated GitHub repository of MA+SQZ+STO V1
1 stars

This indicator combines Volume Weighted Bands, a Keltner Hull Suite, High Volume Nodes, and Supply and Demand Zones directly on the main price chart. It calculates a smoothed volume-weighted trend line surrounded by ATR-based bands to define market bias and hi

Indicator v6 TrendVolatility & bands
Updated 7 months ago · None stated GitHub repository of Keltner Hull Suite Integrated

Double EMA Crossover

by Basant1Saini
1 stars

The Double EMA Crossover strategy plots a fast 9-period EMA and slow 21-period EMA on the price chart with a 200-period trend EMA filter. It generates long signals on golden crosses when price exceeds the trend EMA and MACD is bullish, and short signals on dea

Strategy v5 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of Double EMA Crossover
1 stars

This indicator identifies market trends and projects dynamic price targets directly on the price chart. It calculates high and low bands using simple moving averages offset by a smoothed Average True Range buffer. Bullish and bearish trend signals trigger when

Indicator v5 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of Target Trend [BigBeluga]

A chart-overlay indicator that extends a LuxAlgo-style smart money concepts framework with trend and momentum filters. It marks internal and swing break of structure and change of character, order blocks, equal highs and lows, fair value gaps, premium and disc

Indicator v5 SMC / ICT / price actionTrend Repaints
Updated 9 months ago · None stated GitHub repository of Smart Money Concepts + EMA + RSI

Kyle Algo v1

by turnupdigital
1 stars

An indicator on the price chart that draws a ribbon of fifteen EMAs of the high, from 9 to 51 bars, coloured by whether the close is above each one when the energy option is on. A Supertrend variant based on a Keltner-style channel range, scaled by a sensitivi

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Kyle Algo v1

VCopyWave

by rajatjpatel
1 stars

A smoothed moving average drawn on the price chart, a renamed copy of the SAMA script. Prices are clamped inside a narrow standard deviation channel around a short weighted average, then passed through two weighted moving averages, one with an adjustable lengt

Indicator v5 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of VCopyWave
1 stars

A Pine v4 strategy that plots a 28-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 ETHUSDT EMA Cross Strategy
947 stars

The Adaptive RSI Moving Average (ARSIMA) is an overlay indicator that dynamically adjusts its smoothing factor based on the Relative Strength Index (RSI). When the RSI moves toward extreme overbought or oversold conditions, the smoothing factor increases to ma

Indicator v4 Moving averagesOscillators & momentum
Updated 12 days ago · GPL-3.0 GitHub repository of Adaptive RSI Moving Average
330 stars

Supertrend + RSI Strategy [Alose] combines the classic Supertrend indicator with the Relative Strength Index (RSI) to enter and exit positions on the price chart. Long trades open when the Supertrend is bullish and RSI crosses above 50, while short trades requ

Strategy v5 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Supertrend + RSI Strategy [Alose]

Dynamic Linear Regression

by TradersPost
228 stars

Dynamic Linear Regression calculates and plots linear regression trendlines and standard deviation channels directly on the price chart over a user-selected time period. Traders can configure static channels locked at the end time, dynamic channels that contin

Indicator v6 TrendSupport & resistance
Updated 3 months ago · None stated GitHub repository of Dynamic Linear Regression
114 stars

This indicator plots a dynamic step trendline directly on the price chart using Kaufman Efficiency Ratio (ER). It blends short and long standard deviations based on price efficiency to construct adaptive step thresholds. Trend flips trigger buy and sell signal

Indicator v4 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Efficient Trend Step Mod

This indicator plots Average Directional Movement Index Rating in a separate pane. It smooths true range and directional movement to produce plus DI, minus DI, the directional index, and ADX. ADXR averages the current ADX with the ADX from the rating period ba

Indicator v6 TrendOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Average Directional Movement Index Rating (ADXR)
56 stars

This indicator calculates dynamic upper and lower trendlines from pivot highs and pivot lows across a specified bar length. Trendline slopes are derived using ATR, standard deviation, or linear regression methods. It plots trendlines and breakout signal labels

Indicator v5 TrendSupport & resistance Repaints
Updated 2 months ago · None stated GitHub repository of Trendlines With Breaks [LUX]
55 stars

Calculates swing points, dynamic support and resistance channels, and a baseline trend moving average directly on the price chart. It identifies structural highs and lows using 10-bar pivot logic, plotting colored triangles offset to confirmed swing bars. Dyna

Indicator v6 Support & resistanceTrend
Updated 6 months ago · Apache-2.0 GitHub repository of Structural Levels & Key Zones
47 stars

The Cubic Regression Moving Average calculates a fitted endpoint using a degree-three polynomial over a specified lookback period via normal equations solved by closed-form elimination. It plots the resulting trend line directly on the price chart. Users can a

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Cubic Regression Moving Average
43 stars

This indicator plots a modified Ichimoku set on the price chart. It builds Tenkan, Kijun, Chikou, and both Senkou lines from a ten-bar average of the open rather than the usual high-low midpoint, then fills the cloud between Senkou A and Senkou B. A green tria

Indicator v5 TrendSupport & resistance
Updated 2 years ago · None stated GitHub repository of No Repaint - ICHIMOKU
16 stars

This strategy enters long or short when price breaks a Keltner channel built from an exponential moving average and an ATR multiple. It sizes each unit from a fixed equity risk percentage and an ATR stop, then can add units as price moves in the trade directio

Strategy v6 TrendVolatility & bands
Updated 12 months ago · None stated GitHub repository of Seykota Alt 23: Keltner Channel

Smart Trader Episode 03 divides a specified lookback window into bar groups or blocks on the main price chart. It calculates aggregated composite OHLC candles for each block, draws structural group boxes, and identifies trend segments using custom angle thresh

Indicator v6 TrendCandlestick patterns
Updated 4 months ago · MIT GitHub repository of Smart Trader Ep 03 - Candles and Tradelines
8 stars

MA ATR ADX PP Strategy combines customizable moving averages with Average True Range (ATR) and Average Directional Index (ADX) filters to generate trade entries and exits on the main chart. The script supports eight moving average types, including SMA, EMA, Hu

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of MA+ATR+ADX+PP Strategy

EMA Cloud Dots

by lunarticktrading
7 stars

This indicator calculates fast and slow exponential moving averages of close prices and plots colored dots in a separate pane to show trend direction. Green dots appear when the fast EMA exceeds the slow EMA, while red dots signal the opposite. The script pull

Indicator v6 TrendMoving averages
Updated 2 weeks ago · None stated GitHub repository of EMA Cloud Dots
6 stars

This indicator classifies price action into four distinct market regimes: Trend, Expansion, Compression, or Mean Reversion. It determines states using a simplified Hurst exponent estimate, ADX slope thresholds, and realized volatility measurements. Based on th

Indicator v6 TrendVolatility & bands
Updated 2 months ago · MIT GitHub repository of Capital41 Regime Matrix v3

This indicator plots multi-timeframe Exponential Moving Averages alongside double Bollinger Bands directly on the price chart. It calculates three EMAs (short, medium, and long term) fetched from configurable higher timeframes, alongside two sets of Bollinger

Indicator v4 TrendVolatility & bands
Updated 3 years ago · Apache-2.0 GitHub repository of Bollinger Bands Squeeze / Trend + EMAs
4 stars

This strategy trades E-mini and Micro E-mini S&P 500 futures on the price chart. It enters long when a fast EMA crosses above a slow EMA during New York regular trading hours, and enters short on the opposite cross unless long-only mode is on. Each entry place

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of ES S&P500 Strategy [trugurpala]
4 stars

This strategy plots Bollinger Bands on the price chart using a simple moving average basis and a standard-deviation multiplier. Optional RSI, long-period Aroon, and EMA or SMA filters are present but stay disabled unless a password enables the PRO path. Long e

Strategy v4 Volatility & bandsOscillators & momentum

YORUKALIEFE

by Kalumur
4 stars

This indicator plots multiple exponential moving averages on weekly and monthly timeframes, including 14-period weekly EMA, 8-period monthly EMA, and 14-period monthly EMA. It also displays a Kijun line derived from the midpoint of high and low over 20 periods

Indicator v5 Moving averagesVolatility & bands
Updated 2 years ago · None stated GitHub repository of YORUKALIEFE

Snagprofit WMA MA

by dearvn
4 stars

Snagprofit WMA MA combines multi-timeframe Weighted Moving Averages (1M, 5M, 15M, and 1H) with a Simple Moving Average filter to assess trend momentum across different time horizons. It plots shape signals directly on the price chart when candle breakouts alig

Indicator v5 TrendMoving averages Repaints
Updated 4 years ago · None stated GitHub repository of Snagprofit WMA MA

Jash Test

by jash-git
3 stars

This indicator overlays five Fibonacci-based exponential moving averages (3, 13, 34, 55, and 144) directly on the price chart, drawing inspiration from Guppy Multiple Moving Averages and Granville rules. It triggers buy signals when the EMAs are stacked in com

Indicator v5 TrendMoving averages
Updated 4 weeks ago · None stated GitHub repository of Jash Test

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