Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 16)

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

Mini-Project

by Core-Four
2 stars

Mini-Project is a multi-indicator trading strategy that overlays technical indicators directly on the price chart. It provides modular components including Linear Regression, the Relative Strength Index (RSI), MACD, Parabolic SAR, and Supertrend. Users can tog

Strategy v5 TrendOscillators & momentum
Updated 3 years ago · None stated GitHub repository of Mini-Project

Sassiz Chandelier Exit

by sassiz-root
2 stars

This Pine Script v5 strategy calculates ATR-based trailing stops for crypto trading on the price chart. It defines a long stop as the highest close minus ATR times multiplier and a short stop as the lowest close plus ATR times multiplier. The script dynamicall

Strategy v5 TrendVolatility & bands
Updated 3 years ago · MIT GitHub repository of Sassiz Chandelier Exit

Donchian Trend Ribbon

by ctkqiang
2 stars

This indicator plots a stacked trend ribbon in a separate pane from Donchian channel breakouts. For a chosen period it marks an uptrend when the close exceeds the previous highest high and a downtrend when the close falls below the previous lowest low, otherwi

Indicator v4 TrendBreakout
Updated 3 years ago · Apache-2.0 GitHub repository of Donchian Trend Ribbon

Supertrend UP/DOWN

by minaecer
2 stars

This strategy plots a Supertrend line on the price chart and colors it green in an up direction and red in a down direction. It also marks direction changes with arrows below the bar. Entries come from a separate moving-average rule: a long when the 14-period

Strategy v5 TrendMoving averages
Updated 4 years ago · MPL-2.0 GitHub repository of Supertrend UP/DOWN

Calculates and plots daily moving averages, including 200, 100, and 50-period SMAs as well as a 20-period EMA, onto intraday price charts. It also includes an optional Williams Alligator Jaw line calculated using a smoothed moving average. Settings allow adjus

Indicator v5 Moving averagesTrend Repaints
Updated 4 years ago · MIT GitHub repository of Daily Moving Averages on Intraday Chart

Breaking fractals

by DaniilOkrug
2 stars

This strategy identifies trend changes using fractals from a higher timeframe and the current chart timeframe. It opens buy or sell orders on breaks of lower-timeframe fractals aligned with the higher-timeframe trend. Normal trading mode exits on trend reversa

Strategy v5 TrendBreakout
Updated 4 years ago · MIT GitHub repository of Breaking fractals

Overbought

by kat3samsin
2 stars

This strategy identifies overbought conditions in uptrends for long entries. It calculates RSI with 14 periods, 50 and 200 period SMAs, ALMA smoothed close, and Stochastics with customizable K D and smooth periods. Entries occur when RSI exceeds 70 price excee

Strategy v4 TrendOscillators & momentum
Updated 5 years ago · MIT GitHub repository of Overbought
1 stars

A separate-pane indicator that runs a percentage-deviation ZigZag state machine on up to eight timeframes, from one minute to daily, and shows whether each is currently in an up leg after a swing low or a down leg after a swing high. Settings choose the deviat

Indicator v6 Trend Repaints
Updated 2 days ago · None stated GitHub repository of BD ZigZag MTF Consensus

6 EMAs Integrated

by sean-ccho
1 stars

Plots six exponential moving averages on the price chart, with default lengths of 5, 10, 20, 50, 100 and 200 applied to the close. The three short-term lines and three long-term lines are grouped in the settings, and each line has its own on/off switch and len

Indicator v5 Moving averagesTrend
Updated 2 days ago · None stated GitHub repository of 6 EMAs Integrated

Strategy Template

by Jahanzaib211
1 stars

A strategy template that enters long when a fast EMA crosses above a slow EMA while price is above a higher-timeframe EMA, and short on the opposite setup, optionally limited to a session window. Entries happen only on a confirmed bar with no open position. Ea

Strategy v6 Moving averagesTrend
Updated 2 days ago · MIT GitHub repository of Strategy Template

Confluence Trend + Momentum

by nvolpe2007-cell
1 stars

A long-or-cash strategy that holds a position only when two conditions agree: the close is above a 100-bar simple moving average and above the close from 20 bars earlier. Otherwise it stays in cash. By default it requests daily bars whatever the chart timefram

Strategy v6 TrendMoving averages
Updated 2 days ago · None stated GitHub repository of Confluence Trend + Momentum

ML Strategy Webhook

by GeekRabbit007
1 stars

A simple strategy built to feed a server with alert data. It plots a fast and a slow EMA, 12 and 26 by default, goes long when the fast crosses above the slow, and on the opposite cross closes the long and opens a short. There is no stop loss or take profit, s

Strategy v6 TrendMoving averages
Updated 3 days ago · None stated GitHub repository of ML Strategy Webhook

RCCE Scanner v6

by cianfru
1 stars

A strategy that combines four engines into one signal: a Z-score regime classifier, a weekly midline heat score, an exhaustion detector for absorption and climax bars, and a synthesizer that weighs them using confidence thresholds. Entries and exits appear as

Strategy v6 TrendVolatility & bands Repaints
Updated 3 days ago · None stated GitHub repository of RCCE Scanner v6

Bounce 2.0

by mphinance
1 stars

Overlays five EMAs at 8, 21, 34, 55 and 89 on the price chart and marks a Bounce 2.0 pullback setup. The setup needs the shorter EMAs in bullish order, ADX at or above 25, a stochastic reading at or below 40 and price within a band around the 21 EMA. A label a

Indicator v6 TrendMoving averages
Updated 3 days ago · Custom licence GitHub repository of Bounce 2.0

IQ Trend Beams

by ankurksoni
1 stars

A price-chart overlay that fits trend support and resistance channel lines using a Kalman-filter based engine fed by intrabar volume and price data. Lines are shown forming, then lock in place and are later restyled as broken history. A tempo mode of fast, med

Indicator v6 Support & resistanceTrend
Updated 3 days ago · None stated GitHub repository of IQ Trend Beams

Advanced Trade Metrics

by pineforge-4pass
1 stars

Advanced Trade Metrics is an overlay breakout strategy that uses a 20-bar Donchian channel to generate trade signals. It opens long positions when the closing price breaches the prior 20-bar high and short positions when it drops below the 20-bar low. Position

Strategy v6 BreakoutTrend
Updated 7 days ago · Apache-2.0 GitHub repository of Advanced Trade Metrics

EMA-Volume

by engtuncay
1 stars

EMA-Volume calculates two Exponential Moving Averages alongside volume moving averages derived from scaled USD volume. It draws directly on the price chart, plotting both moving averages with bullish and bearish crossover markers and colored background highlig

Indicator v6 Moving averagesTrend
Updated 7 days ago · None stated GitHub repository of EMA-Volume

Phantom Flow Core

by darup67
1 stars

A price-chart indicator that combines an ATR trend line, similar to a SuperTrend with a configurable multiplier and source, with market structure tools. The trend line switches colour and prints buy and sell labels when the trend flips, with an optional backgr

Indicator v6 TrendSMC / ICT / price action Repaints
Updated 8 days ago · Custom licence GitHub repository of Phantom Flow Core

DEPV2

by YuceSezar89
1 stars

DEPV2 is a multi-symbol Pine Script v6 indicator for cryptocurrency trading. It analyzes 20 Binance symbols including BTC, ETH, SOL, and others using four signal classes: TREND, MOMENTUM, VOLATILITY, and VOLUME. The indicator supports multiple modes including

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

MA + R:R Strategy

by MuhammadMuhamid
1 stars

A strategy that combines optional multi-timeframe moving average trend filters, SuperTrend, linear regression, VWMA, volume and higher-high structure checks to trigger entries on crypto spot pairs. Risk is set with a swing-low stop and a take profit at a chose

Strategy v6 TrendMoving averages Repaints
Updated 13 days ago · None stated GitHub repository of MA + R:R Strategy

Donchian Breakout

by quantxaashish
1 stars

Donchian Breakout identifies potential momentum shifts based on Donchian channel extremes. It calculates highest highs and lowest lows across a user-defined lookback period. A bullish signal triggers when the current high matches or exceeds the channel high an

Indicator v5 BreakoutTrend
Updated 2 weeks ago · MIT GitHub repository of Donchian Breakout

An overlay indicator that plots 9, 21 and 50 period EMAs and prints BUY or SELL labels when the 9 EMA crosses the 21, price sits on the correct side of the 50 EMA, the candle matches the direction and volume is above its 20-bar average. On each signal it store

Indicator v5 Moving averagesTrend
Updated 2 weeks ago · None stated GitHub repository of 9-21-50 EMA Strategy With SL Hit
1 stars

A long-only strategy for the price chart that pairs a lower timeframe with a higher one, selected by a volatility mode: 10 and 45 minutes, 15 and 75 minutes, or 30 and 120 minutes. It buys when price crosses above the 20 EMA with RSI above 52 while price is ab

Strategy v5 TrendOscillators & momentum
Updated 2 weeks ago · None stated GitHub repository of TV Adaptive MTF Strategy
1 stars

A test script that plots a long list of built-in values on the price chart so a converter can be checked against exported chart data. It includes Supertrend, parabolic SAR, VWAP with weekly bands, volume indicators such as OBV and accumulation distribution, pi

Indicator v6 TrendVolume Repaints
Updated 3 weeks ago · Apache-2.0 GitHub repository of AlphaResin Conformance 2

Adaptive Signals V18

by Matthew-Eucaristo
1 stars

A crypto futures signal indicator in a separate pane, the later version of the V17 script. It scores setups and shows only those passing a validity gate, using a trend pullback engine with limit-style entries and a range engine that fades stretched moves. Filt

Indicator v6 TrendMean reversion
Updated 3 weeks ago · MIT GitHub repository of Adaptive Signals V18

TradeVisor BTC Strategy

by Rahib00494
1 stars

A Bitcoin strategy that enters long or short when price, a fast and slow EMA and a 50-period SMA trend filter agree, RSI sits inside a set band, MACD line and histogram point the same way, and volume is near its average. Each trade gets an ATR-based stop and a

Strategy v5 TrendOscillators & momentum
Updated 4 weeks ago · None stated GitHub repository of TradeVisor BTC Strategy
1 stars

This indicator calculates a multi-factor trend and momentum score by combining triple exponential moving averages, Supertrend, ADX regime filters, WaveTrend, and StochRSI oscillators. It identifies regular divergences across pivot points, checks multi-timefram

Indicator v6 TrendOscillators & momentum
Updated 5 weeks ago · MIT GitHub repository of Momentum Confluence Suite [MCS] v2

Kernal Cipher 1

by kdricha0602
1 stars

A large price-chart overlay that combines many filters into tagged signal markers. It uses a 21, 50 and 200 EMA stack with slope, a higher-timeframe reference, Supertrend, ADX regime, WaveTrend, StochRSI, regular and hidden divergence, relative strength agains

Indicator v6 TrendOscillators & momentum
Updated 5 weeks ago · MIT GitHub repository of Kernal Cipher 1
1 stars

An enhanced version of the ATR SuperTrend-style buy and sell indicator. Signals can be gated by a 9 and 21 EMA cross, and two ATR take profit levels are drawn. A smart money layer adds clustered support and resistance zones, break of structure and change of ch

Indicator v6 TrendSMC / ICT / price action
Updated 6 weeks ago · None stated GitHub repository of Zimpact Buy/Sell v3 Enhanced
1 stars

A Pine v5 indicator, written as the second layer of a gold-focused framework, that reads market direction from moving averages across weekly, daily, 4-hour and 1-hour data. A timeframe is bullish when price sits above 9, 21 and 50 averages in order, bearish wh

Indicator v5 TrendSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Market Direction and HTF Bias
1 stars

A signal overlay that merges Andean oscillator with clustered Money Flow Index entries and UT Bot ATR trailing stop entries. Signals can be filtered by a FRAMA trend channel, a choppiness index, an ATR percentage range and, new in this version, an optional Hur

Indicator v6 TrendOscillators & momentum
Updated 7 weeks ago · None stated GitHub repository of MUFCA AtomDC v4.0 Elite

BTCUSD Short Only

by Pr-ashant-pawar
1 stars

A Pine v6 indicator that looks for short setups using a 5-period EMA on the price chart. It finds runs of candles that stay entirely above the EMA, waits for a close below the low of that run, then waits for a pullback to that level before marking a short entr

Indicator v6 TrendBreakout
Updated 7 weeks ago · None stated GitHub repository of BTCUSD Short Only
1 stars

A strategy that scores long and short setups from a three-EMA trend alignment, an RSI position above or below 50 and a volume spike above its 20-bar average. A trade opens when the score reaches a confidence threshold input. Each entry has an ATR-based stop an

Strategy v5 TrendOscillators & momentum
Updated 7 weeks ago · MIT GitHub repository of Lyzer Core Runtime Proxy
1 stars

A second version of an index-oriented strategy that uses TRAMA adaptive moving averages with short and long lengths, a hold percentage and a hedge percentage. It can add an RSI slope filter on a chosen timeframe and an optional Turtle-style mode that adds to p

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of Hedge Fund Manager 2 SIGIL

Calculates and plots customizable sets of moving averages across intraday, daily, weekly, and monthly timeframes directly on the main price chart. Supports SMA, EMA, RMA, VWMA, and WMA calculations with per-line width and color options, moving average clouds,

Indicator v6 Moving averagesTrend Repaints
Updated 2 months ago · MPL-2.0 GitHub repository of Moving Averages For All Timeframes

Regime Overlay

by iamsteveng
1 stars

A price-chart overlay that reuses the same six-signal vote engine (moving average cross, RSI, MACD, Bollinger, OBV, Ichimoku) to mark entry signals and warn of drawdown conditions, depending on a Mode setting. A trend driver input chooses which signal leads. M

Indicator v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Regime Overlay

MM Pro v2

by monikerprivacy-byte
1 stars

MM Pro v2 is a supply and demand zone indicator for TradingView. It calculates swing highs and lows based on user-selected sensitivity levels and minimum swing percentage. The indicator draws persistent zone boxes on the price chart using ATR for width. It als

Indicator v6 Support & resistanceTrend
Updated 2 months ago · None stated GitHub repository of MM Pro v2

Daddy's Turtle Strategy

by timoanttila
1 stars

Daddy's Turtle Strategy is an indicator that marks long and short entries when a candle closes beyond the highest high or lowest low of a configurable lookback, plus an ATR buffer. Candles must have a minimum body share and must not exceed a maximum ATR size.

Indicator v6 BreakoutTrend
Updated 2 months ago · GPL-3.0 GitHub repository of Daddy's Turtle Strategy
1 stars

This strategy looks for pullbacks to the 21 EMA while the 21, 50 and 200 EMAs are stacked in trend order, with shorts enabled and longs switched off by default. Entries are screened by ADX, RSI range, volume against its average, candle body size, an ATR floor,

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Adaptive Pullback Momentum v2.5
1 stars

This is a synchronised build of a basket strategy that places a stop entry just beyond the close of a confirmed signal candle, for 10 lots, inside a trading session. Take profit and stop orders are armed together with the entry so same-bar touches execute corr

Strategy v6 ScalpingTrend Repaints
Updated 2 months ago · Custom licence GitHub repository of 5m Weapon One Leg Basket Synced

Gold Dominator Pro

by thanvish21
1 stars

Gold Dominator Pro is an overlay strategy aimed at gold. It reads a higher-timeframe trend from three exponential moving averages and includes RSI, MACD, Stochastic RSI, ADX, ATR, and volume settings. Optional session, equity-curve, and maximum-drawdown guards

Strategy v5 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Gold Dominator Pro

TTP VIX Spy

by AubakirovArman
1 stars

Pulls the VIX and builds a MACD histogram from it, then uses that with a SuperTrend, a band width test, price and RSI slope checks and an optional working-days filter to print B1, B2, S1 and S2 labels on the price chart. The SuperTrend fill is coloured by the

Indicator v5 TrendOscillators & momentum
Updated 3 months ago · MIT GitHub repository of TTP VIX Spy

MTF Confluence Trend

by aretephi
1 stars

MTF Confluence Trend plots trend signals when conditions align across timeframes. It detects Supertrend direction flips on the chart timeframe and confirms them against a higher timeframe Supertrend. Optional filters require an ADX strength threshold and a vol

Indicator v6 TrendVolatility & bands
Updated 3 months ago · None stated GitHub repository of MTF Confluence Trend
1 stars

This technical analysis dashboard aggregates market data across four dimensions: trend, momentum, volatility, and volume. It evaluates multiple technical indicators including exponential moving averages, SuperTrend, ADX, RSI, MACD, Stochastic, Bollinger Bands,

Indicator v6 Screeners & dashboardsTrend
Updated 3 months ago · MIT GitHub repository of Saham: Papan Gerak By. Akhmfz

Non-repainting HTF EMA

by ForexCodes-hq
1 stars

This indicator plots an exponential moving average calculated from a user-defined higher timeframe directly on the price chart. It avoids repainting and lookahead bias by applying a one-bar historical offset to the higher-timeframe data with lookahead disabled

Indicator v6 Moving averagesTrend
Updated 3 months ago · MIT GitHub repository of Non-repainting HTF EMA

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