Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 2)

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

Strategy-Picker

by hintheman
13 stars

Strategy-Picker evaluates market trend, momentum, and volatility across multiple timeframes (5m, 15m, and 60m) to recommend suitable options trading structures. It combines MACD, an 8-period EMA, and ADX readings with external VIX levels to suggest Put Credit

Indicator v6 TrendVolatility & bands
Updated 2 months ago · Custom licence GitHub repository of Strategy-Picker
13 stars

The Adaptive Trend Finder calculates logarithmic linear regression channels overlaid on the price chart. Operating on the most recent historical bar, it fits a log-transformed regression line and standard deviation bands. It evaluates linear correlation using

Indicator v6 TrendSupport & resistance Repaints
Updated 6 months ago · MIT GitHub repository of Adaptive Trend Finder (log)
13 stars

BitLa Microtendencias A002 is a TradingView strategy that enters long when a 10-period EMA crosses above a 120-period EMA and enters short on the opposite cross. It draws on the price chart and can limit trading to a start and stop date. Risk controls include

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of BitLa Microtendencias A002

Extrema

by CMYKSCRIPTS
13 stars

Extrema is an overlay strategy that evaluates lowest low price points across exponentially scaled lookback periods. It calculates period lengths using exponential math controlled by base, factor, and crop settings, then tracks falling price extremes across mul

Strategy v4 Support & resistanceBreakout
Updated 4 years ago · None stated GitHub repository of Extrema
12 stars

This strategy is titled for Bitcoin on the four-hour chart and is set to draw on the price chart. It detects three-candle fair value gaps and inverted gaps, and it defines a check for price near a gap midpoint within a percentage tolerance. An optional filter

Strategy v6 SMC / ICT / price actionTrend
Updated 4 months ago · None stated GitHub repository of BTC 4h FVG/iFVG Automated Strategy
12 stars

This indicator calculates 12-period and 26-period Exponential Moving Averages (EMAs) and plots them directly on the main price chart. It identifies bullish crossovers and bearish crossunders between the two moving averages, displaying visual buy and sell marke

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of EMA Crossover with Area Fill

Buy and Sell

by azamiftikhar1000
12 stars

This indicator calculates a smoothed average range filter and combines it with a Relative Strength Index framed by Bollinger Bands. It projects range levels, breakout boundaries, and buy or sell signals directly onto the price chart. A custom 20-step color gra

Indicator v4 TrendOscillators & momentum
Updated 3 years ago · None stated GitHub repository of Buy and Sell
11 stars

This overlay indicator marks volume-driven buying and selling pressure on the price chart. It compares volume with a simple moving average scaled by a volatility-based multiplier, and it uses a trend simple moving average plus RSI thresholds to color bars. Swi

Indicator v6 VolumeSupport & resistance
Updated 2 months ago · Apache-2.0 GitHub repository of Institutional Insight Indicator
11 stars

This overlay indicator identifies Smart Money Concepts (SMC) and Inner Circle Trader (ICT) market structure elements directly on the price chart. It detects higher highs, lower lows, Break of Structure (BOS), and Change of Character (CHoCH) labels alongside st

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · Custom licence GitHub repository of Pro Trading V6 - ICT/SMC + MACRO

Breakout Strategy

by JoelPasapera
11 stars

This strategy implements a channel breakout system directly on the main price chart. It calculates highest highs and lowest lows over configurable entry and exit periods using historical candles. A long entry triggers when the close breaks above the entry chan

Strategy v6 BreakoutTrend
Updated 5 months ago · Apache-2.0 GitHub repository of Breakout Strategy
11 stars

This indicator framework backtests trading strategies and generates execution alerts directly from an overlay chart study. It simulates trade entries, fills, stop losses, and take-profit targets across custom or built-in rules, including moving average filters

Indicator v5 TrendMoving averages
Updated 4 years ago · MPL-2.0 GitHub repository of Backtesting-Trading Engine [PineCoders]

This overlay indicator marks Wyckoff-style buying and selling climaxes on the price chart. It filters trend with an exponential moving average and a higher-timeframe EMA, then flags accumulation or distribution when price and ATR sit relative to their swing av

Indicator v6 TrendVolatility & bands
Updated 1 year ago · MIT GitHub repository of Ultimate Wyckoff Indicator V3 (Refined)
10 stars

This indicator combines SuperGuppy exponential moving average ribbons with SuperTrend pivot points in a separate pane screener. It classifies up to twenty assets as neutral, long, strong long, short, or strong short. Fast and slow EMA stacks define trend align

Indicator v4 TrendMoving averages
Updated 4 years ago · MIT GitHub repository of SuperGuppySTPPScreener
10 stars

Accumulation Zones identifies macro accumulation periods specifically geared toward Bitcoin by measuring elapsed time since the genesis block. It calculates a historical bar offset based on the Feigenbaum constant, comparing current closing prices against hist

Indicator v4 Trend
Updated 5 years ago · None stated GitHub repository of Accumulation Zones
10 stars

This indicator calculates three Simple Moving Averages (SMAs) sourced from a user-defined higher timeframe resolution, defaulting to Daily. Intended for 1-hour charts, it plots all three SMAs directly on the price chart and includes built-in alerts for moving

Indicator v4 Moving averagesTrend Repaints
Updated 5 years ago · GPL-3.0 GitHub repository of Alert SMAs 1h (@tradeprophet)

Calculates adaptive arithmetic candles by blending price data with Kaufman Efficiency Ratio smoothing and a linear regression anchor. It measures trend health using a zero-to-hundred Quality Score derived from market efficiency, regression slope, and normalize

Indicator v6 TrendCandlestick patterns
Updated 2 days ago · MIT GitHub repository of Adaptive Arithmetic Candles + Quality Score [WavesUnchained]

ADX Trend Strength - Eterna

by EternaHybridExchange
9 stars

Calculates the Average Directional Index (ADX), Directional Movement Index (DMI), and an Exponential Moving Average to trade strong directional momentum. It enters long when the DI+ line crosses above DI- while ADX exceeds a threshold and price is above the EM

Strategy v5 TrendOscillators & momentum
Updated 7 months ago · MIT GitHub repository of ADX Trend Strength - Eterna

This indicator detects and visualizes Smart Money Concepts (SMC) and Inner Circle Trader (ICT) structures directly on the price chart. It performs multi-timeframe analysis across customizable trend (H1), entry (M15), and micro (M5) timeframes to identify bulli

Indicator v6 SMC / ICT / price actionSupport & resistance

DC Hacendado A

by crissrocca
9 stars

DC Hacendado A is an overlay indicator inspired by Market Cipher A and VuManChu Cipher A. It calculates an eight-line exponential moving average ribbon alongside WaveTrend oscillator conditions, Relative Strength Index measurements, and a custom RSI plus Money

Indicator v4 TrendOscillators & momentum
Updated 3 years ago · MPL-2.0 GitHub repository of DC Hacendado A

HiLo Activator

by rodrigo-brito
9 stars

This indicator plots a HiLo Activator on the price chart. It computes a simple moving average of highs and a simple moving average of lows, each shifted by a user-set number of bars. Direction starts from whether price is below the lower average, then flips do

Indicator v4 TrendMoving averages
Updated 5 years ago · MIT GitHub repository of HiLo Activator

RePaNoCHa V4

by wocclyl
9 stars

RePaNoCHa V4 is an overlay alert indicator that plots a Tillson T3 moving average on the price chart and colors it by whether the line is rising or falling. It combines that slope with a range filter, ADX, parabolic SAR, RSI, and MACD to mark long and short si

Indicator v4 TrendOscillators & momentum
Updated 7 years ago · MIT GitHub repository of RePaNoCHa V4

GainzAlgo V2 Alpha

by Bakomebandias
8 stars

This overlay indicator scores breakouts of recent highs and lows against failed-breakout checks, EMA trend alignment, RSI momentum, and an ATR volatility band. It plots green buy and red sell labels when conditions pass a minimum score, and it prints ATR-based

Indicator v6 TrendOscillators & momentum
Updated 6 months ago · None stated GitHub repository of GainzAlgo V2 Alpha

RSI Crossover

by cleanmind777
8 stars

This strategy evaluates market trends using triple exponential moving averages, a Stochastic RSI oscillator, MACD, Supertrend, and average true range. It plots two EMAs and Supertrend direction directly on the price chart alongside entry shape markers. Long en

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of RSI Crossover
8 stars

Plots institutional price action and smart money concepts directly on the price chart. It detects swing and internal market structures, marking Break of Structure (BOS) and Change of Character (CHoCH) levels, swing points, and strong or weak highs and lows. Th

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 1 year ago · MIT GitHub repository of Price Action Concepts Open Source

Calculates a custom moving average (MaMA) by modifying the source price with price momentum, acceleration, and psychological win-rate probability before applying an EMA or SMA. Plots the adjusted moving average directly on the price chart alongside optional re

Strategy v5 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of Momentum Adjusted Moving Average by DGT
8 stars

This indicator draws a combined bias in a separate pane, aimed at crypto charts. It colors the alert green, red, or white from a linear-regression value and ADX directional movement, using a sensitivity input that tightens or loosens the ADX threshold and slop

Indicator v4 TrendOscillators & momentum
Updated 4 years ago · GPL-3.0 GitHub repository of Linear Regression ADX Eyachay

1-Min Gold Taylor Technique

by eddiebelaval
7 stars

This intraday strategy implements session-based trading rules tailored for gold on short timeframes. It tracks the Asian session price range, VWAP, 20-period EMA, and previous day high and low levels to identify liquidity sweeps during London and New York trad

Strategy v6 Sessions & timeSupport & resistance
Updated 3 months ago · None stated GitHub repository of 1-Min Gold Taylor Technique

ATR Renko

by suyons
7 stars

ATR Renko generates reversal signals on standard price charts by requesting synthetic Renko bar data calculated with an Average True Range box size. It tracks changes in Renko block direction and plots buy labels when a down block transitions to an up block, a

Indicator v6 TrendVolatility & bands
Updated 4 months ago · None stated GitHub repository of ATR Renko
7 stars

This indicator calculates a simple moving average over a specified lookback period using a custom summation loop. It plots the moving average directly on the price chart as a blue line. An alert condition triggers whenever the chosen source price crosses above

Indicator v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Non-Compliant Indicator
7 stars

This strategy plots dynamic pivot-based support and resistance trendlines on the price chart and trades breakouts beyond those lines. By default it allows longs only when EMA 50 is above EMA 200 and an RSI-SMA momentum filter is met, with an ATR entry buffer.

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Easy Trendline - XAUUSD 30m

Our MACD Backtesting

by benniebendiksen
7 stars

This Pine Script strategy computes a MACD indicator with customizable fast, slow, and signal EMA lengths applied to close prices. Delta is calculated as the difference between the MACD line and signal line, plotted as an overlay on the price chart. Long entrie

Strategy v5 Oscillators & momentumMoving averages
Updated 1 year ago · MIT GitHub repository of Our MACD Backtesting

ForexAlgo

by Harshil427
7 stars

ForexAlgo generates trade signals directly on the price chart using a primary leading indicator, such as the Range Filter, combined with modular confirmation filters. Traders can toggle multiple technical filters, including exponential moving average crosses,

Indicator v5 TrendOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of ForexAlgo

This strategy trades EUR/USD breakouts on the price chart using Ichimoku values. It marks a compressed range when the Senkou spans twist and the range height stays under a pip limit. It enters long on a close above the prior range high, or short below the prio

Strategy v4 TrendBreakout
Updated 2 years ago · MIT GitHub repository of Robot Forex BREAKOUT EUR/USD 5MIN - Ichimoku

Combined Strategy

by Dropio12
7 stars

This strategy plots buy and sell markers on the price chart by combining a fast and slow ALMA crossover with a simple close-to-close momentum check. A long marker appears when the fast ALMA crosses above the slow ALMA and momentum is positive. A short marker a

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Combined Strategy

Optimizer v1

by QuantGeekDev
7 stars

This strategy generates long signals on the price chart using multiple technical indicators. It computes EMA 70 and 100, SMA 70, ADX with DMI, CCI, and MACD values. A long entry occurs when EMA crossover condition, SMA condition, ADX above 15, CCI above 30, an

Strategy v5 TrendOscillators & momentum
Updated 3 years ago · None stated GitHub repository of Optimizer v1

SRI Indicator ft. MSB

by kingmalitha
7 stars

This indicator overlays an all-in-one technical analysis toolkit on the price chart. It plots multiple moving averages, including standard EMAs, SMAs, and a Trend Regularity Adaptive Moving Average, alongside Bollinger Bands, Supertrend, Nadaraya-Watson envelo

Indicator v5 Moving averagesTrend Repaints
Updated 3 years ago · None stated GitHub repository of SRI Indicator ft. MSB

Philosopher

by AzureKn1ght
7 stars

Philosopher is an overlay strategy that combines Stochastic momentum calculations, Waddah Attar Explosion volatility signals, and Hull Moving Average baselines to generate trade entries. It utilizes higher-timeframe Hull Moving Averages to evaluate market tren

Strategy v4 TrendOscillators & momentum
Updated 5 years ago · MPL-2.0 GitHub repository of Philosopher

MainScript

by Swastik2000
7 stars

This strategy calculates a Volume-Weighted Average Price (VWAP) with optional standard deviation bands alongside an Exponential Moving Average (EMA) on the main price chart. It is designed to generate buy and sell conditions based on crossovers between the EMA

Strategy v4 TrendMoving averages Repaints
Updated 5 years ago · None stated GitHub repository of MainScript

C41 Core Strategy v2

by damianpitt
6 stars

This strategy plots an EMA or SMA on the price chart and enters long when price is above the average and both RSI and Williams %R meet the long condition, or short when price is below the average and both oscillators meet the short condition. An optional turn

Strategy v6 TrendOscillators & momentum
Updated 8 weeks ago · MIT GitHub repository of C41 Core Strategy v2
6 stars

This strategy identifies long gap-and-go breakout opportunities on intraday US stock charts. It filters equities across three sequential stages: verifying fundamental criteria (minimum three-year average ROCE and market capitalization via financial data reques

Strategy v5 TrendBreakout
Updated 3 months ago · MIT GitHub repository of Quality Trend-Join-Long (gap-and-go)

MarketMerge

by mgnyc11
6 stars

MarketMerge generates an on-chart MarketSurge-style data panel featuring CANSLIM analysis, fundamental metrics, relative strength ratings, and key technical overlays. It calculates composite ratings based on multi-timeframe relative strength against a benchmar

Indicator v6 Screeners & dashboardsMoving averages
Updated 8 months ago · MIT GitHub repository of MarketMerge
6 stars

This strategy evaluates higher-timeframe four-hour ADX momentum and RSI conditions to generate long trades on lower timeframes like 15 minutes. Entries trigger when 15-minute RSI drops relative to four-hour RSI under specific directional strength conditions. P

Strategy v6 TrendOscillators & momentum Repaints
Updated 1 year ago · MIT GitHub repository of Basic Long Entry System

TurtleStrategy_Crypto

by OktayBogazkaya
6 stars

This strategy trades long breakouts of the highest high over a user-set period. It enters when the close is above that prior high and the position is flat, then sizes the order from account equity, a risk percentage, and ATR times a multiplier. It exits when t

Strategy v6 TrendBreakout
Updated 1 year ago · MIT GitHub repository of TurtleStrategy_Crypto

Simple Strategy

by TradersPost
6 stars

Simple Strategy is an educational strategy script designed to demonstrate automated order messaging and webhook alerts. It executes on the main price chart, entering long when the current bar closes above the previous close and entering short when it closes be

Strategy v6 Trend
Updated 1 year ago · None stated GitHub repository of Simple Strategy

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