Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 46)

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

3 stars

The River Strategy with SuperScalper plots custom Bollinger Bands to form a price channel on the main chart overlay. It identifies breakout conditions when price bars clear the channel boundaries to generate entry, stop loss, and multi-tier take profit levels.

Indicator v5 Volatility & bandsSupport & resistance Repaints
Updated 12 months ago · None stated GitHub repository of River Strategy with SuperScalper by Leo

Alpy

by avatar-lavventura
2 stars

This strategy calculates a Volume-Weighted Moving Average (VWMA) sourced from a 60-minute timeframe to generate upper and lower channel bands based on user-defined percentage offsets. It incorporates RSI and Williams Fractals logic to evaluate potential entry

Strategy v4 Moving averagesTrend Repaints
Updated 7 months ago · None stated GitHub repository of Alpy

Pinbar Strategy

by Web3Degenerate
2 stars

This strategy identifies pin bar candlestick patterns, specifically hammer and shooting star candles, to trigger trade entries. It detects candle shapes based on a customizable Fibonacci threshold. Signals can be filtered using minimum and maximum ATR candle s

Strategy v5 Candlestick patternsTrend
Updated 2 years ago · None stated GitHub repository of Pinbar Strategy
2 stars

This overlay indicator combines a ZigZag swing plot, Fibonacci retracement levels, and a linear regression channel on the price chart. Pivot points use an ATR-based deviation multiplier and a minimum depth, and optional lines can extend left or right with pric

Indicator v4 TrendVolatility & bands Repaints
Updated 3 years ago · None stated GitHub repository of LinReg with RSI and Zigzag

RussiaFX Strategy

by DaniilOkrug
2 stars

This indicator plots green arrow up shapes on the price chart when the close exceeds the close one bar ago, high one bar ago, and high two bars ago. It plots red arrow down shapes when the close is lower than the close one bar ago, low one bar ago, and low two

Indicator v4 TrendBreakout
Updated 4 years ago · MIT GitHub repository of RussiaFX Strategy

Mini Screener

by jayadevrana
1 stars

Mini Screener is a multi-asset monitoring dashboard that displays price data and trend status for five user-selected symbols in an on-chart table. It calculates single-bar percentage price changes and checks whether each asset trades above or below an exponent

Indicator v6 Screeners & dashboardsTrend
Updated 4 days ago · MPL-2.0 GitHub repository of Mini Screener
1 stars

This strategy plots on the price chart and stores recent closes in a float array during the first sixty bars. It enters a long position when the newest stored close is above the close ten slots earlier and the nine-period EMA crosses above the twenty-one-perio

Strategy v5 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Corpus Barstate Array Helpers

MA+STO+MA_V1

by gabriel-klettur
1 stars

This strategy combines Exponential Moving Averages (10, 55, and 200 EMAs) with a Stochastic Oscillator to execute trades. It enters long positions when the Stochastic K line crosses above D in oversold territory while price is above the 200 EMA. Short entries

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

This indicator combines Volume Weighted Bands, a Hull Moving Average with Keltner Channels, and a Swing Profile directly on the price chart. It calculates volume-weighted trend lines, ATR volatility bands, and swing structures to plot dynamic support and resis

Indicator v6 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of Keltner Hull Swing Profile

EMA Ribbon

by Basant1Saini
1 stars

The EMA Ribbon strategy plots six exponential moving averages (periods 8, 13, 21, 34, 55, 89) on the price chart to form a visual ribbon. It detects trend direction using full stack alignment, partial alignment (at least 4 of 6 consecutive pairs), or fast EMA

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

Target Trend is a trend-following overlay indicator that determines market direction using ATR-adjusted simple moving average bounds. It calculates upper and lower channel boundaries based on SMA calculations of high and low prices offset by a smoothed ATR val

Indicator v5 TrendSupport & resistance
Updated 9 months ago · None stated GitHub repository of Target Trend [BigBeluga]
1 stars

A chart-overlay indicator that detects pivot highs and lows and draws extended trendlines through the latest pairs, keeping only lines steeper than a minimum angle and limiting the total number. Resistance and support pivots can be labelled R and S. A table su

Indicator v5 Support & resistanceTrend
Updated 9 months ago · None stated GitHub repository of Ultimate Auto Trendlines

Wonder2

by turnupdigital
1 stars

An indicator on the price chart that builds smoothed average prices from a Heikin Ashi style open, high, low and close, then compares a smoothed close with a smoothed open. Green or red shading marks which is higher, and a buy or sell triangle appears when the

Indicator v5 Trend
Updated 1 year ago · None stated GitHub repository of Wonder2

[Z] Moving Average

by zhuzp98
1 stars

This indicator calculates and plots eight separate moving averages directly on the price chart. It provides seven Simple Moving Averages with default periods of 5, 10, 20, 30, 60, 120, and 200, alongside one 20-period Exponential Moving Average. Each moving av

Indicator v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of [Z] Moving Average
1 stars

This indicator plots the 14-period simple moving average on the price chart. It defines functions that detect crossovers in the SMA line with price, RSI crossing 70 and 30 levels, and momentum line crossing zero. When these conditions occur, the script sends a

Indicator v4 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Alert with Multiple Indicators

Bjorgum MTF MA

by nvFede
1 stars

A Pine v4 overlay that draws up to three moving averages, each with its own type, length, optional timeframe and colours. Available types include EMA, HMA, WMA, DEMA, VWMA, VWAP, T3 and others. A length of zero disables an average. Lines and bars can be colour

Indicator v4 Moving averagesTrend
Updated 3 years ago · None stated GitHub repository of Bjorgum MTF MA
1 stars

A separate-pane version of the Directional Movement Index. It plots the ADX line together with the plus and minus directional indicator lines, using the same Wilder style smoothing as the standard tool. The area between the plus and minus lines is filled with

Indicator v5 TrendOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Directional Movement Index
947 stars

The Ahrens Moving Average calculates a smoothed trend-following line using a recursive formula that factors in both the immediate previous average and a historical average value. It plots directly on the main price chart as a continuous overlay. When color hig

Indicator v4 Moving averagesTrend
Updated 12 days ago · GPL-3.0 GitHub repository of Ahrens Moving Average
330 stars

Trend EMA + RSI is a trend-following strategy that generates trading signals using three exponential moving averages and RSI filter conditions. Long trades execute when a fast EMA crosses above a slow EMA while remaining above a long-term baseline EMA on a bul

Strategy v5 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Trend EMA + RSI [Alorse]

EMA Strategy

by capissimo
114 stars

Calculates a central Exponential Moving Average with upper and lower channel bands offset by a fixed pip distance, inspired by LazyBear's Pip Collector script. Generates buy and sell signals when price interacts with the envelope bands, with an optional ATR vo

Indicator v4 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of EMA Strategy

This strategy generates trading signals on the 5-minute price chart using Williams Fractals for trend reversals, combined with EMA fast and slow trend filters and optional RSI confirmation. Long entries trigger on bullish fractals aligned with rising EMA and R

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of 5min Williams Fractals Scalping (3commas)

SuperTrend & Pivots

by dcaoyuan
55 stars

This overlay indicator plots a SuperTrend line on the price chart using a fixed ATR length of 10 and a factor of 3. When the trend direction is up it draws a green line and a light green fill toward the candle midpoint; when down it draws a red line and a ligh

Indicator v6 TrendVolatility & bands
Updated 6 months ago · Apache-2.0 GitHub repository of SuperTrend & Pivots

This strategy trades Donchian breakouts on the price chart and sizes each unit from a percentage of equity. It allows long and short entries, places an ATR initial stop, trails with a chandelier stop, and can add units as price moves by a multiple of ATR, up t

Strategy v6 TrendVolatility & bands
Updated 12 months ago · None stated GitHub repository of Seykota Alt 24: Vol-Adjusted Targets

VWAP Bounce - Eterna

by EternaHybridExchange
9 stars

This strategy overlays volume-weighted average price deviation bands and an exponential moving average trend filter directly on the price chart. It enters long positions during an uptrend when price recovers above the lower band, and enters short positions in

Strategy v5 Mean reversionTrend
Updated 7 months ago · MIT GitHub repository of VWAP Bounce - Eterna

Heikin Ashi Delta Smoothed

by lunarticktrading
7 stars

This indicator calculates the difference between Heikin-Ashi close and open values to quantify directional candle spread. It smooths this delta value using a simple moving average and plots the resulting oscillator as a line in a separate pane. Traders can cus

Indicator v6 Oscillators & momentumCandlestick patterns
Updated 2 weeks ago · None stated GitHub repository of Heikin Ashi Delta Smoothed
7 stars

This strategy executes breakout trades based on price channels and moving average trend alignment. It enters long positions when the closing price breaks above its 20-period high while trading above a 130-period simple moving average. Short positions enter whe

Strategy v5 BreakoutTrend
Updated 1 year ago · MPL-2.0 GitHub repository of Weekly Break out Strategy
6 stars

Calculates and plots support and resistance zones based on candle wick rejections and liquidity sweeps directly on the price chart. The indicator scans historical price action using a configurable lookback period and wick threshold percentage, merging close le

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of Wick Rejection S/R Strategy

Cerebr Wave

by jerryinyang
5 stars

Cerebr Wave is an overlay indicator that combines multi-timeframe Keltner Channels with a Wave Trend oscillator to analyze market structure and momentum. It calculates higher-timeframe and lower-timeframe Keltner Channels alongside Wave Trend crossover signals

Indicator v4 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Cerebr Wave

This indicator plots multi-timeframe 50-period exponential moving averages from the Daily and 4-hour charts directly onto the price chart. It generates bullish or bearish signals when the current close aligns with the Daily trend, crosses the 4-hour EMA, and b

Indicator v4 TrendMoving averages Repaints
Updated 3 years ago · Apache-2.0 GitHub repository of Daily Trend + 4 Hour Reversal + 15 Min Pressure

Noob's MTF EMA Clouds

by InNoobWeTrust
4 stars

Noob's MTF EMA Clouds computes and overlays multi-timeframe Exponential Moving Average (EMA) pairs across up to five user-selected timeframes directly on the price chart. It calculates fast and slow EMAs to render shaded clouds that visualize trend direction a

Indicator v5 Moving averagesTrend
Updated 2 days ago · None stated GitHub repository of Noob's MTF EMA Clouds
4 stars

This strategy identifies breakout entries confirmed by elevated trading volume and trend direction. It triggers long entries when the close crosses above the recent highest high, provided volume exceeds its moving average by a multiplier and price remains abov

Strategy v6 BreakoutVolume
Updated 2 months ago · MIT GitHub repository of ETH Momentum Breakout [trugurpala]
4 stars

This strategy executes mean-reversion trades based on RSI overbought and oversold levels directly on the price chart. It generates long signals when the RSI crosses back above the oversold boundary and short signals when it crosses below the overbought boundar

Strategy v5 Mean reversionOscillators & momentum
Updated 11 months ago · Custom licence GitHub repository of RSI Mean Reversion Strategy [Lab]

Snagprofit WMA MA

by dearvn
4 stars

Snagprofit WMA MA calculates and plots weighted moving averages across multiple timeframes (1-minute, 5-minute, 15-minute, and 1-hour) alongside a chart-period simple moving average. It evaluates directional alignment between these moving averages and checks f

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

P-Erik Tarama

by gocaman
3 stars

P-Erik Tarama is a multi-symbol scanner indicator that displays technical screening results directly on the price chart. It evaluates assets against a composite bullish condition combining price position relative to the Ichimoku conversion line and weekly base

Indicator v5 Screeners & dashboardsTrend
Updated 2 days ago · None stated GitHub repository of P-Erik Tarama

Jash Test

by jash-git
3 stars

This indicator plots five Fibonacci-based exponential moving averages with periods 3, 13, 34, 55, and 144 directly on the price chart. Built around modified Guppy Multiple Moving Average (GMMA) concepts and Granville's rules, it tracks moving average alignment

Indicator v5 Moving averagesTrend
Updated 4 weeks ago · None stated GitHub repository of Jash Test
3 stars

Short Term Alpha Indicator calculates a weighted alpha from price change multiplied by volume, then derives EMAs at fast, medium, and slow lengths. It computes ROC values for the EMAs and applies percentile rank functions to identify deviations. These deviatio

Indicator v5 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Short Term Alpha Indicator

Algo

by TamTH-Dev
2 stars

The Algo indicator calculates and plots two Dynamic Simple Moving Averages on the price chart. It uses a custom DSMA function that applies a filter derived from exponential smoothing coefficients, scales the result by RMS, and smooths with alpha. DSMA1 applies

Indicator v6 Moving averagesTrend
Updated 6 weeks ago · None stated GitHub repository of Algo

Super 8 - 30m BTCUSDT.P

by wynnforthework
2 stars

Super 8 is a trend-following and momentum strategy designed for 30-minute cryptocurrency charts. It evaluates entries using dual EMAs, ADX strength filtering, Parabolic SAR direction, MACD or Z-VWAP calculations, and Bollinger Band width expansion alongside vo

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Super 8 - 30m BTCUSDT.P

Pinbar Strategy

by Web3Degenerate
2 stars

Pinbar Strategy identifies pinbar candlestick patterns (hammers and shooting stars) via the imported ZenLibrary and trades reversals or continuations on confirmed bars. Entries are filtered by an optional exponential moving average and candle range thresholds

Strategy v5 Candlestick patternsTrend
Updated 2 years ago · None stated GitHub repository of Pinbar Strategy
2 stars

This indicator plots a zigzag line formed from pivot highs and lows on the price chart. It identifies higher highs, lower lows, higher lows and lower highs by comparing previous points. Support and resistance levels are drawn and updated according to trend dir

Indicator v4 TrendSupport & resistance Repaints
Updated 3 years ago · None stated GitHub repository of PharshK RSI and Zigzag with H/L
2 stars

This overlay indicator identifies pivot highs and pivot lows based on customizable left and right bar lookback settings. It calculates trend slopes and y-intercepts to project dynamic support and resistance trend lines directly onto the price chart. Users can

Indicator v4 Support & resistanceTrend Repaints
Updated 4 years ago · MIT GitHub repository of Trend Levels Indicator (my)

Monte Carlo Lab

by jayadevrana
1 stars

Monte Carlo Lab calculates and visualizes simulated performance variations for an Exponential Moving Average crossover strategy directly on the price chart. It records trade outcomes using ATR-based stop-loss and target levels in terms of R-multiples. On the f

Indicator v6 Moving averagesTrend
Updated 4 days ago · MPL-2.0 GitHub repository of Monte Carlo Lab

Drawing UDT Alias Identity

by pineforge-4pass
1 stars

This strategy stores a line inside a user-defined type and keeps an alias to the same drawing. It plots an 18-period simple moving average as a line on the price chart and reads that line's end price back through the alias. When the level is ready, it enters o

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of Drawing UDT Alias Identity

Pivot Point SuperTrend

by kanylbullen
1 stars

This Pine Script strategy plots pivot points and a SuperTrend-style trailing line based on ATR and center line derived from pivots. It calculates trend direction and generates buy and sell signals on trend reversals. Signals are filtered by a user-selected mov

Strategy v5 TrendVolatility & bands Repaints
Updated 8 days ago · None stated GitHub repository of Pivot Point SuperTrend
1 stars

A price-chart indicator that draws a CCI-driven trailing line. An ATR buffer above the high and below the low is held as a ratcheting stop, and the line switches sides when the CCI crosses zero. The line is coloured by CCI sign or, with the original colouring

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Pymander's EZ Trend Alignment

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