Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 69)

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

HV+D PBJ PPD

by nishpa800
1 stars

Overlay indicator that combines several detection pipelines on the price chart: high-volume candles with large displacement, a PBJ trend filter built from a moving average and Supertrend, and relative-volume lanes. Markers appear when these conditions coincide

Indicator v5 VolumeBreakout
Updated 2 months ago · None stated GitHub repository of HV+D PBJ PPD
1 stars

Tn Sovereign FlowZone v6 is a strategy script that plots signals on the price chart using EMA crossovers combined with confluence scoring. The script calculates confluenceScore from trend EMA, volume SMA comparison, and RSI momentum to confirm EMA20/50 crossov

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Tn Sovereign FlowZone v6

This long-only strategy enters when a 14-period simple moving average crosses above a 28-period average and closes that long when the faster average crosses back below. While a position is open, it sets a stop a configurable percent below the entry, then moves

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Break even stop loss (% of instrument price)
99 stars

This indicator calculates market cycle phase using John Ehlers' Phasor Analysis methodology. It correlates the price series against cosine and negative-sine reference waves via dual Pearson correlation to extract real and imaginary phasor components. From thes

Indicator v6 TrendOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Phasor Analysis (HT_PHANA)

Imagegpt Test 1

by g-moe
3 stars

Imagegpt Test 1 is a comprehensive chart overlay indicator that plots buy, sell, and reversal signals along with supply and demand zones. It calculates key levels using volume pivots and features integrated Bollinger Bands alongside entry, exit, stop-loss, and

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 5 months ago · None stated GitHub repository of Imagegpt Test 1
1 stars

The strategy applies the Parabolic SAR indicator to detect trend reversal flips. It monitors when the SAR crosses from above to below the close (bullish flip) to enter long positions or from below to above (bearish flip) to enter short positions. Opposite posi

Strategy v6 TrendMoving averages
Updated 7 days ago · Apache-2.0 GitHub repository of PF probe 101 - parabolic sar flip

NO.1 Major Daily Signal v2

by vedkanani123
1 stars

A price-chart indicator that prints buy and sell labels aimed at one larger intraday price move per UTC day, with the target size set in price units. A first signal can come from a trend breakout or a completed Asia range break, optionally preferring the day-o

Indicator v6 TrendBreakout Repaints
Updated 2 months ago · None stated GitHub repository of NO.1 Major Daily Signal v2

Sequential Indicator

by capissimo
114 stars

Sequential Indicator normalizes price data within a configurable lookback window using min-max scaling and applies linear regression smoothing. It tracks the number of bars elapsed since the smoothed values crossed upper, middle, or lower threshold conditions.

Indicator v4 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Sequential Indicator

Calculates John Ehlers' Recursive Median Filter, a nonlinear filter combining a 5-bar running median with exponential smoothing to reduce impulsive noise while maintaining responsiveness. The smoothing factor is calculated from the cycle period setting using E

Indicator v6 Moving averagesTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Recursive Median Filter (RMED)

MovingAvg Cross

by TWODS-CAPITAL
37 stars

This strategy calculates a simple moving average of closing prices to detect trend shifts directly on the price chart. It enters a long position when the price remains above the moving average for a specified number of consecutive confirmation bars, and enters

Strategy v5 TrendMoving averages
Updated 3 years ago · MIT GitHub repository of MovingAvg Cross

Trend Persistence Score calculates a composite trend-efficiency oscillator plotted in a separate pane, grading trend strength and durability on a 0 to 100 scale. It integrates four distinct metrics: linear regression R-squared, Kaufman Efficiency Ratio, ADX wi

Indicator v6 TrendVolatility & bands
Updated 3 days ago · MIT GitHub repository of Trend Persistence Score [WavesUnchained]

PF Probe 104 - Supertrend Flip

by pineforge-4pass
1 stars

This strategy calculates the Supertrend indicator using a configurable ATR length and factor to identify trend reversals. It plots directly on the main price chart. When the Supertrend direction flips from bearish to bullish, the strategy closes any open short

Strategy v6 TrendVolatility & bands
Updated 7 days ago · Apache-2.0 GitHub repository of PF Probe 104 - Supertrend Flip

NO.1 Perfect Buy/Sell

by vedkanani123
1 stars

A price-chart indicator that stays always in one direction after the first confirmed mark: a buy exits shorts and holds long until the next sell, and the reverse. It uses a causal trail, trend, range and shock regime detection, a score threshold and an optiona

Indicator v6 TrendVolatility & bands Repaints
Updated 2 months ago · None stated GitHub repository of NO.1 Perfect Buy/Sell
106 stars

Breakout Trend Follower is a price-chart strategy that enters long when price breaks a recent swing high. It places the stop at the recent swing low and trails that stop upward as higher lows form, exiting when a higher low is breached. A pivot lookback sets h

Strategy v5 BreakoutTrend Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Breakout Trend Follower
99 stars

Calculates John Ehlers' Reflex indicator to measure price cycle reversal tendencies and trend direction with low lag. The script pre-filters price data using a two-pole Super Smoother Filter, measures linear extrapolation slope deviations over a lookback windo

Indicator v6 Oscillators & momentumTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Reflex Indicator

TTM Trend

by mihakralj
47 stars

This indicator calculates a short-term trend filter based on an exponential moving average and its slope. It identifies upward, downward, or neutral states by evaluating bar-to-bar changes in the average, coloring the plotted line accordingly. It also calculat

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of TTM Trend

MovingAvg2Line Cross

by TWODS-CAPITAL
37 stars

This strategy calculates two Simple Moving Averages (SMA) with fast and slow length inputs. It generates a long signal when the fast SMA crosses above the slow SMA, and a short signal when it crosses below. Reversal signals automatically close existing trades

Strategy v5 TrendMoving averages
Updated 3 years ago · MIT GitHub repository of MovingAvg2Line Cross

NO.1 Perfect Buy/Sell v2

by vedkanani123
1 stars

A price-chart indicator for lower timeframes that draws EMA 9, 21, 50 and SMA 200 clouds and prints always-in buy and sell flips. Signals combine EMA stack or cross, RSI, ADX and DI, relative volume and a lock that blocks tiny sideways ranges. The higher-timef

Indicator v6 TrendMoving averages Repaints
Updated 2 months ago · None stated GitHub repository of NO.1 Perfect Buy/Sell v2

TN Sovereign HMA

by raybird
1 stars

A strategy based on 21 and 55 period Hull moving averages. A long needs the fast line rising and above the slow line, price above a 200 EMA and volume above its 20-bar average times a multiplier; a short needs the opposite. Each entry has an ATR-based stop at

Strategy v6 Moving averagesTrend
Updated 2 months ago · None stated GitHub repository of TN Sovereign HMA

Brrrrr Strategy

by hasnocool
106 stars

The Brrrrr Strategy is a macro-based breakout strategy designed for crypto markets. It tracks the Glassnode total USDT supply daily metric and calculates a Donchian Channel over a user-defined lookback period. The strategy enters a long position when the USDT

Strategy v5 TrendBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of Brrrrr Strategy

Ehlers Reverse EMA

by mihakralj
99 stars

Calculates John F. Ehlers' Reverse Exponential Moving Average (EMA) designed to eliminate lag from traditional exponential smoothing. The indicator computes a warmup-compensated base EMA and subjects it to an 8-stage cascaded Z-transform inversion. The resulti

Indicator v6 Moving averagesTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Reverse EMA

This trend-following scalping strategy combines a moving average trend filter with the Absolute Strength Histogram indicator. It opens long positions when price is above a selectable baseline moving average and the histogram signals bullish momentum, and short

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Ruckard TradingZone Absolute Strength Histogram ATR
9 stars

This indicator calculates an advanced True Strength Index momentum oscillator plotted in a separate pane. It evaluates price momentum using double-smoothed price changes, offering multiple signal line smoothing algorithms such as EMA, SuperSmoother, and JMA ap

Indicator v6 Oscillators & momentumTrend
Updated 3 days ago · MIT GitHub repository of TSI Advanced [WavesUnchained]

This lower-pane indicator tracks a custom Supertrend built from ATR and a selectable average, then colors trend states such as rising, bear, pretrend, overbought, and oversold. It can paint bars, plot optional arrows, and show a dashboard of EMA lengths and sc

Indicator v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of J8 30 123 Spy Scalping Lower Pro

Zero-Lag Double EMA (ZLDEMA)

by mushroom-men-Trading
2 stars

The Zero-Lag Double EMA indicator calculates a double exponential moving average with zero-lag smoothing using lag compensation and exponential warmup compensator. It plots the resulting ZLDEMA line on the price chart. The main input is the period, defaulting

Indicator v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Zero-Lag Double EMA (ZLDEMA)
1 stars

This strategy plots four exponential moving averages on the price chart and compares their order. It treats a fully rising stack, shortest above the next three lengths, as bullish and the reverse order as bearish. It opens one long contract on the first bar th

Strategy v6 TrendMoving averages
Updated 7 days ago · Apache-2.0 GitHub repository of PF probe 4ema-rsi-probe-01-quad-ema-stack

Hyper Fibo System

by morindok
1 stars

Hyper Fibo System is an overlay indicator that projects Fibonacci wave cycles and linear regression lines based on two user-selected chart anchor points. It calculates the slope, midpoint, and range between the anchors, allowing traders to apply cyclic Fibonac

Indicator v5 Support & resistanceTrend
Updated 7 weeks ago · None stated GitHub repository of Hyper Fibo System

NO.1 RR Mark

by vedkanani123
1 stars

A price-chart indicator for one- to five-minute charts that marks each accepted entry as a buy or sell label with boxes for the stop and for 1R, 2R and 3R levels. Entries need a Supertrend flip, agreement from a completed higher-timeframe Supertrend, the EMA s

Indicator v6 TrendScalping Repaints
Updated 2 months ago · None stated GitHub repository of NO.1 RR Mark
1 stars

This strategy implements a modified Ichimoku Cloud system with causal HTF trend filtering on the price chart. It computes Tenkan-sen, Kijun-sen, Senkou A and B lines using user-set lengths for displacement. Long signals trigger on cloud breakout above with Ten

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign Ichimoku Causal
114 stars

This indicator adapts Donovan Wall's range filter to create trend-following trade labels on the price chart. It calculates a smoothed average price range using exponential moving averages and gates price fluctuations that fall within this threshold. When price

Indicator v4 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Smart Labelling: Range Filter

BTC Hashrate ribbons

by hasnocool
106 stars

This strategy tracks Bitcoin network hashrate data from external sources like Quandl, Glassnode, or IntoTheBlock using short and long moving averages. It generates buy or sell signals when the short hashrate moving average crosses above or below the long movin

Strategy v5 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of BTC Hashrate ribbons
13 stars

This strategy plots on the price chart and enters from a moving-average filter, ADX and Gann colours. Price above a 200-period EMA allows only longs; price below allows only shorts. A Gann aqua colour with ADX above a key level opens a long, and a Gann brown c

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Ruckard TradingZone ADX Gann

This overlay indicator detects tweezer tops and bottoms and kangaroo-tail pin bars, then draws supply and demand zones from those patterns. It scores each zone, decays freshness, merges overlapping zones, and can invalidate a zone after a close-through or afte

Indicator v6 Candlestick patternsSupport & resistance
Updated 3 days ago · MIT GitHub repository of Tweezer & Kangaroo Zones [WavesUnchained]

This indicator draws a SPY scalping panel in a separate pane. It calculates a Supertrend side from ATR smoothed by a selectable average, defaulting to HMA, and uses three moving averages of selectable type, defaulting to EMA lengths 13, 50, and 75. Colors mark

Indicator v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of J8 30 123 Spy Scalping Lower Pro 2 Jerry

Zero-Lag EMA (ZLEMA)

by mushroom-men-Trading
2 stars

Calculates and plots a Zero-Lag Exponential Moving Average directly on the price chart. It reduces traditional moving average lag by computing a signal from the current price and a lagged price offset by half the smoothing period, followed by exponential smoot

Indicator v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Zero-Lag EMA (ZLEMA)

Hyper Fibo System

by morindok
1 stars

Hyper Fibo System plots dynamic price lines, Fibonacci waves, symmetry projections, and regression channels based on two user-selected anchor points. The script calculates slope, midpoints, and cross levels between anchor points to project Fibonacci wave cycle

Indicator v5 Support & resistanceTrend
Updated 7 weeks ago · None stated GitHub repository of Hyper Fibo System
1 stars

An indicator for the price chart that classifies conditions as trend, range, transition or shock and lets only the matching module signal: a Supertrend flip or continuation in trends, a fade of a completed range edge in ranges, and a break of the completed Asi

Indicator v6 TrendSessions & time
Updated 2 months ago · None stated GitHub repository of NO.1 ULTIMATE BUY/SELL SIGNAL
99 stars

The Ehlers Roofing Filter isolates cyclical market components by eliminating low-frequency macro trends and high-frequency market noise. It combines a two-pole Butterworth high-pass filter with a Super Smoother filter. The high-pass stage removes cycle compone

Indicator v6 TrendOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Roofing Filter (ROOFING)
47 stars

The Ultimate Channel calculates an ultra-smoothed centerline alongside upper and lower volatility bands directly on the main price chart. It processes true range values through an advanced infinite impulse response smoothing filter to establish dynamic channel

Indicator v6 Volatility & bandsTrend
Updated 8 months ago · MIT GitHub repository of Ultimate Channel (UCHANNEL)
13 stars

This Pine Script v5 strategy draws on the price chart and sends TradingView orders toward Zignaly. It uses a selectable moving average, defaulting to a 200-period EMA of close, together with an SSL calculation based on a 10-period SMA. The user can trade long

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard TradingZone SSL EMA

This indicator computes and plots multiple technical analysis features on a separate pane. It calculates EMA-based trend indicators including fast and slow EMAs along with their slope, momentum oscillators such as RSI, Stochastic RSI, and MACD histogram, WaveT

Indicator v6 TrendOscillators & momentum
Updated 3 days ago · MIT GitHub repository of Vein Feature Exporter Core 4H [WavesUnchained]

J8 30 123 SPY Scalping PRO 2 Jerry is an overlay strategy designed for short-term SPY scalping and spread setups. It combines multiple Exponential Moving Averages with a custom Supertrend calculation based on flexible moving average types and ATR lengths to pl

Strategy v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of J8 30 123 SPY Scalping PRO 2 Jerry

Zero-Lag Triple EMA (ZLTEMA)

by mushroom-men-Trading
2 stars

The Zero-Lag Triple EMA (ZLTEMA) indicator calculates a smoothed trend line using triple exponential smoothing with lag compensation for reduced delay. It plots the resulting line on the price chart in yellow. The period input adjusts smoothing sensitivity by

Indicator v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Zero-Lag Triple EMA (ZLTEMA)
1 stars

This indicator projects geometric cycles and Fibonacci-scaled waves anchored between two user-defined chart points. It calculates the slope, midpoint, and span between the selected points to generate an expanding sine wave modulated by powers of the golden rat

Indicator v5 Support & resistanceTrend
Updated 7 weeks ago · None stated GitHub repository of Hyper Fibo System [Morindok]
1 stars

This strategy identifies trend momentum shifts using a Twin Range Filter (TRF) oscillator and volatility regime gates. It calculates the ratio of fast and slow price ranges, smooths it through a double exponential moving average, and signals entries when the s

Strategy v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Tn Sovereign Katana Flow v6

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