Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 30)

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

3 stars

This indicator plots an eight-period and a twenty-period exponential moving average on the price chart and colors candles by their relationship. Candles are green when the faster average is above the slower average and red when it is below. The average lengths

Indicator v5 Moving averagesTrend
Updated 5 months ago · None stated GitHub repository of 8/20 Cross Colored Candles

Ultimate Trading System

by EngineeredSuccess
3 stars

The Ultimate Trading System is an integrated indicator that combines multiple analysis methodologies—including Pi Cycle Top, SPX/Gold ratio, Elliott Wave, and multi-source market signals—into a composite oscillator scored from 0 to 100. Plotted in a separate p

Indicator v6 Screeners & dashboardsOscillators & momentum
Updated 1 year ago · Custom licence GitHub repository of Ultimate Trading System

This indicator marks Hammer and Hanging Man candlestick patterns on the price chart. A Hammer requires a bullish candle with a small real body, a long lower shadow, and a short upper shadow after a lookback downtrend. A Hanging Man uses the same body and shado

Indicator v5 Candlestick patternsTrend
Updated 2 years ago · None stated GitHub repository of Hammer and Hanging Man (Candlestick Pattern)
2 stars

MasterTrader V1 is an indicator that plots two exponential moving averages (fast length 9, slow length 21) and RSI (length 14) on the close price chart. It generates long entry signals when the fast EMA crosses above the slow EMA, RSI stays between 30 and 70,

Indicator v6 TrendOscillators & momentum
Updated 2 days ago · None stated GitHub repository of MasterTrader V1 Master Trader
2 stars

This intraday strategy is designed for 5-minute ETF trading, specifically tailored for leveraged assets like TQQQ. It evaluates simple moving average alignment across three lengths and calculates consecutive rising or falling bars over a lookback window to ide

Strategy v6 TrendMoving averages
Updated 9 days ago · None stated GitHub repository of TQQQ MA Accumulation v3-5m
2 stars

The SuperTrend Regime Confluence strategy combines an adaptive SuperTrend indicator with market regime detection to generate trading signals. It computes a composite conviction score using an ADX regime lookback, a trend EMA, and a volume moving average. Trade

Strategy v6 TrendVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of SuperTrend Regime Confluence

This indicator plots higher time frame market structure shifts and liquidity levels on the price chart. It identifies pivots, break of structure events, and fair value gaps from higher timeframe data to mark claimed liquidity pools and BOS+FVG setups. Liquidit

Indicator v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 2 months ago · None stated GitHub repository of ICT HTF MSS & Liquidity (fadi) - Modified

BOT SLP 2H ZEGUELA DEMABOT

by danielvm-git
2 stars

This strategy calculates DEMA values using configurable lengths and detects crossovers and crossunders to generate long and short entry signals on the price chart. It plots multiple DEMAs with green, red, and fuchsia colors for visual reference. The main setti

Strategy v4 Moving averagesTrend
Updated 2 months ago · MIT GitHub repository of BOT SLP 2H ZEGUELA DEMABOT

IBD Power Trend

by major
2 stars

This indicator tracks Investor's Business Daily style Power Trend rules and setup conditions in a separate pane. It evaluates whether price lows hold above an exponential moving average, verifies that the fast EMA remains above a rising simple moving average,

Indicator v6 TrendMoving averages
Updated 3 months ago · Apache-2.0 GitHub repository of IBD Power Trend
2 stars

This strategy captures momentum moves on gold by combining Bollinger Band breakouts with EMA trend confirmation. It restricts trade entry to active European and US trading sessions based on specified hours. Exits are managed dynamically through an ATR-based in

Strategy v6 BreakoutTrend
Updated 4 months ago · None stated GitHub repository of XAUUSD Momentum Breakout Strategy

Box Scalper v4

by wynnforthework
2 stars

Box Scalper v4 is a strategy that plots buy and sell signals on the price chart using ADX trend filters, QQE momentum oscillator, and BOX channels. It signals entries based on crossovers and zone conditions, with trailing stop loss and take profit targets. Par

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Box Scalper v4
2 stars

The MarketSmith Indicator enhances price action visualization by applying custom candle coloring and overlaying configurable moving averages on the main chart. Bar colors can be based either on the bar open relative to close or on the price relative to the pre

Indicator v5 Moving averagesTrend
Updated 2 years ago · MIT GitHub repository of MarketSmith Indicator

This overlay indicator combines several ZigZag lengths with an ATR-based ZigZag Supertrend and oscillator settings to mark trend direction on the price chart. It reads close or an optional alternative source and keeps a limited pivot history. A movable table s

Indicator v5 TrendVolatility & bands
Updated 3 years ago · None stated GitHub repository of Multi-ZigZag Multi-Oscillator Trend Detector

STC+TrendTrader

by theupslidedown
2 stars

This indicator combines the Schaff Trend Cycle (STC) oscillator with Andrew Abraham's Trend Trader indicator in a separate pane. It calculates the STC oscillator using fast and slow moving averages combined with double stochastic smoothing, plotting a colored

Indicator v5 Oscillators & momentumTrend
Updated 3 years ago · None stated GitHub repository of STC+TrendTrader

Ghost Flow

by mphinance
1 stars

A price-chart overlay that grades a setup from several axes: a Hull trend band with an optional EMA ribbon, Chaikin money flow strength, an ATR-based compression and expansion measure, trend age in bars, and a Williams %R exhaustion gauge. It adds a Bounce 2.0

Indicator v6 TrendVolume
Updated 3 days ago · Custom licence GitHub repository of Ghost Flow
1 stars

A separate-pane indicator, short title NATSE 3.0, that estimates trend state from log price with a two-state Kalman filter. It blends velocity, efficiency and displacement scores using adjustable weights, then compares the result with adaptive bands set by a l

Indicator v6 TrendOscillators & momentum
Updated 3 days ago · None stated GitHub repository of Adaptive Trend State Engine 3.0

Week 02

by moonyroy
1 stars

This indicator plots ZigZag lines on the price chart to map swing highs and lows. It detects break_high and break_low events to identify pivot points. The code supports a primary chart timeframe and optional second timeframe ZigZag with selectable modes such a

Indicator v6 TrendSupport & resistance
Updated 6 days ago · None stated GitHub repository of Week 02

Candlestick Patterns

by pineforge-4pass
1 stars

This strategy detects bullish and bearish engulfing candles, hammers, shooting stars, and morning stars from current and prior bar bodies. It enters long when a bullish pattern occurs while price is below a simple moving average, and short when a bearish patte

Strategy v6 Candlestick patternsTrend Repaints
Updated 7 days ago · Apache-2.0 GitHub repository of Candlestick Patterns

EMA-Volume-Momentum

by engtuncay
1 stars

This indicator overlays two exponential moving averages (defaults 50 and 200) alongside scaled volume moving averages on the price chart. It calculates volume momentum via RMA and On-Balance Volume (OBV) compared to its EMA. The script highlights trend changes

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

Hash Supertrend

by kanylbullen
1 stars

A Supertrend strategy with adjustable ATR length and multiplier, drawn on the price chart. It sizes positions at a percentage of equity and offers an optional time filter limiting trading to chosen hours. Visual options include colour intensity, a glow effect,

Strategy v6 TrendVolatility & bands
Updated 8 days ago · None stated GitHub repository of Hash Supertrend

Adaptive Trend Flow

by rosijay17-cmd
1 stars

An indicator that draws a volatility band trend line on the price chart. A basis is built from two EMAs of the typical price, and bands sit above and below it at a multiple of smoothed standard deviation. The trend flips to bullish when price closes above the

Indicator v6 TrendVolatility & bands
Updated 8 days ago · GPL-3.0 GitHub repository of Adaptive Trend Flow
1 stars

A Pine v6 research strategy for crypto charts that scores several modules, namely RSI, Fibonacci Bollinger Bands, a trend moving average with higher timeframe filter, Ichimoku, candlestick patterns and chart patterns, then enters when a weighted score passes a

Strategy v6 Oscillators & momentumVolatility & bands
Updated 12 days ago · MIT GitHub repository of Crypto TA Pro v6 Megalithic Research

MTF Confluence Spot Strategy

by MuhammadMuhamid
1 stars

A long-only spot strategy where each filter has its own timeframe and on/off switch, and a trade needs every enabled filter to pass. Gates include Supertrend, RSI and Volume Flow Indicator, with structure filters such as support zones, supply and demand, liqui

Strategy v6 SMC / ICT / price actionTrend
Updated 13 days ago · None stated GitHub repository of MTF Confluence Spot Strategy

Pin Bar Strategy

by moonyroy
1 stars

This strategy identifies long and short pin bar candlestick patterns aligned with trend conditions defined by an Exponential Moving Average (EMA) and an Average True Range (ATR) filter. Long trades enter when an uptrend is active, price is near the EMA, and a

Strategy v6 Candlestick patternsTrend
Updated 3 weeks ago · None stated GitHub repository of Pin Bar Strategy

AlgoBot Strategy

by femibol
1 stars

A strategy that approximates a trading bot's entry and exit rules in three modes: EMA 8 and 21 momentum with ADX and a volume surge, relative-volume momentum, and a daily SuperTrend trend rider using a daily EMA, ADX and consecutive green days. Exits include a

Strategy v5 Oscillators & momentumTrend
Updated 6 weeks ago · None stated GitHub repository of AlgoBot Strategy

Strategy Template

by MoDarK-MK
1 stars

This strategy template provides a modular foundation for building TradingView v6 backtests. It uses a placeholder Exponential Moving Average crossover signal combined with customizable filters for higher-timeframe trend alignment, volatility regime thresholds,

Strategy v6 TrendMoving averages
Updated 8 weeks ago · MPL-2.0 GitHub repository of Strategy Template

TRAMA Turtle

by dwightspitz
1 stars

A strategy that draws a triple Hull moving average cloud and up to five TRAMA adaptive average clouds on the price chart, each with its own length, delay and timeframe. Only the Hull and first TRAMA clouds are on by default. It includes ATR-based position sizi

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of TRAMA Turtle

EMA + Supertrend + OBV

by vedkanani123
1 stars

A price-chart indicator that stacks a 21, 50 and 200 EMA ribbon with a Supertrend line and an ATR-based volatility stop. On-balance volume trend and a volatility-percentile regime feed a scoring step, and a multi-timeframe heatmap table shows the combined read

Indicator v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of EMA + Supertrend + OBV

Regime Trend Rider

by jayadevrana
1 stars

This long-only trend strategy trades only while price is above a 200-period SMA that is also rising. It enters when price crosses back above a 20-period EMA after a pullback within that uptrend, and exits on an ATR-based chandelier trailing stop that ratchets

Strategy v6 TrendMoving averages
Updated 2 months ago · Custom licence GitHub repository of Regime Trend Rider

GrimmHA Strategy Indicator

by GreyssonEnterprises
1 stars

An indicator that combines Heikin-Ashi candle recognition, doji detection and four smoothed moving averages with lengths of 21, 50, 100 and 200. It can show entry signals, trade levels, background colours and a statistics table, with a risk-to-reward ratio and

Indicator v5 Candlestick patternsMoving averages
Updated 3 months ago · MIT GitHub repository of GrimmHA Strategy Indicator
1 stars

An overlay that trades pullbacks to VWAP in the direction of a higher-timeframe EMA trend. In an uptrend with VWAP rising it signals a buy when price dips back to VWAP, and in a downtrend a sell when price rallies to it. A stricter grade needs price to have st

Indicator v6 Mean reversionTrend
Updated 4 months ago · None stated GitHub repository of VWAP Pullback A+ Dip Scanner
1 stars

This overlay indicator is a companion dashboard for Bursa Malaysia stocks. It builds a table that shows Minervini trend-template conditions, VCP squeeze tightness, volume surge and contraction, price and average-volume liquidity filters, and an MCDX banker or

Indicator v6 TrendVolatility & bands
Updated 4 months ago · None stated GitHub repository of Minervini VCP Dashboard v8 KLSE

EMA Channel Reversal

by rubbermetal
1 stars

EMA Channel Reversal is a strategy that plots a 200-period EMA channel built from highs, closes and lows, plus fast and slow momentum EMAs with an optional glow. Entries follow a tracked sequence of breakout, momentum confirmation and pullback, with an alterna

Strategy v6 TrendMoving averages
Updated 4 months ago · MPL-2.0 GitHub repository of EMA Channel Reversal

The If Wrapped Subexpression Condition strategy is an exponential moving average crossover trading model. It calculates an 8-period fast EMA and a 21-period slow EMA from closing prices. The strategy executes a long entry when the fast EMA crosses above the sl

Strategy v6 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of If Wrapped Subexpression Condition

MTF RSI Signals

by iyoshikawa
1 stars

This indicator plots multi-timeframe RSI signals on the price chart. It calculates a smoothed RSI using short and long periods with EMA smoothing, then applies a Stoch filter for direction changes. Signals trigger on crossovers and levels, combined with ADX tr

Indicator v5 Oscillators & momentumTrend Repaints
Updated 5 months ago · None stated GitHub repository of MTF RSI Signals

Talons Ichimoku Breakout

by muammeryldrm42
1 stars

A strategy that computes Tenkan, Kijun and both Senkou lines from highest and lowest midpoints and plots the cloud with a coloured fill. It goes long when price is above the cloud, Tenkan crosses above Kijun and the cloud is green, and short on the mirrored co

Strategy v5 TrendBreakout
Updated 5 months ago · None stated GitHub repository of Talons Ichimoku Breakout

EMA + Trend + Liquidity

by kvmafthab-pixel
1 stars

This overlay plots a four-length exponential moving average ribbon and classifies trend on the price chart. It marks strong bullish when the 21-period average is above the 50 and 200 with a positive short slope, strong bearish when that stack is reversed, and

Indicator v5 TrendMoving averages
Updated 5 months ago · Custom licence GitHub repository of EMA + Trend + Liquidity
1 stars

This indicator provides a comprehensive toolkit for crypto chart analysis. It calculates and plots Volume Profile boxes with value area and acceptance bars, VWAP with standard deviation bands, multiple EMAs for trend filtering including HTF bias, lower timefra

Indicator v6 VolumeSupport & resistance
Updated 5 months ago · MIT GitHub repository of Crypto AMT Toolkit v4 Safe LTF

Renko Reversal

by PETERSAMUELOPS12
1 stars

A strategy that trades direction flips on ATR-sized Renko-style bricks. A long opens after a set number of consecutive up bricks and closes after the same number of down bricks, with optional shorts. Brick size can be a fixed value or ATR multiplied by a facto

Strategy v6 Trend
Updated 5 months ago · None stated GitHub repository of Renko Reversal

AlgoBot VWAP Pullback Strategy

by ghostnathan30-ops
1 stars

A futures strategy for 15-minute charts that builds a daily-reset VWAP with standard deviation bands. It requires several consecutive bars on one side of VWAP, then a pullback to within a small percentage of it and a bar closing in the trend direction. Entries

Strategy v6 TrendSessions & time
Updated 6 months ago · None stated GitHub repository of AlgoBot VWAP Pullback Strategy

High Margin Pro

by Sandesh30-cloud
1 stars

High Margin Pro is a long-only chart strategy. It plots a 50-period EMA, a 200-period EMA, and a 60-minute 200-period EMA. A long entry requires the fast EMA above the slow EMA, price above the higher-timeframe EMA and within one ATR below the fast EMA, an RSI

Strategy v5 TrendMoving averages
Updated 6 months ago · None stated GitHub repository of High Margin Pro

Kalman Filter

by Teerth1
1 stars

Applies a Kalman filter to the chosen price source to produce a smoothed estimate of the underlying price level, drawn on the main chart. Process noise and measurement noise inputs control how quickly the line adapts versus how smooth it is. Optional uncertain

Indicator v5 TrendMean reversion
Updated 6 months ago · None stated GitHub repository of Kalman Filter

BTC ATH Golden Cycle

by ymlee1104
1 stars

BTC ATH Golden Cycle is a Bitcoin-focused strategy script that plots time-based halving cycles, supply and demand zones, a ZigZag indicator, a Rainbow ribbon, and an Ichimoku Cloud directly on the main price chart. The script models historical and projected BT

Strategy v6 TrendSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of BTC ATH Golden Cycle

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