Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 20)

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

AI Trading Bot - 19 Modules

by thanhcong1211
3 stars

This strategy overlays trend, momentum, and simplified Smart Money Concepts (SMC) directly on the price chart. It evaluates market conditions using triple EMAs (20, 50, 200), MACD crossovers, RSI levels, and volume moving averages alongside simplified order bl

Strategy v5 SMC / ICT / price actionTrend
Updated 3 months ago · None stated GitHub repository of AI Trading Bot - 19 Modules

MTF Confluence Dashboard

by WiseManAlgo
3 stars

This indicator displays a multi-timeframe confluence dashboard and signal arrows directly on the main price chart. It evaluates trend and momentum across five configurable timeframes for up to three symbols using an exponential moving average and the relative

Indicator v5 Screeners & dashboardsTrend
Updated 4 months ago · None stated GitHub repository of MTF Confluence Dashboard
3 stars

This strategy plots a fast and a slow exponential moving average on the price chart and shades the background by which average is higher. It enters a long position when the fast average crosses above the slow average and closes that long when the fast average

Strategy v5 TrendMoving averages
Updated 7 months ago · MIT GitHub repository of EMA Crossover Trend Following
3 stars

Stella's RSI + EMA Crossover is a momentum strategy that plots exponential moving averages directly on the price chart. It generates long signals when RSI turns up from oversold levels while price trades above the fast EMA and optional 200-period trend filter

Strategy v6 TrendOscillators & momentum
Updated 8 months ago · MIT GitHub repository of Stella's RSI + EMA Crossover

Pi Cycle Top Indicator

by EngineeredSuccess
3 stars

The Pi Cycle Top Indicator calculates a 111-period simple moving average alongside a scaled 350-period simple moving average to detect potential market cycle highs, historically utilized for Bitcoin analysis. It identifies crossovers between the moving average

Indicator v6 Moving averagesTrend
Updated 1 year ago · Custom licence GitHub repository of Pi Cycle Top Indicator

MOTO ka AgniAstra

by HelloMoto069
3 stars

MOTO ka AgniAstra is a price-chart overlay that smooths the selected source with a Gaussian window and draws upper and lower bands from a scaled mean absolute error. When repainting smoothing is on, it recalculates the curve across recent bars and marks band c

Indicator v5 Volatility & bandsTrend Repaints
Updated 1 year ago · None stated GitHub repository of MOTO ka AgniAstra

Sapphire FiboBands Strategy

by sapphire-edge
3 stars

This strategy plots Fibonacci Bollinger Bands on the price chart. It generates buy and sell signals based on selected Fibonacci ratios (1.618, 2.618, or 4.236) combined with Bollinger Band calculations using a configurable source and length. Trades enter on ma

Strategy v5 Volatility & bandsSupport & resistance
Updated 1 year ago · None stated GitHub repository of Sapphire FiboBands Strategy

Supertrend Strategy

by imzeeshan
3 stars

This systematic trend-following strategy executes long trades based on Supertrend indicator flips. Entry occurs when the Supertrend direction turns bullish, provided the date range and optional benchmark filter are satisfied. The benchmark filter verifies whet

Strategy v5 TrendVolatility & bands
Updated 2 years ago · MIT GitHub repository of Supertrend Strategy

This strategy overlays a linear regression channel and two moving averages on the price chart. It uses the regression deviation and optional Supertrend ATR filter to qualify direction, and can enter on a moving-average cross when that option is enabled. Long t

Strategy v5 TrendMoving averages Repaints
Updated 3 years ago · None stated GitHub repository of Fedra Algotrading Strategy Trailing Stop
3 stars

The Moving Averages Crossover Bot calculates two configurable moving averages directly on the price chart using selectable types such as SMA, EMA, WMA, RMA, HMA, DEMA, or TEMA. It identifies signals when the first moving average crosses above or below the seco

Strategy v4 Moving averagesTrend Repaints
Updated 5 years ago · None stated GitHub repository of Moving Averages Crossover Bot

QQQ 1min Pure Runner

by yalili8521
2 stars

This intraday strategy enters long or short positions on 1-minute charts of QQQ based on a triple moving average stack. It filters entries by requiring an accumulation or distribution sequence of consecutive rising or falling bars while rejecting bars exceedin

Strategy v6 TrendMoving averages
Updated 9 days ago · None stated GitHub repository of QQQ 1min Pure Runner

3x MA = Moving Average

by piecioshka
2 stars

The 3x MA indicator plots three moving averages on the price chart: a short-term, medium-term, and long-term average. Users can customize the period lengths, the type of moving average (including SMA, EMA, WMA, VWMA, and RMA), and the colors for each. Optional

Indicator v6 Moving averagesTrend
Updated 12 days ago · MIT GitHub repository of 3x MA = Moving Average

MA Spectrum 7

by vtnhqw
2 stars

MA Spectrum 7 plots up to seven configurable moving averages directly on the price chart across two distinct groupings. The faster tier calculates 20, 50, 100, and 200-period averages using a selectable calculation method, including SMA, EMA, RMA, WMA, and VWM

Indicator v6 Moving averagesTrend
Updated 12 days ago · None stated GitHub repository of MA Spectrum 7

Sukepoyo Sub

by Pesci1134
2 stars

This indicator plots two ZigZag lines and five EMAs on the price chart. ZigZag 1 uses depth 12, deviation 5 and backstep 3 for the main trend. ZigZag 2 uses depth 5, deviation 3 and backstep 2 for the fast trend. Five EMAs with lengths 20, 30, 40, 75 and 200 a

Indicator v6 Moving averagesTrend
Updated 2 weeks ago · None stated GitHub repository of Sukepoyo Sub

Calculates Gaussian kernel moving averages adjusted by directional price alignment and normalized by ATR. The indicator applies fast and slow smoothing lengths with custom kernel bandwidth and directional weighting settings to smooth price action while minimiz

Indicator v6 TrendMoving averages
Updated 2 weeks ago · MIT GitHub repository of Directional Kernel Filter [BackQuant]

Algo

by TamTH-Dev
2 stars

Algo is an overlay indicator that combines Deviation Scaled Moving Averages (DSMA), multi-layer Ripster exponential moving average clouds, and ATR-based trading levels on the price chart. It calculates adaptive DSMA lines alongside five configurable EMA pairs

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

GEO P Momentum Strategy

by newsfriend
2 stars

Implements a rule-based momentum trading strategy that detects Bollinger Band challenges followed by synchronized trendline or range breakouts on the price chart. Entries trigger under configurable strictness modes using multi-timeframe Tide and Wave alignment

Strategy v6 Oscillators & momentumVolatility & bands
Updated 8 weeks ago · None stated GitHub repository of GEO P Momentum Strategy

ALERTATRON-KSM DEMATRON 2H

by danielvm-git
2 stars

This strategy plots three DEMA lines on the price chart for trend analysis. It generates buy and sell signals on DEMA crossovers between the first and second DEMA (or third DEMA when enabled) with optional trailing stop, stop loss, and take profit levels. The

Strategy v4 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of ALERTATRON-KSM DEMATRON 2H
2 stars

Implements a strategy combining Oliver Kell's Cycle of Price Action with Mark Minervini's Volatility Contraction Pattern (VCP). It identifies breakout setups such as wedge pops and EMA crossbacks aligned with EMA 10/20/50/200 and an optional Minervini Trend Te

Strategy v6 TrendBreakout
Updated 3 months ago · Custom licence GitHub repository of Kell + Minervini VCP Backtest
2 stars

This trend-following strategy for XAUUSD checks alignment across three Simple Moving Averages (20, 50, and 200) calculated on closed bars. It enters long when price and all three SMAs are stacked in ascending order, and enters short when stacked in descending

Strategy v6 TrendMoving averages
Updated 4 months ago · None stated GitHub repository of XAUUSD Dollar Trader Martingale
2 stars

This indicator detects and draws trendlines, zones, and neutral bands directly on the price chart. It generates long and short breakout signals when price breaches detected trendlines, displaying configurable target and stop-loss lines based on an adjustable r

Indicator v5 BreakoutSupport & resistance
Updated 7 months ago · None stated GitHub repository of SilverHawk Trendline Breakouts

Alper

by avatar-lavventura
2 stars

Alper is a trend-following strategy based on a custom volatility stop calculation using the Average True Range. It tracks price extremes and computes a trailing stop level to determine market direction. When the price trades above the volatility stop, the scri

Strategy v5 TrendVolatility & bands
Updated 7 months ago · None stated GitHub repository of Alper
2 stars

This strategy calculates MACD, ADX trend strength, ATR, and a rolling VWAP resetting at fixed bar intervals. It plots the VWAP line, stop loss levels, and profit targets directly on the price chart. Long positions enter when MACD crosses above its signal line

Strategy v5 TrendOscillators & momentum Repaints
Updated 8 months ago · MIT GitHub repository of MACD & VWAP Strategy with ATR SL/Targets

QQE + AK Trend + EFI

by realanthonyc
2 stars

This Pine Script indicator combines QQE, AK Trend, and EFI indicators. It calculates the QQE using RSI with smoothing and displays it as a histogram in a separate pane. The AK Trend line is formed by two exponential moving averages whose scale adjusts accordin

Indicator v6 Oscillators & momentumTrend
Updated 11 months ago · MPL-2.0 GitHub repository of QQE + AK Trend + EFI
2 stars

This strategy is written for Bitcoin and draws on the price chart. It combines moving averages, an SSL channel, ADX, RSI, stochastic, and a volume oscillator with high-volume thresholds to generate buy and sell signals. Users can limit testing to a date range

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of TLC_STRATEGY_EMARSIADX for BTC

QQE MOD 副图指标

by iceberg211
2 stars

This indicator calculates a dual Quantitative Qualitative Estimation (QQE) momentum oscillator alongside Bollinger Bands in a separate pane. It computes smoothed Relative Strength Index values paired with Wilder-style ATR trailing bands across two independent

Indicator v5 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of QQE MOD 副图指标
2 stars

Multi-Indicator Trading System plots 50-period and 200-period exponential moving averages alongside buy and sell signals directly on the price chart. Signals trigger when a short-timeframe EMA crossover aligns with higher timeframe trend filters from 1-hour or

Indicator v5 TrendMoving averages Repaints
Updated 1 year ago · MIT GitHub repository of Multi-Indicator Trading System

HAZZONES

by ashwagamma
2 stars

This indicator plots support and resistance zones on the price chart using Heikin Ashi data. It detects strong bullish and bearish trends by counting consecutive Heikin Ashi candles that meet specific body and wick conditions. Up to 15 support and 15 resistanc

Indicator v5 Support & resistanceCandlestick patterns
Updated 1 year ago · None stated GitHub repository of HAZZONES

SUMMARY

by ryangaraygay
2 stars

This indicator aggregates multiple technical signals into an on-chart summary table. It calculates a session-based VWAP, a triple-EMA-smoothed price-volume oscillator, an EMA 9/21 trend spread, multi-timeframe Donchian channel breakouts, and an opening range h

Indicator v6 Screeners & dashboardsSessions & time
Updated 1 year ago · MIT GitHub repository of SUMMARY
2 stars

Calculates higher timeframe Exponential Moving Averages, Average True Range, and optional RSI momentum filters to determine market regimes. Enters long positions during bullish regimes and allows scaling in through pyramiding as price advances by a user-define

Strategy v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Bitcoin Regime Pyramid Strategy
2 stars

Weekend Trend Trader Overlay plots a 20-bar highest close as a resistance line and a ratcheting trailing stop on the price chart. It reads a chosen index, by default NASDAQ:NDX, on the chart timeframe and compares that close with a 10-bar simple moving average

Indicator v5 TrendSupport & resistance
Updated 2 years ago · None stated GitHub repository of Weekend Trend Trader Overlay

Saty Pivot Ribbon

by mikah13
2 stars

Saty Pivot Ribbon plots a three-EMA ribbon on the price chart to show trend direction and dynamic support or resistance. Fast, pivot, and slow exponential moving averages form two colored clouds that switch between bullish and bearish colors. Optional convicti

Indicator v5 TrendMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of Saty Pivot Ribbon

The Quantitative Qualitative Estimation indicator calculates a smoothed Relative Strength Index combined with a dynamic, volatility-based trailing line. It plots a fast smoothed RSI line alongside a slow trailing line in a separate pane, with a midline set at

Indicator v4 Oscillators & momentumVolatility & bands
Updated 2 years ago · None stated GitHub repository of Quantitative Qualitative Estimation (QQE)
2 stars

This indicator plots a momentum-based ZigZag on the price chart from a QQE calculation driven by a multi-timeframe RSI. It marks bullish and bearish ZigZag segments, optional divergence and convergence between price and that RSI, and an optional Supertrend lin

Indicator v5 Oscillators & momentumDivergence
Updated 3 years ago · None stated GitHub repository of Modified Momentum QQE-ZigZag
2 stars

[CBB] MTF Penta RSI Strategy is an overlay strategy that tracks momentum across multiple time horizons using five distinct Relative Strength Index (RSI) calculations: a smoothed 4-period RSI, alongside 14, 30, 70, and 120-period RSIs. It evaluates whether thes

Strategy v5 Oscillators & momentumTrend
Updated 3 years ago · None stated GitHub repository of [CBB] MTF Penta RSI Strategy

Sassiz Ichimoku

by sassiz-root
2 stars

This overlay strategy plots a full Ichimoku set on the price chart: Tenkan, Kijun, displaced Chikou, and Senkou Spans A and B with a colored cloud. It marks a long when a confirmed Tenkan cross above Kijun occurs with price and Chikou above the lines and cloud

Strategy v5 TrendOscillators & momentum
Updated 3 years ago · MIT GitHub repository of Sassiz Ichimoku

The script computes a Nadaraya-Watson kernel regression estimate using a rational quadratic kernel on the input source. It plots the estimate as a line on the price chart. Bullish and bearish color changes occur when the estimate crosses or reverses direction

Indicator v5 TrendMoving averages
Updated 3 years ago · None stated GitHub repository of Nadaraya-Watson: Rational Quadratic Kernel Non-Repainting
2 stars

This indicator calculates and plots multiple pairs of moving averages on the price chart, including 10/30, 5/13, 34/50, 72/89, and 180/200. Each pair fills a colored cloud between the short and long EMAs, with color changing based on which average is above the

Indicator v4 TrendMoving averages
Updated 3 years ago · MIT GitHub repository of 10/30 Ripster EMA Clouds
2 stars

This indicator calculates and plots variations of the Hull Moving Average directly on the price chart. Users can select between standard Hull MA, Exponential Hull MA, and Triple Hull MA. The output can be displayed as a single moving average line or as a two-l

Indicator v4 Moving averagesTrend
Updated 3 years ago · Apache-2.0 GitHub repository of Hull Suite by InSilico

My Strategy

by storm0611
2 stars

The script implements a basic moving average crossover trading strategy directly on the price chart. It calculates a 14-period and a 28-period simple moving average (SMA) and plots them as green and red circles. It enters a long position when the fast SMA cros

Strategy v5 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of My Strategy

MA Slope

by xopromo
1 stars

An indicator on the price chart that trades the turning points of a moving average. A long or short idea starts when the average changes direction beyond a minimum slope filter. Exits come from slope slowing, the price to average spread narrowing or the averag

Indicator v6 Moving averagesTrend
Updated 2 days ago · None stated GitHub repository of MA Slope
1 stars

Marks buy and sell signals on the price chart using a 50 and 200 EMA trend filter, an optional weekly trend confirmation, volume spikes against a moving average and RSI levels. Two buy styles can be enabled: accumulation after a bottom, and momentum breakout.

Indicator v5 TrendBreakout
Updated 2 days ago · None stated GitHub repository of Institutional Buy & Sell v6

Intraday Regime Follower

by nvolpe2007-cell
1 stars

A long and short trend strategy that compares a 50-bar and 200-bar EMA with price position and EMA slope. It goes long in an uptrend, short in a downtrend and flat otherwise. A hysteresis band must be broken before the state flips, and an ATR-versus-cost gate

Strategy v6 TrendMoving averages
Updated 2 days ago · None stated GitHub repository of Intraday Regime Follower

RCCE v2.2

by cianfru
1 stars

A price-chart indicator that classifies each symbol into a market regime using a long-period Z-score, volatility and fast versus slow energy readings, with thresholds for blow-off, trim and capitulation. It sets the asset class automatically as BTC, ETH, altco

Indicator v6 TrendScreeners & dashboards
Updated 3 days ago · None stated GitHub repository of RCCE v2.2

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