Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 11)

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

1 stars

ATR Volatility Trailing Stop plots an EMA trend moving average alongside dynamic ATR-based trailing stops on the price chart. The indicator determines trend direction from price relative to the EMA. Long trailing stop trails upward using ATR when uptrend, shor

Indicator v5 Volatility & bandsTrend
Updated 11 months ago · None stated GitHub repository of ATR Volatility Trailing Stop
1 stars

A price-chart trend indicator that passes the chosen source through a multi-order Kalman filter, then places ATR-multiple upper and lower bands around the filtered price and smooths them exponentially. The trend turns bullish when price crosses above the upper

Indicator v6 TrendVolatility & bands
Updated 11 months ago · MIT GitHub repository of Kalman Exponential SuperTrend

ichiV1 Freqtrade Mirror

by ChiChasesCheese
1 stars

A long-only strategy that ports a Freqtrade bot to TradingView. It builds Heikin-Ashi values, a ladder of EMAs standing in for several timeframes, a fan magnitude ratio and an Ichimoku-style cloud from Donchian midpoints. Entries need price above the cloud, a

Strategy v6 Trend Repaints
Updated 12 months ago · None stated GitHub repository of ichiV1 Freqtrade Mirror

2 Supertrend

by ktg0413
1 stars

Calculates and plots two Supertrend lines with different sensitivity settings alongside a 200-period EMA baseline on the price chart. The fast Supertrend uses a smaller ATR multiplier to capture short-term price momentum, while the slow Supertrend uses a large

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

Strategy Version 1.2

by HypertextAssassin69
1 stars

A long strategy built on a 50-period Hull moving average crossing a 200-period EMA, with ADX strength, a short Hull slope and an optional RSI filter used to scale entry size in steps. It uses an ATR stop that tightens after a drawdown, staged profit-lock parti

Strategy v6 TrendMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of Strategy Version 1.2
1 stars

ATR Retracement EMA Signals identifies momentum setups by detecting large candle expansions relative to Average True Range, followed by brief price retracements and moving average crossovers. When price experiences a strong bar move, retracing within a configu

Indicator v5 Volatility & bandsMoving averages
Updated 1 year ago · MIT GitHub repository of ATR Retracement EMA Signals
1 stars

This strategy combines Exponential Moving Averages, the Relative Strength Index, and Average True Range with optional multi-timeframe confirmation to generate trade signals. Long trades trigger on fast EMA bullish crossovers when RSI is low, while short trades

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Demo Advanced Strategy v6

IVY Indicator

by vinodliyanage
1 stars

A chart-overlay indicator that plots a 9-period EMA and converts the absolute distance between the close and the EMA into a confidence value using a sigmoid curve with fixed fitted constants. A buy triangle appears when price is above the EMA and the value mee

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

Premium 3

by Abishek-Tharu99
1 stars

A multi-tool overlay indicator on the price chart. It offers reversal buy and sell markers, oversold and overbought shading, a trend ribbon, optional reversal bands and three moving average support and resistance lines. It can also show higher-timeframe liquid

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 1 year ago · None stated GitHub repository of Premium 3

My BTC Investment Strategy

by CodingExplored
1 stars

A long-biased strategy that compares two selectable trend lines (TEMA, LSMA, EMA or SMA) and enters when the fast line crosses above the slow one while an ATR trailing level sits below price. It exits when price drops under the trailing high, when the lines cr

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of My BTC Investment Strategy

Ultimate Crypto Bot

by dextergocode
1 stars

This Pine Script strategy is designed for cryptocurrency trading on TradingView. It combines moving averages, RSI, MACD, Bollinger Bands, Stochastic oscillator and volume analysis to generate buy and sell signals. Higher time frame trend confirmation and marke

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · MPL-2.0 GitHub repository of Ultimate Crypto Bot

Trend Detector

by MarcosACH
1 stars

Trend Detector can plot up to three moving averages, each with its own type (SMA, EMA, RMA, WMA or VWMA), length, source and timeframe, defaulting to 15, 60 and 240 minutes. A table lists whether each selected average is trending up or down. An option waits fo

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

Triple SMA

by ceteongvanness
1 stars

This Pine Script v6 indicator calculates and plots three simple moving averages directly on the main price chart. It displays a 20-period short-term SMA, a 50-period medium-term SMA, and a 200-period long-term SMA using distinct line colors. The script offers

Indicator v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Triple SMA

Adaptive SuperTrend Strategy

by yagyesh-bobde
1 stars

The Adaptive SuperTrend Strategy is a custom trading strategy that calculates an adaptive SuperTrend value using volatility-adjusted factors. It determines high or low volatility by comparing ATR to its 100-period SMA and adjusts the SuperTrend factor accordin

Strategy v6 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Adaptive SuperTrend Strategy

FusionBell Pro

by saleh-ato
1 stars

This indicator combines four technical tools into a unified scoring system directly on the price chart. It evaluates an exponential moving average trend crossover, relative strength index levels, MACD line positioning against its signal line, and Bollinger Ban

Indicator v6 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of FusionBell Pro

Adaptive Strategy

by Studentcodee
1 stars

This adaptive strategy combines multiple classic technical indicators into a unified framework to generate trading signals on the price chart. It evaluates conditions across Moving Average crossovers, Donchian channel breakouts, MACD, RSI, Bollinger Bands, Par

Strategy v6 TrendOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of Adaptive Strategy

EA

by equitymarkets
1 stars

This Pine Script strategy provides a basic moving average crossover trading template. It calculates and plots a fast simple moving average and a slow simple moving average directly on the price chart. The strategy enters a long position when the fast average c

Strategy v6 Moving averagesTrend
Updated 1 year ago · MIT GitHub repository of EA

Supertrend Strategy

by meetghodasara
1 stars

A long-only strategy built on the built-in Supertrend indicator. It enters long when Supertrend flips to an uptrend and closes the position when it flips back to a downtrend, with orders processed on bar close. ATR length and factor are adjustable. Green and r

Strategy v6 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Supertrend Strategy

Micha 150

by crabiner
1 stars

Micha 150 is a trend-following overlay indicator that calculates a 150-period daily Simple Moving Average (SMA) along with its three-point backward difference derivative slope. It identifies entry and exit conditions using customizable percentage buffer zones

Indicator v5 TrendMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of Micha 150

ShinobiTrend

by Yasukeey
1 stars

A feature-rich overlay indicator that prints buy and sell signals with a sensitivity setting, a signal tuner and presets such as All Signals or Trend Scalper. It adds a trend cloud, a long-term trend tracer, pullback signals, trend heatmap candle colouring and

Indicator v5 TrendScreeners & dashboards
Updated 1 year ago · None stated GitHub repository of ShinobiTrend
1 stars

An overlay that draws a ribbon of moving averages with lengths from 20 to 50 in steps of five, plus optional 100 and 200 length lines. A switch chooses exponential or simple averages, and the price source can be changed. The area between the 100 and 200 lines

Indicator v6 Moving averagesTrend
Updated 1 year ago · MIT GitHub repository of Moving Average Ribbon

ETHBTC MTPI V2.0

by Mikelkulla
1 stars

This strategy detects whether Ethereum outperforms Bitcoin relative to the overall market using MTPI signals. It combines outputs from DEMA Adaptive Fractal Range, DEMA Supertrend, Schaff Trend Cycle, RMI Trend Sniper, and FDI-Adaptive Supertrend indicators. L

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of ETHBTC MTPI V2.0
1 stars

This strategy plots several exponential moving averages and an optional VWAP on the price chart. It defines a long setup when the short EMA crosses above the long EMA, price is above the short EMA, and, if enabled, above VWAP. A short setup uses the opposite c

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of EMA Crossover Strategy

ADX Trend Strategy

by pcjtse
1 stars

This strategy goes long when ADX is above a threshold and price crosses above a 20-period simple moving average, and goes short on the opposite cross. Each entry carries an ATR-based stop loss and take profit, set by two multipliers. Orders use all available e

Strategy v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of ADX Trend Strategy
1 stars

A strategy built on two Donchian midlines, one long and one short, plus an ATR readout. It enters long when price has crossed above the long line and the short line has crossed above the long line, in either order, and enters short on the mirror pair of crosse

Strategy v5 TrendBreakout
Updated 1 year ago · None stated GitHub repository of Ardakani Dual Condition Strategy

ADX & DI Histogram

by munlit
1 stars

A separate-pane indicator that computes the directional movement system by hand, smoothing true range and plus and minus directional movement over a set length to derive DI values and ADX, and shows them as a histogram. An ADX threshold input sets the level fo

Indicator v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of ADX & DI Histogram
1 stars

This strategy trades long or short on the chart. It takes a long entry when a fast EMA is above a slow EMA, MACD is above its signal line, ADX is above a threshold and price is above VWAP, or when price breaks above a pivot high; shorts mirror this. Each trade

Strategy v5 TrendBreakout
Updated 1 year ago · None stated GitHub repository of AI-Optimized Trading Strategy

MA50 Trend Signals

by mkdir700
1 stars

A price-chart overlay built on a 50-bar simple moving average. A green circle marks the bar where the close crosses above it and a red circle where it crosses below, and a small coloured dot at the top of the pane shows the current state, green after an upward

Indicator v6 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of MA50 Trend Signals

Million Moves Algo

by hasibulc71x
1 stars

A multi-feature chart overlay that generates buy and sell signals from a SuperTrend-style calculation with an adjustable sensitivity and a choice between all signals and smart signals. It can add a trend ribbon, trend cloud, chaos trend line, order blocks, a 2

Indicator v5 TrendScreeners & dashboards
Updated 1 year ago · None stated GitHub repository of Million Moves Algo

Kotegawa Pump Tracker

by davccavalcante
1 stars

Kotegawa Pump Tracker is an overlay indicator aimed at volatile crypto markets. It combines an adaptive SuperTrend with a clustering step that sorts recent volatility into high, medium and low levels over an analysis window, and it also uses RSI. According to

Indicator v6 Volatility & bandsTrend
Updated 1 year ago · None stated GitHub repository of Kotegawa Pump Tracker
1 stars

A Pine v6 strategy on the price chart that applies a range filter to smooth price and detect direction, optionally on Heikin Ashi candles, with sampling period and multiplier settings. It also draws pivot-based support and resistance levels. Trades can be limi

Strategy v6 TrendSupport & resistance
Updated 1 year ago · MIT GitHub repository of Range Filter Buy and Sell

Bullish Indicator Strategy v2

by MuhammadHussain07
1 stars

Bullish Indicator Strategy v2 is a multi-indicator panel drawn in a separate pane. It calculates RSI, MACD, four simple moving averages (20, 50, 100 and 200), Bollinger Bands, ADX, a stochastic oscillator, OBV, a cumulative volume delta, Chaikin Money Flow and

Indicator v6 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of Bullish Indicator Strategy v2

RootNet Trader

by amiremadi
1 stars

A price-chart indicator that shows buy and sell signals together with a numeric strength score for each signal. Options include a signal strategy mode and sensitivity with an automatic setting, filters for consolidation, high volume and smart signals, candle c

Indicator v5 TrendVolatility & bands
Updated 1 year ago · GPL-3.0 GitHub repository of RootNet Trader

GDAX EMA Cross Signals

by zawawimanja
1 stars

Plots three exponential moving averages with lengths 12, 26 and 50 as thick lines on the price chart. The README describes using the 50-period line to judge the major trend and waiting for a pullback before entering with it. The visible code has no adjustable

Indicator v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of GDAX EMA Cross Signals

MACD #2

by dollarkillerx
1 stars

The MACD #2 strategy plots two exponential moving averages with lengths 12 and 26 on the price chart. Buy signals trigger on the fast EMA crossing above the slow EMA when ATR(14) exceeds its prior value, entering a long position with one unit. The position clo

Strategy v5 Moving averagesOscillators & momentum
Updated 2 years ago · MIT GitHub repository of MACD #2

Donchian Channel

by JoeTonDev
1 stars

An overlay that plots a Donchian channel from the prior highest high and lowest low over an adjustable length, with an optional midline and fill, plus a fast and a slow EMA. It highlights a breakout bar when the close crosses the channel, sits on the matching

Indicator v5 BreakoutTrend
Updated 2 years ago · None stated GitHub repository of Donchian Channel

An overlay indicator combining several tools. It finds pivot highs and lows and groups them into support and resistance channels, limited by width, count and minimum strength, drawn with a chosen line style and colours. It also plots three smoothed moving aver

Indicator v5 Support & resistanceMoving averages

ema-strategy-algotrade

by akash-yellgetti
1 stars

A minimal strategy-type script for the price chart that draws a fast and a slow moving average, exponential or simple according to a toggle, and colours the lines and the area between them by the direction of the gap. Inputs set the source, the fast length at

Strategy v5 Moving averagesTrend
Updated 2 years ago · None stated GitHub repository of ema-strategy-algotrade

ITI

by darkshloser
1 stars

A Pine strategy script that overlays three SuperTrend lines with different periods and multipliers, plus a 100-period EMA, and computes the same SuperTrends on a higher timeframe set in minutes. A slope of the third SuperTrend is plotted over a bar-count input

Strategy v5 Trend
Updated 2 years ago · Apache-2.0 GitHub repository of ITI

EMA Crossover + RSI Strategy

by danielhyuncoder
1 stars

This strategy generates long signals on the price chart using EMA conditions and RSI levels. It enters long positions when the buy condition, based on EMA alignment checks over specified back bars, is satisfied. Exits occur at a stop loss calculated from the e

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of EMA Crossover + RSI Strategy
1 stars

This indicator calculates and plots the Directional Movement Index (DMI), including the Average Directional Index (ADX), Positive Directional Indicator (+DI), Negative Directional Indicator (-DI), and raw Directional Index (DX). It measures directional price m

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

Trend Reversal

by Trader-IKU
1 stars

Combines an ATR-based Supertrend with an On Balance Volume momentum oscillator. The Supertrend bands, with adjustable ATR period, source and multiplier, appear on the price chart with up and down trend highlighting. The OBV momentum compares a short and a long

Indicator v5 TrendVolume
Updated 2 years ago · MIT GitHub repository of Trend Reversal

Grail Only Longs

by Wendigooor
1 stars

A long-only strategy based on a trailing stop approach, using a slow SMA, medium and fast EMAs, a pin bar test, and optional stochastic and money flow index filters that can read other timeframes. Exits use a trailing stop plus a hard stop expressed in pips. I

Strategy v5 TrendCandlestick patterns Repaints
Updated 2 years ago · None stated GitHub repository of Grail Only Longs

Multi Indicator

by ali-rezahashemi
1 stars

This indicator combines four tools on the price chart: three simple moving averages (12, 24 and 50 by default), a SuperTrend with an inner zone band and a slower long-term SuperTrend, NSDT HAMA-style candles with gradient colours, and a UT Bot style trailing s

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Multi Indicator

3Commas Bot

by amico1234
1 stars

This strategy plots two moving averages on the price chart and uses their relationship to bias long or short trades. Entries can be limited to one direction or allowed to reverse. Stops sit beyond a swing high or low by an ATR multiple, and a reward-to-risk li

Strategy v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of 3Commas Bot

Surfr

by RobACurtis
1 stars

A strategy that trades when price closes across a 50-period moving average after the previous close was on the other side. It also needs a Stochastic RSI condition on the chart timeframe, a limit on the stop distance in points, and agreement from a higher time

Strategy v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Surfr

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