Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 41)

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

7 stars

This strategy generates trading signals based on a triple confluence of Exponential Moving Averages (EMA), the Relative Strength Index (RSI), and MACD histogram momentum. Long entries require a fast EMA above a slow EMA, price above the fast EMA, RSI between 5

Strategy v5 TrendOscillators & momentum
Updated 3 months ago · MIT GitHub repository of Triple Confluence (EMA+RSI+MACD)

RSI Strategy

by suyons
7 stars

Calculates relative strength index values across up to four configurable timeframes to compare short-term and long-term momentum. Generates long and short entry signals when lower-timeframe RSI crosses key thresholds, conditioned on higher-timeframe RSI levels

Strategy v5 Oscillators & momentumTrend Repaints
Updated 4 months ago · None stated GitHub repository of RSI Strategy

This strategy calculates the full Ichimoku Kinko Hyo indicator system, plotting the Tenkan-sen, Kijun-sen, Senkou Spans, Chikou Span, and Kumo Cloud directly on the price chart. It enters long positions when the Tenkan-sen is above the Kijun-sen while price tr

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

Institutional CRT State Engine is an overlay indicator that combines Direction of Liquidity (DOL) bias detection with Candle Range Theory (CRT) pattern recognition. It monitors key institutional session windows—including CBDR, Asia, London, London Lunch, and N

Indicator v6 SMC / ICT / price actionSessions & time
5 stars

Calculates an adaptive tracking model using a Mechanical Feedback Price Model to measure price innovations. It evaluates positive and negative deviations through peak decay and saturation functions to determine dynamic intensity levels. It applies these intens

Indicator v6 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of Universal Adaptive Tracking

SuperTrend

by SiegerTerpstra
5 stars

This indicator calculates and plots dynamic SuperTrend volatility bands around median price to identify market trend direction. It signals bullish conditions when price stays above the green support line and bearish conditions when price falls below the red re

Indicator v6 TrendVolatility & bands
Updated 9 months ago · None stated GitHub repository of SuperTrend
5 stars

This indicator plots 50-period and 200-period exponential moving averages on the price chart while calculating money flow index and WaveTrend oscillators in the background. Long signals trigger when price trends above the 200 EMA with a recent 50 EMA pullback,

Indicator v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of 50 EMA + 200 EMA + VMC Cipher B

Elton's Screener

by eltonaguiar
4 stars

Elton's Screener is an indicator that runs in a separate pane and scores one of twenty selectable strategies, or auto-selects a route from the symbol type. It filters signals by a minimum confidence level and a higher-timeframe EMA trend alignment. ATR multipl

Indicator v6 Screeners & dashboardsOscillators & momentum Repaints
Updated 2 days ago · None stated GitHub repository of Elton's Screener
4 stars

This strategy trades exponential moving average crossovers tailored for the German DAX market during Xetra session hours. It enters long positions on bullish EMA crossovers and short positions on bearish crossovers, provided the bar falls within 09:00 to 17:30

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of DAX Germany Strategy [trugurpala]
4 stars

This indicator detects the bullish Upside Tasuki Gap candlestick pattern on the price chart. It looks for a long green candle, a smaller gapped green candle, and a red candle that closes inside the gap without filling it, while an optional trend filter require

Indicator v5 Candlestick patternsTrend
Updated 1 year ago · None stated GitHub repository of Upside Tasuki Gap - Bullish

NYSA-Trend Kanali

by Kalumur
4 stars

NYSA-Trend Kanali combines Parabolic SAR, higher-timeframe exponential moving averages, and weekly MACD signals on the price chart. It calculates Parabolic SAR to highlight trend shifts with visual buy and sell labels, plots weekly 8-period and 13-period EMAs,

Indicator v5 TrendMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of NYSA-Trend Kanali

jash GGMA Granville

by jash-git
3 stars

This indicator implements a modified Guppy Multiple Moving Average system based on Fibonacci periods (3, 13, 34, 55, and 144 EMAs) combined with Granville rules. It detects reset crossover signals when the 3 EMA crosses the 55 EMA with price confirmation, as w

Indicator v5 Moving averagesTrend
Updated 4 weeks ago · None stated GitHub repository of jash GGMA Granville

Price Action Toolkit

by TamTH-Dev
2 stars

The Price Action Toolkit is an indicator that combines several price action tools on the chart. It calculates the ATR with user-defined length and shows it in a table. It plots multiple Kaufman Adaptive Moving Averages (KAMA) with different lengths and sources

Indicator v6 TrendSupport & resistance
Updated 6 weeks ago · None stated GitHub repository of Price Action Toolkit

Zeguela Supertrend

by danielvm-git
2 stars

This strategy plots a Supertrend indicator directly on the price chart to generate trend-following trade signals. It calculates dynamic upper and lower bands using a chosen ATR period, multiplier, and calculation method. Entries trigger when the trend switches

Strategy v4 TrendVolatility & bands
Updated 2 months ago · MIT GitHub repository of Zeguela Supertrend

The Grid Bot Direction Plugin Supertrend Pivot indicator calculates dynamic market trend direction for automated grid trading. It computes a smoothed center level derived from pivot highs and lows, combining it with ATR-based bands to generate a trailing stop

Indicator v5 TrendSupport & resistance Repaints
Updated 8 months ago · MIT GitHub repository of Grid Bot Direction Plugin Supertrend Pivot psyll
2 stars

This strategy plots a custom SuperTrend Polyfactor Oscillator in a separate pane using ATR, adjustable factors, and normalization options on the chosen indicator source. It generates long, short, or both direction signals based on the oscillator values with mu

Strategy v5 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of Multi-Step FlexiSuperTrend - Strategy

MACD Cross Strategy

by Web3Degenerate
2 stars

This strategy generates buy and sell signals on the price chart using MACD crossovers. It applies an EMA 200 filter requiring price to trade above or below the EMA. Only the first MACD crossover is used after the filter condition is met. Stop loss is calculate

Strategy v5 Oscillators & momentumMoving averages
Updated 2 years ago · None stated GitHub repository of MACD Cross Strategy
2 stars

This strategy identifies reversal points using large and additional fractals on the price chart. It detects breaks of fractal levels and plots post-break ranges along with retest lines and signals. Entries occur on retest signals, with pyramiding allowing mult

Strategy v4 Support & resistanceBreakout
Updated 4 years ago · MIT GitHub repository of Order Fractals strategy V3

Kalman vs EMA

by jayadevrana
1 stars

This indicator overlays two smoothed price lines on the chart for comparison. A one-dimensional Kalman filter estimates the current price state and velocity, adjusting based on process noise Q, measurement noise R, and velocity noise qvIn. An EMA of user-defin

Indicator v6 Moving averagesTrend
Updated 4 days ago · MPL-2.0 GitHub repository of Kalman vs EMA

DMI ADX Trend Following

by pineforge-4pass
1 stars

A strategy based on the Directional Movement Index. It enters long when the positive directional line crosses above the negative one and enters short on the opposite cross, reversing the position. An ADX threshold input is defined but not used in the entry con

Strategy v6 Trend
Updated 7 days ago · Apache-2.0 GitHub repository of DMI ADX Trend Following
1 stars

A long-only strategy built on a fast and a slow EMA crossover, defaulting to 12 and 26. It buys a fixed cash amount when the fast EMA crosses above the slow EMA and closes when it crosses below, holding at most one position. A start date input limits when trad

Strategy v5 Moving averagesTrend
Updated 8 days ago · None stated GitHub repository of CDC Backtest MACD Fix Amount

SR+Trend v9

by MuhammadMuhamid
1 stars

An earlier version of a long-only crypto spot strategy that combines multi-timeframe pivot support and resistance with optional trend filters. Entries wait for price to touch a support zone sized by ATR or ticks and then confirm within a few bars. Version 9 ad

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

This TradingView strategy detects directional trades on the price chart using multiple entry triggers including TMA-Crossing, Breakout, and VWAP-Crossing with price types like Close or Open. It applies optional logical combinations of triggers and enforces tim

Strategy v6 TrendBreakout
Updated 4 months ago · None stated GitHub repository of STT Trade Plan Directional

KLSE VCP Stage v2

by kevinesk
1 stars

This indicator classifies market structure into volatility contraction pattern (VCP) stages on the main price chart. It evaluates a Mark Minervini Trend Template score alongside Bollinger Band width percentiles and volume metrics to determine stages such as Co

Indicator v5 TrendVolatility & bands
Updated 4 months ago · None stated GitHub repository of KLSE VCP Stage v2

Momentum Swing

by rubbermetal
1 stars

Momentum Swing is an indicator, not a strategy, that marks Long and Short signals when a MACD cross coincides with an oversold or overbought RSI reading and ADX above 25. It plots fast and slow EMAs, colors bars when volume exceeds a multiple of its 50-bar ave

Indicator v6 Oscillators & momentumTrend
Updated 4 months ago · MPL-2.0 GitHub repository of Momentum Swing
1 stars

This strategy calculates a rolling price-change momentum score using a custom iterative loop function combined with exponential moving averages. It measures net price movement across six bars alongside a 9-period and 21-period EMA crossover. Long positions are

Strategy v5 Oscillators & momentumMoving averages
Updated 4 months ago · MIT GitHub repository of Block Function Loop Score

MTF Trend Alignment Strategy

by shubhamtaywade82
1 stars

A strategy that goes long when price is above a moving average on all four timeframes and short when it is below on all four. The defaults are 15 minutes, 1 hour, 4 hours and 1 day, using an SMA, EMA or WMA. An option closes the position as soon as the alignme

Strategy v6 TrendMoving averages Archived
Updated 5 months ago · None stated GitHub repository of MTF Trend Alignment Strategy

Talons Tiered Exit (Memecoin)

by muammeryldrm42
1 stars

This strategy identifies long entry opportunities using a fast and slow EMA crossover, primarily designed for high-volatility tokens. It manages trades using a tiered scaling-out system that closes specified percentages of the position at three configurable pr

Strategy v5 TrendMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of Talons Tiered Exit (Memecoin)

Crypto AMT v6.1 Risk

by latifangren
1 stars

The Crypto AMT Toolkit v6.1 - Conservative Risk is a Pine Script indicator that overlays Volume Profile with customizable value area boxes and right-side visuals on the price chart, along with VWAP bands, EMA trend filters, higher-timeframe bias, lower-timefra

Indicator v6 VolumeSupport & resistance
Updated 5 months ago · MIT GitHub repository of Crypto AMT v6.1 Risk

Trend Surfer

by gabriel-klettur
1 stars

Trend Surfer is a multi-timeframe trend-following indicator overlay. It calculates short and long Exponential Moving Averages from a configurable higher timeframe to determine the main market trend direction. The indicator highlights current-interval RSI overb

Indicator v6 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of Trend Surfer
1 stars

Strong Trending - Momentum Rider is a trend-following strategy designed for intraday and swing trading. It evaluates market strength using a composite momentum score based on exponential moving averages, the Directional Movement Index (DMI/ADX), candle body ra

Strategy v5 TrendOscillators & momentum
Updated 8 months ago · None stated GitHub repository of Strong Trending - Momentum Rider

LeBeau

by turnupdigital
1 stars

LeBeau is a trend-following overlay indicator based on Charles Le Beau's Chandelier Exit strategy. It calculates trailing stop-loss levels using the Average True Range (ATR) applied to standard price data or smoothed Heikin Ashi bars. When the price crosses ab

Indicator v6 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of LeBeau

TeeLek KAMA

by theteelek
1 stars

An overlay indicator that computes Kaufman's Adaptive Moving Average using a ten-bar efficiency ratio, then requests it from daily, 12-hour, 6-hour, 4-hour, 2-hour and 1-hour data and smooths each with a short EMA. The lines are coloured by direction in green

Indicator v6 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of TeeLek KAMA

DMI Direction

by JohnsonHsiao
1 stars

This indicator measures directional movement bias by calculating the difference between the positive and negative directional indicators (+DI and -DI). It plots the resulting spread as a histogram in an off-chart pane around a white zero baseline. Positive val

Indicator v5 TrendOscillators & momentum
Updated 3 years ago · None stated GitHub repository of DMI Direction
1 stars

A price chart overlay by Loxx that applies an N-pole Gaussian filter to a chosen price source, with an optional standard deviation filter that ignores small moves. Sources include regular prices and several Heiken Ashi variants, and Heiken Ashi smoothing can u

Indicator v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of STD-Filtered N-Pole Gaussian Filter
1 stars

A Pine v4 strategy that plots a 9-period simple 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 appear

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of ETHBTC SMA Cross Strategy

SuperTrend

by everget
947 stars

SuperTrend is a trend-following indicator that detects trend direction by computing ATR-based stop levels. It plots long and short stop lines on the price chart and fills the region between the mid-price and the active stop line to show the current trend state

Indicator v6 TrendVolatility & bands
Updated 12 days ago · GPL-3.0 GitHub repository of SuperTrend

RSI + EMA [Alorse]

by Alorse
330 stars

The RSI + EMA strategy combines Relative Strength Index momentum with dual moving average trend filtering to identify trade entries and exits. It plots two configurable moving averages (SMA or EMA) on the main price chart. A long trade opens when the fast movi

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

Donald SPX - Options Trading is an overlay indicator designed for intraday SPX analysis. It plots a 200-period Weighted Moving Average (WMA) on the price chart while evaluating multi-timeframe market structure across Daily, 15-minute, 5-minute, and 2-minute ba

Indicator v5 Moving averagesTrend Repaints
Updated 7 weeks ago · None stated GitHub repository of Donald SPX - Options Trading

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