Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 21)

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

j14-E1 adv

by moonyroy
1 stars

This indicator plots ZigZag lines connecting swing highs and lows to map price structure. It draws candle body and shadow boxes on the price chart and detects CHoCH for potential trend shifts and BOS for continuation signals. The main setting toggles candle di

Indicator v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 6 days ago · None stated GitHub repository of j14-E1 adv

Aperture COG LinReg

by pineforge-4pass
1 stars

A long-only strategy that combines the Center of Gravity oscillator with a linear regression path. It enters long when the oscillator crosses above its EMA signal while the regression line is rising and price sits above it. It exits when the oscillator crosses

Strategy v6 Oscillators & momentumTrend
Updated 7 days ago · Apache-2.0 GitHub repository of Aperture COG LinReg

EMA-Volume

by engtuncay
1 stars

EMA-Volume plots two exponential moving averages on the price chart and marks when the faster average crosses the slower one. It also calculates a simple moving average of volume and treats volume as high or low relative to that average. Ordinary crosses get s

Indicator v6 TrendMoving averages
Updated 7 days ago · None stated GitHub repository of EMA-Volume
1 stars

A Supertrend strategy drawn on the price chart whose multiplier can adapt to the detected market regime using ADX. Entries need a minimum signal score and can be filtered by a trend EMA, a skip-ranging rule, a volume filter and a bar cooldown. Stop loss can us

Strategy v6 TrendVolatility & bands
Updated 8 days ago · None stated GitHub repository of SuperTrend AI Strategy Adaptive

A price-chart indicator that extends a futures screener with a buy confirmation engine. A focus panel scores one contract across five timeframes, a board scans a list of futures markets on one timeframe, and a checklist panel shows which confirmations pass on

Indicator v6 Screeners & dashboardsTrend
Updated 8 days ago · Custom licence GitHub repository of Phantom Flow Futures Screener (Buy Checklist)

A Pine v6 research strategy for slower accumulation on crypto charts. It uses fast and slow trend EMAs, a weekly higher timeframe filter, an RSI accumulation threshold and a multi-timeframe regime cascade. Up to three entries can be added with a minimum bar ga

Strategy v6 TrendSupport & resistance
Updated 12 days ago · MIT GitHub repository of Crypto TA Pro Long Term Hold Companion

MA + R:R Strategy (tuned)

by MuhammadMuhamid
1 stars

A long-only crypto spot strategy variant that makes a multi-timeframe moving average trend the primary entry trigger, with 300-period averages on one-minute and five-minute charts and a rising-slope requirement. Other trend, volume and structure filters are av

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

EMA 20/50 Cross

by quantxaashish
1 stars

This indicator calculates 20-period and 50-period exponential moving averages (EMAs) to identify trend direction and crossover signals. It plots both EMA lines directly on the chart and displays visual shape markers below or above price bars whenever a bullish

Indicator v5 Moving averagesTrend
Updated 2 weeks ago · MIT GitHub repository of EMA 20/50 Cross

Hull Moving Average

by AkashSasikumar47
1 stars

A Pine v6 indicator that plots the Hull Moving Average on the price chart. It is built from weighted moving averages: twice a half-length average minus a full-length average, then smoothed over the square root of the length. This keeps lag low while staying sm

Indicator v6 Moving averagesTrend
Updated 2 weeks ago · MIT GitHub repository of Hull Moving Average

Ichimoku Cloud

by AkashSasikumar47
1 stars

The Ichimoku Cloud indicator plots five lines: Conversion Line, Base Line, Lagging Span, Leading Span A, and Leading Span B, forming a cloud on the price chart. It shows trend and momentum by position relative to the cloud: above green is bullish, below red is

Indicator v6 TrendMoving averages
Updated 2 weeks ago · MIT GitHub repository of Ichimoku Cloud
1 stars

This overlay strategy combines a fast and slow EMA, MACD, and RSI smoothed by an EMA. It opens a long when any one of those three crosses bullish while the other two stay aligned upward, and it opens a short on the matching bearish combination. Trades are limi

Strategy v5 TrendOscillators & momentum
Updated 3 weeks ago · None stated GitHub repository of EMA + MACD + RSI Strategy
1 stars

A gold-oriented overlay that prints buy and sell signals on closed bars. It combines an EMA trend stack, an RSI band, MACD and stochastic RSI triggers, an optional volume filter and a weighted confidence score that must pass a minimum. Stop loss and two take-p

Indicator v5 Oscillators & momentumTrend
Updated 3 weeks ago · None stated GitHub repository of neXQan XAUUSD Gold Indicator
1 stars

A test strategy used to check how a converter handles broker emulation. It goes long when a 9-period EMA crosses above a 21-period EMA and short on the opposite cross. Open longs get a stop and a limit set from ATR multiples, while shorts get an ATR-based trai

Strategy v6 TrendMoving averages
Updated 3 weeks ago · Apache-2.0 GitHub repository of AlphaResin Conformance 3
1 stars

The indicator calculates confirmed pivot highs and lows on up to three user-selectable timeframes using source-timeframe closed bars only. It identifies the nearest resistance above and support below the current price by comparing candidates from each timefram

Indicator v6 Support & resistanceTrend Repaints
Updated 3 weeks ago · MIT GitHub repository of MTF Nearest Support / Resistance

Kernal Cipher 2

by kdricha0602
1 stars

Kernal Cipher 2 is a lower-pane signal panel. It scores trend with fast, slow, and long EMAs, slope, Supertrend, and ADX, then blends WaveTrend, StochRSI, pivot divergence, volume, relative strength versus equity benchmarks, and beta. Green and red diamonds ma

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

Daily Trend Rider

by femibol
1 stars

A long-only swing strategy for daily charts of liquid stocks. It requires several consecutive green closes, a close above the 20 EMA, ADX above a minimum and a bullish SuperTrend, within a price band. Entry is a break of the prior high on volume or a pullback

Strategy v6 TrendBreakout
Updated 6 weeks ago · None stated GitHub repository of Daily Trend Rider

Zimpact Buy/Sell v2

by acquillemac
1 stars

An ATR-based band indicator with a ratcheting SuperTrend line built from RMA of highs and lows. It shows upper and lower bands, an optional outer channel, an optional teal oscillator line, buy and sell signals when direction flips, and two take profit levels a

Indicator v5 TrendVolatility & bands
Updated 6 weeks ago · None stated GitHub repository of Zimpact Buy/Sell v2

Hedge Fund Manager SIGIL

by dwightspitz
1 stars

A strategy that builds simulated Renko bricks from the ATR of a chosen reference symbol, SPY by default, and trades within a set start and end date. It scales position sizes with a factor, keeps a hold percentage, and can add a TRAMA cloud with a percentage ex

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

PowerTrend

by peterdmv
1 stars

PowerTrend is a price-chart overlay that recreates Webby's Power Trend. It plots a configurable EMA and SMA, counts consecutive days the low stays above the EMA and the EMA stays above the SMA, and starts an uptrend when those counts, a rising SMA, and an up c

Indicator v6 TrendMoving averages
Updated 2 months ago · MPL-2.0 GitHub repository of PowerTrend

Basic Trend View

by Alaamo7
1 stars

Basic Trend View is a simple educational indicator from a Pine Script v6 course that colors chart bars based on price direction. It colors bullish bars green when the close is greater than the open, bearish bars red when the close is less than the open, and ne

Indicator v6 Candlestick patternsTrend
Updated 2 months ago · Custom licence GitHub repository of Basic Trend View

Deviation Momentum For Loop

by vedkanani123
1 stars

A separate-pane momentum indicator that measures how far price sits from a selectable moving average and sums that deviation over a for-loop range of lookbacks, from a start to an end value. The result is compared with a long threshold and a short threshold to

Indicator v6 Oscillators & momentumTrend
Updated 2 months ago · None stated GitHub repository of Deviation Momentum For Loop
1 stars

A price-chart indicator built on the UT Bot ATR trailing stop idea, with sensitivity and ATR period inputs and a preset chosen from the chart timeframe. It prints buy and sell labels when price crosses the trailing line and offers an optional line, ribbon fill

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Luxy UT GOD UT-BOT Forecast

APM v7 BTC/USD ALL

by rcaldwell67
1 stars

APM v7 BTC/USD ALL is an indicator that plots three exponential moving averages on the price chart for BTC-USD. It calculates EMA Fast, EMA Mid, and EMA Slow using user-defined lengths. Additional momentum oscillators include RSI, MACD, Stochastic, and CCI. Th

Indicator v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of APM v7 BTC/USD ALL

Adaptive Market Suite

by jayadevrana
1 stars

This indicator bundles four switchable modules, each with its own settings. The first is an adaptive moving average that speeds up in clean trends and shows a trending or ranging read. The second draws volatility bands whose width follows the ATR percentile. T

Indicator v6 TrendVolatility & bands
Updated 2 months ago · Custom licence GitHub repository of Adaptive Market Suite

This strategy calculates multiple technical indicators including EMAs, SuperTrend, ADX, RSI, MACD, Stochastic, and volume MA to generate entry signals for Indonesian stocks. It supports three entry trigger modes: Composite Score, Pullback, and Breakout, with f

Strategy v6 TrendOscillators & momentum
Updated 3 months ago · MIT GitHub repository of Saham: Papan Gerak Strategy By. Akhmfz
1 stars

This strategy applies Gann swing lane signals to generate entries in micro futures instruments. It enforces compounding risk controls that scale take-profit targets upward after wins and downward after losses using configurable ratios. Additional risk manageme

Strategy v6 TrendSessions & time
Updated 4 months ago · None stated GitHub repository of Futures Compounding Machine
1 stars

A Pine v6 strategy variant for 15-minute Bitcoin perpetual charts that trades RSI momentum breakouts with no pyramiding. Entries need RSI to pass set levels plus a gap, with candle color, EMA 200, ATR range and body-size filters, and an optional pullback re-en

Strategy v6 Oscillators & momentumTrend
Updated 4 months ago · None stated GitHub repository of BTC RSI Momentum v22
1 stars

This indicator identifies Smart Money Concepts market structure directly on the price chart. It detects swing points to label higher highs, higher lows, lower lows, and lower highs based on pivot or session seed calculations. The script marks Break of Structur

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 4 months ago · None stated GitHub repository of SMC Market Structure Indicator

Unified Trade Strategy

by ashishgkwd
1 stars

Unified Trade Strategy is the strategy version of a combined signal. It goes long when price breaks above a Nadaraya-Watson envelope band, the fast EMA is above the slow EMA, the trend channel slopes up and RSI is in a bullish rising band; shorts mirror this.

Strategy v6 TrendOscillators & momentum
Updated 4 months ago · None stated GitHub repository of Unified Trade Strategy
1 stars

A strategy version of an ATR pullback scanner. It requires a strong, rising ADX with directional indicators to set the trend direction, and an optional daily SMA 50 and 200 filter. A pullback zone is measured in ATR units from the recent swing. A toggle choose

Strategy v5 TrendCandlestick patterns
Updated 4 months ago · None stated GitHub repository of Trend Scanner Strategy (A/B Test)

This strategy trades long only on the price chart. It enters when price pulls back near the EMA20 and closes back above it, while the MACD line and signal stay above zero and the histogram is not falling. A longer trend EMA must sit below price and the EMA20,

Strategy v6 TrendOscillators & momentum
Updated 4 months ago · MIT GitHub repository of Doc01 MACD Zero Pullback EMA20 - Project Adapted
1 stars

Combines a volume check, a consolidation zone detector and Ichimoku lines on the price chart. Relative volume against a 20-bar average flags high and low volume, bar range and close position describe the candle, and a lookback range under a maximum percentage

Indicator v6 VolumeTrend
Updated 4 months ago · None stated GitHub repository of Wyckoff + Ichimoku IDX Analyzer

Talons Chandelier Exit

by muammeryldrm42
1 stars

A strategy that builds chandelier style stops from the highest high and lowest low over a period minus or plus an ATR multiple. It goes long when close crosses above the short stop with price above a 200 EMA, and short when close crosses below the long stop wi

Strategy v5 TrendVolatility & bands
Updated 5 months ago · None stated GitHub repository of Talons Chandelier Exit
1 stars

The Institutional Levels Dashboard v7 indicator plots multi-timeframe key levels on the price chart including previous day, week, month and quarter highs and lows. It displays labeled lines for these levels plus round number grids, previous same-day high and l

Indicator v6 Support & resistanceScreeners & dashboards Repaints
Updated 5 months ago · Custom licence GitHub repository of Institutional Levels Dashboard v7

Forex EMA Trend with ATR Risk

by PETERSAMUELOPS12
1 stars

A forex strategy that follows a fast and slow EMA crossover, filtered by a 200-period EMA so longs trade only above it and shorts only below. An RSI filter blocks longs when overbought and shorts when oversold, and a session filter limits trading to a chosen w

Strategy v6 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of Forex EMA Trend with ATR Risk

BVortex SP500 4H

by Alberto082544
1 stars

BVortex SP500 4H is a momentum-based trend strategy designed for 4-hour charts. It calculates a scaled Vortex Indicator to detect extreme overbought and oversold zones. Long or short entry signals trigger when exiting these extreme levels with a confirming can

Strategy v6 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of BVortex SP500 4H

Builds several moving averages, including EMA and Hull types, and weights them with an adaptive scheme controlled by a lambda value, a decay percentage and a robustness setting of length sets. The combined result classifies trend as long or short using positiv

Indicator v5 TrendMoving averages
Updated 6 months ago · MIT GitHub repository of Adaptive Trend Classification: Moving Averages
1 stars

A strategy with BTC, gold and custom presets that enters in the direction of the trend when a strong candle breaks the latest swing high or low. Filters include a higher-timeframe trend check, a volume surge, body and range thresholds, a prior consolidation, a

Strategy v6 BreakoutTrend
Updated 6 months ago · None stated GitHub repository of PA Trend Breakout Strategy

EMA + RSI Strategy

by Sandesh30-cloud
1 stars

This trend-following strategy combines two Exponential Moving Averages with the Relative Strength Index to identify long trade setups. It calculates a 50-period fast EMA, a 200-period slow EMA, and a 14-period RSI. A long position is triggered when the fast EM

Strategy v5 TrendOscillators & momentum
Updated 6 months ago · None stated GitHub repository of EMA + RSI Strategy

Algo3.0

by dtheran1
1 stars

A combined overlay for the price chart that joins an ATR Trend module with a smart money concepts module. The trend line is built from an ATR band with ten smoothing types, a fast trend, an optional smoothed range channel and buy and sell markers on trend flip

Indicator v6 TrendSMC / ICT / price action Repaints
Updated 6 months ago · None stated GitHub repository of Algo3.0

Elliott Wave Advanced v3

by Focal-QuantAI
1 stars

An indicator on the price chart that labels Elliott Wave structures from swing points. Primary and optional sub-wave swings are detected with length and minimum percentage move settings, then labelled as impulse waves 1 to 5 and corrective A-B-C patterns, with

Indicator v6 Support & resistanceTrend
Updated 6 months ago · None stated GitHub repository of Elliott Wave Advanced v3

ICT v4-weinkya MTF v2

by tndg16-bot
1 stars

This multi-timeframe strategy identifies trading opportunities by combining higher-timeframe market structure shifts with optimal trade entry Fibonacci levels and lower-timeframe confirmations. It calculates swing pivots on higher timeframes to determine bias,

Strategy v5 SMC / ICT / price actionTrend
Updated 6 months ago · None stated GitHub repository of ICT v4-weinkya MTF v2

BTC ATH Golden Cycle

by ymlee1104
1 stars

This strategy overlays Bitcoin cycle timing, an all-time-high rise and drop model, and optional chart studies on the price chart. It sizes positions as a percentage of equity and allows up to five stacked entries in the same direction. Users can show an EMA ra

Strategy v6 TrendMoving averages Repaints
Updated 7 months ago · None stated GitHub repository of BTC ATH Golden Cycle

Fibonacci Pullback Strategy

by Basant1Saini
1 stars

Fibonacci Pullback Strategy is a trend-following system that identifies retracements within established trends. It calculates dynamic Fibonacci levels (38.2%, 50.0%, and 61.8%) based on recent swing highs and lows over a specified lookback period. Trades are f

Strategy v5 Support & resistanceTrend
Updated 8 months ago · None stated GitHub repository of Fibonacci Pullback Strategy

ARC PinBarAlgo

by Tradehook-org
1 stars

A Pine v5 strategy that trades pin bar candles on the price chart. A pin bar needs a long wick relative to its body and range, a small opposite wick, and an optional required wick side. Optional confirmation uses band, momentum and EMA crossover settings and a

Strategy v5 Candlestick patternsTrend
Updated 8 months ago · None stated GitHub repository of ARC PinBarAlgo

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