Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 50)

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

Parabolic SAR Trend

by Basant1Saini
1 stars

This trend-following strategy generates buy and sell signals when the Parabolic SAR flips direction relative to price. Entries can be filtered using an Exponential Moving Average to trade in the direction of the dominant trend, as well as an Average Directiona

Strategy v5 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of Parabolic SAR Trend

UT Bot Alerts

by turnupdigital
1 stars

An indicator on the price chart that builds an ATR trailing stop with a key value multiplier and a 10 period ATR. When price crosses the trailing stop, it prints a Buy or Sell label and colours bars green or red by side. An option calculates the signals from H

Indicator v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of UT Bot Alerts
1 stars

The KSMBTC EMA Cross Strategy plots an exponential moving average of the closing price on the price chart. It signals long positions when the open price crosses above the EMA with a green candle and short positions with a red candle. The strategy enters long w

Strategy v4 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of KSMBTC EMA Cross Strategy

Butterworth Filter

by everget
947 stars

The Butterworth Filter indicator applies digital signal processing techniques to smooth price data directly on the main price chart. It calculates either a two-pole or three-pole filter based on a customizable length parameter and price source. When optional c

Indicator v4 TrendMoving averages
Updated 12 days ago · GPL-3.0 GitHub repository of Butterworth Filter
330 stars

The EMA Moving Away Strategy calculates an Exponential Moving Average (EMA) to identify mean-reversion trade opportunities when price stretches significantly away from the line. A long entry triggers when the close drops below the EMA by a specified percentage

Strategy v5 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of EMA Moving away Strategy [Alorse]

This indicator applies a k-nearest neighbours (kNN) classification algorithm using Aroon indicator lags and momentum as feature inputs to forecast market direction. It compares current values against historical feature sets to classify bars into buy, hold, or

Indicator v4 AI / machine learningTrend Repaints
Updated 1 year ago · None stated GitHub repository of Machine Learning: kNN-based Strategy (aroon)
99 stars

This indicator calculates a second-order Bessel lowpass filter on a chosen price source and plots the result on the price chart. It uses a recursive infinite-impulse-response formula with constant work per bar. Length sets the cutoff period linked to the minus

Indicator v6 Trend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Bessel 2nd Order Filter
55 stars

The VibeTrader Signal System is an overlay indicator that identifies trend direction and potential reversal conditions. It calculates a Supertrend line alongside Bollinger Bands and a 14-period RSI indicator. The script highlights bullish and bearish trends by

Indicator v6 TrendVolatility & bands
Updated 6 months ago · Apache-2.0 GitHub repository of VibeTrader Signal System

This strategy implements a multi-stage trend following system inspired by John W. Seykota. It generates long and short entries when price breaks above or below Donchian channels of specified length. Each entry adds a unit sized to risk a fixed percentage of cu

Strategy v6 TrendVolatility & bands
Updated 12 months ago · None stated GitHub repository of Seykota Alt 29: Multi-Stage Scaling

EMA Breakout

by jerryinyang
5 stars

This indicator calculates and plots the exponential moving average on the chart, along with Keltner Channel bands. It applies optional filters based on Keltner Channel and Money Flow to identify breakout signals. Breakouts occur when price crosses the EMA with

Indicator v4 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of EMA Breakout

Ichimoku Cloud STEPFUN

by eltonaguiar
4 stars

This Ichimoku Cloud strategy plots the cloud and price action on the chart for trend analysis. It generates long signals when price is above the cloud with a Tenkan-Kijun bullish crossover and bullish cloud, optionally confirmed by Chikou span. Short signals f

Strategy v5 TrendMoving averages
Updated 2 days ago · None stated GitHub repository of Ichimoku Cloud STEPFUN
4 stars

This trend-following strategy generates long and short entries when a fast EMA crosses a slow EMA, overlaying directly on the price chart. To reduce false signals, it applies four configurable fakeout filters: volume moving average threshold, consecutive bar c

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of Fakeout-Confirmed Strategy

REG-TREND

by gocaman
3 stars

The REG-TREND indicator plots linear regression trend lines calculated from the selected source over a user-defined length. It determines channel boundaries and deviation to detect trend breaks, marking them with dotted lines in the chosen color. Fibonacci ret

Indicator v5 TrendSupport & resistance
Updated 2 days ago · None stated GitHub repository of REG-TREND

jash_GGMA_Granville

by jash-git
3 stars

This overlay indicator plots five exponential moving averages with Fibonacci lengths of 3, 13, 34, 55 and 144 on the price chart. Fast lines are red and orange, slower lines blue and purple, and the 144-period line is a black filter. It marks reset events when

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

ALGOX

by IAMATOMIC001
3 stars

ALGOX is a multi-indicator trend-following strategy plotted directly on the main chart. It generates trade entries based on configurable setups, moving average trends, and higher-timeframe inputs. Users can apply sideways market filters using customizable RSI

Strategy v5 TrendMoving averages Repaints
Updated 12 months ago · None stated GitHub repository of ALGOX

Log-Normal Price Forecast

by regalouisei
2 stars

Log-Normal Price Forecast calculates historical log returns and volatility to project theoretical future price movements on the main chart overlay. Using a normal distribution inverse function, it computes statistical drift and standard deviation to plot dynam

Indicator v6 Volatility & bandsSupport & resistance Repaints
Updated 8 months ago · None stated GitHub repository of Log-Normal Price Forecast
2 stars

This strategy detects adaptive market regimes by combining ATR volatility with fast and slow EMA moving averages to determine trend direction. It applies multi-timeframe confirmation using RSI and MACD on a higher timeframe. Signals appear as buy and sell arro

Strategy v6 Volatility & bandsMoving averages Repaints

超级趋势RSI

by wynnforthework
2 stars

This strategy applies a Supertrend calculation directly to Relative Strength Index values rather than raw price, plotting the result in a separate pane. Traders can enable optional RSI smoothing via a Hull Moving Average and overlay a secondary moving average

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of 超级趋势RSI

ZigZag reSampled

by WISEPLAT
2 stars

ZigZag reSampled draws one purple swing line on the price chart. It tracks the highest high and lowest low over a depth window, then flips between an upward and a downward leg when a bar a set number of backsteps ago makes a new extreme. Depth controls that lo

Indicator v4 Support & resistanceTrend Repaints
Updated 3 years ago · None stated GitHub repository of ZigZag reSampled

Trendsignal Strategy

by DaniilOkrug
2 stars

The Trendsignal Strategy identifies trend flips using dynamic channel boundaries derived from high and low price ranges over a set lookback period. It calculates upper and lower thresholds based on a customizable risk setting. When price closes above the upper

Strategy v4 TrendBreakout
Updated 4 years ago · MIT GitHub repository of Trendsignal Strategy
1 stars

This multi-model strategy combines kinematic price modeling, Bayesian inference forecasts, volume profile consolidation zones, and automated pattern recognition directly on the price chart. It evaluates market trajectory using weighted kinematic regression, un

Strategy v5 AI / machine learningSupport & resistance
Updated 2 days ago · None stated GitHub repository of JAT+BSM Pro v13 Extended

Risk Managed Strategy

by jayadevrana
1 stars

This strategy executes long trades when the closing price crosses above an Exponential Moving Average (EMA) and displays the EMA trend line directly on the price chart. Position sizing is calculated dynamically to risk a fixed percentage of current equity base

Strategy v6 TrendMoving averages
Updated 4 days ago · MPL-2.0 GitHub repository of Risk Managed Strategy

Elder Ray Index

by pineforge-4pass
1 stars

Calculates Elder Ray Bull Power and Bear Power by measuring differences between price extremes and an exponential moving average. It takes long entries during an uptrend when Bear Power is negative but rising, and short entries during a downtrend when Bull Pow

Strategy v6 Oscillators & momentumTrend
Updated 7 days ago · Apache-2.0 GitHub repository of Elder Ray Index

DEPV2 Debug All

by YuceSezar89
1 stars

DEPV2 Debug All is a multi-asset quantitative analysis indicator designed for separate pane execution. It evaluates signal conditions across up to twenty cryptocurrency pairs simultaneously using four analytical dimensions: Trend, Momentum, Volatility, and Vol

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 Debug All

Smart Trend Dashboard Pro

by vedkanani123
1 stars

A price-chart indicator that plots a 9 and a 21 period EMA and prints a buy label on a bullish crossover when RSI is below the overbought level, and a sell label on a bearish crossover when RSI is above the oversold level. It tints the background and candles b

Indicator v6 Moving averagesTrend
Updated 2 months ago · None stated GitHub repository of Smart Trend Dashboard Pro
1 stars

This strategy serves as a test corpus script demonstrating the use of Pine Script map data structures for state management alongside exponential moving averages. It tracks closing prices and EMA gaps in a key-value map during initial bars, then triggers long e

Strategy v5 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Corpus Map Basic State

Stochastic RSI Crossover

by Basant1Saini
1 stars

This strategy calculates Stochastic RSI crossovers occurring in extreme overbought or oversold zones, filtered by an optional Exponential Moving Average trend filter. Long positions enter when the %K line crosses above %D from below the oversold threshold whil

Strategy v5 Oscillators & momentumTrend
Updated 8 months ago · None stated GitHub repository of Stochastic RSI Crossover
1 stars

Technical Ratings Pro - Pump Wave calculates an aggregated technical rating derived from a suite of moving averages and oscillators. It evaluates indicators including multiple SMAs, EMAs, Hull MA, VWMA, Ichimoku Cloud, RSI, Stochastic, MACD, CCI, and the Ultim

Indicator v4 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Technical Ratings Pro - Pump Wave

This indicator plots a Supertrend-based trend-following setup in a separate pane and skips conditions it treats as a sideways market. A volatility range is built from an ATR value, with RMA, SMA, EMA, or WMA smoothing, or from a fixed point distance. Optional

Indicator v5 TrendVolatility & bands
Updated 1 year ago · MPL-2.0 GitHub repository of Trend Following Setup - Sideways Market Skipper
330 stars

HA UnivLong&Short Futures calculates Heikin Ashi candles and builds a channel using simple moving averages of Heikin Ashi highs and lows. It enters long positions when the upper channel line crosses above the lower channel line and opens short positions on the

Strategy v5 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of HA UnivLong&Short Futures
257 stars

This strategy overlay calculates custom pivot high and low levels, averaged price sources, and Ichimoku Cloud components (Tenkan-sen, Kijun-sen, Senkou Span A/B). It also requests lower low price data from a 360-minute timeframe with lookahead enabled, introdu

Strategy v5 TrendSupport & resistance Repaints
Updated 7 weeks ago · None stated GitHub repository of Futures - No Repaint ES 1.0
228 stars

Linear Regression Reversal Strategy is a Pine Script chart overlay indicator that plots a linear regression trendline with upper and lower standard deviation channel bounds for a specified date range. Users can select exact start and end timestamps directly on

Indicator v6 TrendSupport & resistance
Updated 3 months ago · None stated GitHub repository of Linear Regression Reversal Strategy

This indicator uses a k-Nearest Neighbors (kNN) machine learning algorithm to classify current market conditions based on historical indicator pairs. It evaluates combinations of fast and slow periods of RSI, Rate of Change (ROC), and Commodity Channel Index (

Indicator v4 AI / machine learningTrend Repaints
Updated 1 year ago · None stated GitHub repository of Machine Learning: kNN-Based Strategy (MTF)

This indicator calculates John Ehlers' two-pole Super Smoother Filter, an infinite impulse response lowpass filter designed to eliminate high-frequency market noise while reducing lag compared to standard moving averages. It plots a smoothed line directly on t

Indicator v6 Moving averagesTrend
Updated 8 months ago · MIT GitHub repository of Ehlers 2-Pole Super Smoother Filter (SSF2)
16 stars

This trend-following strategy generates trades using Donchian channel breakouts combined with higher-timeframe trend filters and chart-timeframe momentum. It confirms breakout entries against a higher-timeframe moving average and rate of change, while optional

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 2: Dual-Timeframe

SMC Trade with Dhruv

by MeridianAlgo
9 stars

This indicator maps Smart Money Concepts directly onto the price chart. It identifies internal and swing market structure, highlighting break of structure and change of character events alongside strong and weak swing highs and lows. It also plots internal and

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 4 months ago · MIT GitHub repository of SMC Trade with Dhruv
6 stars

This hybrid trading strategy combines wick rejection support and resistance levels with Smart Money Concepts. It calculates entry confidence scores based on multi-timeframe structure, Fair Value Gap taps, Order Block alignment, and recent Change of Character o

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 7 months ago · None stated GitHub repository of WR-SR + SMC Strategy ENHANCED
5 stars

This indicator calculates central tendencies and intermediate channel bounds over a configurable lookback period and plots them directly on the price chart. Users can select the central basis measure from mid-range, simple moving average mean, or 50th percenti

Indicator v4 TrendSupport & resistance
Updated 8 months ago · None stated GitHub repository of Rolling Midpoints

EMA Breakout

by jerryinyang
5 stars

EMA Breakout is an indicator combining Exponential Moving Averages with higher-timeframe Keltner Channels to identify breakout market conditions. It calculates multi-timeframe EMAs and dynamic Keltner Channel boundaries using ATR, True Range, or bar width. The

Indicator v4 TrendMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of EMA Breakout
4 stars

This strategy trades GBP/USD on the price chart. It enters long when a fast EMA crosses above a slow EMA while price stays above a trend EMA, and enters short on the opposite cross below that EMA. Signals are allowed only in the London session, 07:00 to 17:00

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of GBP/USD Forex Strategy [trugurpala]

TrendStop+boll

by gocaman
3 stars

The TrendStop+boll indicator combines a trend trailing level system with configurable Bollinger Bands directly on the price chart. It evaluates Directional Movement (+DI/-DI) and MACD, locking in an EMA or VWAP benchmark level whenever momentum and directional

Indicator v5 TrendVolatility & bands
Updated 2 days ago · None stated GitHub repository of TrendStop+boll

Jash_test

by jash-git
3 stars

This indicator plots five exponential moving averages with Fibonacci lengths on the price chart. Lengths 3 and 13 form a fast group, 34 and 55 a slow group, and 144 a trend filter. It counts how many of those averages the current and previous candle bodies cro

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

Criptom4N(r)

by IAMATOMIC001
3 stars

This indicator plots SuperTrend lines and SMA values on the price chart. It generates buy and sell signals from crossovers between close price and SuperTrend. Additional features include ATR-based stop loss and take profit levels, candlestick coloring, and swi

Indicator v5 TrendMoving averages Repaints
Updated 12 months ago · None stated GitHub repository of Criptom4N(r)

Dskyz Adaptive Futures Elite (DAFE)

by mushroom-men-Trading
2 stars

Dskyz Adaptive Futures Elite (DAFE) is an automated strategy designed for intraday trading. It generates long and short entries by pairing fast and slow moving average crossovers with candlestick pattern detection, filtered by RSI, volume, volatility, and a hi

Strategy v6 Moving averagesCandlestick patterns
Updated 9 months ago · None stated GitHub repository of Dskyz Adaptive Futures Elite (DAFE)

饥饿者~01

by wynnforthework
2 stars

This strategy overlays execution signals directly on the main price chart. It calculates entry points using a Kalman gain filter and dynamic approach percentages. Positions execute in both long and short directions, scaling out across three predefined take-pro

Strategy v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of 饥饿者~01

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