Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 15)

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

200DMA Entry

by FinDeckDao
3 stars

This strategy plots a 200-period simple moving average on the price chart and opens a long position when the previous bar’s close crosses above that average. Each entry uses one percent of account equity. It closes the position when price reaches 2.5 times the

Strategy v5 TrendMoving averages Repaints
Updated 1 year ago · MIT GitHub repository of 200DMA Entry
3 stars

This strategy combines five selectable mean-reversion and swing trading sub-strategies into a unified system. It generates entry signals based on conditions like Internal Bar Strength drops, consecutive lower closes into Tuesday, multi-day channel breakdowns,

Strategy v5 Mean reversionTrend
Updated 2 years ago · MIT GitHub repository of Mean Reversal Portfolio

EMA+BB+ADX+AO

by mr-s8
3 stars

This strategy plots four EMAs (5, 21, 50 and 200), a Bollinger Band ratio, Awesome Oscillator and ADX on the price chart. It generates long entries when EMA alignment, BB expansion, AO strength and ADX trend strength align, then exits using a percentage-based

Strategy v5 Moving averagesVolatility & bands
Updated 2 years ago · GPL-2.0 GitHub repository of EMA+BB+ADX+AO
3 stars

Fedra Algotrading Strategy Premium is an intraday trend-following strategy designed for sub-30-minute charts. It combines dual moving averages with optional Supertrend, MACD, and market breadth ratio filters to trigger long and short positions. The script incl

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

This strategy overlays Donchian Channels and higher-timeframe exponential moving averages on the price chart to generate trading signals. It calculates an upper, lower, and median Donchian band alongside 240-minute EMAs fetched specifically for BTCUSDT. When p

Strategy v5 BreakoutMoving averages
Updated 4 years ago · CC0-1.0 GitHub repository of Greeffer's Hedge Mode Strategy
3 stars

This strategy detects pivot highs and pivot lows with a left-bar and right-bar window, then filters those swings into higher highs and lower lows. It also derives support and resistance from higher-high, higher-low, lower-low and lower-high points and draws on

Strategy v4 Support & resistanceTrend
Updated 5 years ago · None stated GitHub repository of Higher High Lower Low Strategy Bot

2x MA Moving Average

by piecioshka
2 stars

This indicator plots two customizable moving averages directly on the price chart. Users can select independent lengths, colors, and calculation types, including SMA, EMA, WMA, VWMA, and RMA. When the faster moving average crosses the slower moving average, th

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

52-Week High

by vtnhqw
2 stars

The 52-Week High indicator plots the highest price over an adaptive lookback period of up to 252 trading bars on the price chart. It calculates the 52-week high using the highest high value and displays it as a line with optional label showing distance from th

Indicator v6 Support & resistanceTrend Repaints
Updated 12 days ago · None stated GitHub repository of 52-Week High

This multi-timeframe indicator combines higher-timeframe trend analysis, MACD divergence detection, and short-term oscillator timing to identify trading opportunities on GBPJPY. It evaluates trend direction using a 4-hour EMA, locates MACD divergences with Zig

Indicator v6 DivergenceOscillators & momentum

Trading - Automation

by vishnu-vardhan-d
2 stars

This indicator implements a trailing stop and breakout logic based on average true range calculations, similar to established UT Bot methods converted to Pine Script version six. It plots directional buy and sell labels directly on the price chart alongside a

Indicator v6 TrendVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Trading - Automation

Aurora KAMA Trend

by ZhijuCen
2 stars

This strategy plots Kaufman's Adaptive Moving Average on the price chart and trades when that average rises or falls for a set number of bars. Longs require the close above an optional long-term simple moving average; shorts require the close below it. Directi

Strategy v6 TrendMoving averages
Updated 2 weeks ago · MIT GitHub repository of Aurora KAMA Trend

EMA / SMA MP

by midngtpickle
2 stars

This indicator plots six exponential moving averages, three simple moving averages, and a session volume-weighted average price directly on the price chart. It signals through chart labels triggered by moving average crossovers, including fast and slow exponen

Indicator v6 Moving averagesTrend
Updated 4 weeks ago · Custom licence GitHub repository of EMA / SMA MP
2 stars

Swing Trade Analyzer - S&R Levels identifies key support and resistance levels directly on the price chart using pivot high and low points. It filters duplicate price levels and offers optional multi-timeframe confluence analysis against higher timeframes like

Indicator v6 Support & resistanceTrend
Updated 5 weeks ago · None stated GitHub repository of Swing Trade Analyzer - S&R Levels

Apex Swing System V2.5

by omharde42
2 stars

This indicator combines a 200-period simple moving average, relative strength index, and Ichimoku cloud components to evaluate market conditions and generate bullish and bearish signals. It plots fixed trade levels including entry, stop loss, and multiple targ

Indicator v6 TrendOscillators & momentum
Updated 7 weeks ago · None stated GitHub repository of Apex Swing System V2.5
2 stars

GEO P Momentum Buy/Sell Signals is an indicator that identifies trade setups by combining Bollinger Band challenge logic with trendline or range breakouts. It evaluates price structure using multi-timeframe Tide and Wave hierarchy alongside RSI, DMI, ADX, EMA

Indicator v6 TrendOscillators & momentum
Updated 8 weeks ago · None stated GitHub repository of GEO P Momentum Buy/Sell Signals

Qtus SMC-Sniper AutoTrader v2 is an automated trading strategy plotted on the price chart that combines Smart Money Concepts (SMC), ICT frameworks, price action patterns, and technical indicators into a multi-factor scoring engine. It enters long or short posi

Strategy v6 SMC / ICT / price actionTrend
Updated 2 months ago · Custom licence GitHub repository of Qtus SMC-Sniper AutoTrader v2

Alertatron-KSM Demabot 2H

by danielvm-git
2 stars

This strategy calculates up to three Double Exponential Moving Averages (DEMA) and plots them on the main price chart. It executes long entries when the fast DEMA crosses above the medium DEMA while confirming the direction of an optional third DEMA, and enter

Strategy v4 Moving averagesTrend
Updated 2 months ago · MIT GitHub repository of Alertatron-KSM Demabot 2H

Kell + Minervini VCP

by mirkothepirko
2 stars

This price-chart indicator combines Oliver Kell moving-average phases with Minervini volatility contraction. It plots EMA 10, 20, 50 and 200 and can require the SMA 50, 150 and 200 trend template. It flags a wedge pop above EMA 10 after an EMA 20 cross, pullba

Indicator v6 TrendMoving averages
Updated 3 months ago · Custom licence GitHub repository of Kell + Minervini VCP

SMC Major Pairs Strategy

by middlechild0
2 stars

This strategy identifies trend alignments and Smart Money Concept (SMC) setups across major currency pairs and gold. It calculates a customized Q-Trend filter combined with higher-timeframe trend confirmation, liquidity sweep detection, swing points, and fair

Strategy v6 SMC / ICT / price actionTrend
Updated 5 months ago · None stated GitHub repository of SMC Major Pairs Strategy
2 stars

This overlay indicator maps a US equity day-trading framework of levels, trend, and patience candles onto the price chart. It plots 8 and 21 SMAs, higher-timeframe 200 SMAs, VWAP, the last five days of premarket highs and lows, and the 9:30–9:45 opening range.

Indicator v6 TrendMoving averages Repaints
Updated 6 months ago · None stated GitHub repository of Day Trading Strategy v2

ALGOX

by thino-dev
2 stars

ALGOX is a Pine Script v5 strategy that overlays SuperTrend, ATR bands, Heikin Ashi candles, EMA ribbons and an RSI table on the price chart. It generates long and short entries based on signal sensitivity settings with optional lower-timeframe or higher-timef

Strategy v5 TrendVolatility & bands Repaints
Updated 7 months ago · None stated GitHub repository of ALGOX

Liquidity Sweep Scalper v2

by godlesscherry
2 stars

Liquidity Sweep Scalper v2 is a scalping strategy that detects liquidity sweeps using Supertrend trend filters, Bollinger Bands for volatility, Williams Fractals for pivots, and MACD momentum. It enters on rejection candle breaks after sweeps and exits via sto

Strategy v6 TrendOscillators & momentum
Updated 7 months ago · None stated GitHub repository of Liquidity Sweep Scalper v2

MACD & Anchored VWAP Strategy

by adminalphabots
2 stars

This strategy enters long when the MACD line crosses above its signal, price is above a rolling VWAP, and ADX is at least the minimum trend strength. It enters short on the opposite MACD cross when price is below that VWAP and ADX meets the same threshold. Set

Strategy v5 Oscillators & momentumVolume Repaints
Updated 8 months ago · MIT GitHub repository of MACD & Anchored VWAP Strategy

This indicator evaluates market conditions across four user-defined timeframes by combining RSI, MACD crossovers, triple EMA trend filters, Bollinger Band boundaries, and volume spikes. It computes aggregate bullish and bearish scores, plotting buy and sell si

Indicator v5 Screeners & dashboardsOscillators & momentum
Updated 8 months ago · None stated GitHub repository of Multi-Timeframe Trade Signal Indicator

ATR Rope

by regalouisei
2 stars

This overlay indicator smooths a chosen price source with a rope-style range filter. It moves the line only when price travels beyond an ATR length multiplied by a user multiplier, then colors the rope up, down, or flat from its slope and from source crosses.

Indicator v6 TrendVolatility & bands
Updated 8 months ago · None stated GitHub repository of ATR Rope

Market Structure - Clean & Objective

by ifreddyman2014-tech
2 stars

The script identifies and plots market structure components directly on the price chart using confirmed pivot highs and lows. It classifies swing points into Higher Highs, Higher Lows, Lower Highs, and Lower Lows while detecting Break of Structure (BOS) and Ch

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 8 months ago · None stated GitHub repository of Market Structure - Clean & Objective

QQE + AK Trend + EFI

by realanthonyc
2 stars

This indicator computes and plots a QQE histogram using RSI of the chosen source smoothed with Wilder's ATR method, alongside an AK Trend line derived from fast EMAs with dynamic scale factors adjusted by timeframe. It also calculates Elder Force Index with ad

Indicator v6 TrendOscillators & momentum
Updated 11 months ago · MPL-2.0 GitHub repository of QQE + AK Trend + EFI

EMA Trend Surfer

by nxtaiapp
2 stars

This multi-timeframe strategy identifies trend direction using fast and slow exponential moving averages from a higher timeframe while seeking trade entries on a lower timeframe. Trend signals are filtered using minimum EMA percentage separation, an optional A

Strategy v5 TrendMoving averages
Updated 11 months ago · MIT GitHub repository of EMA Trend Surfer

This strategy generates trade entries by combining up to five normalized 0-100 technical indicators: Relative Strength Index (RSI with divergence detection), Stochastic RSI, Money Flow Index (MFI), Relative Volatility Index (RVI), and Average Directional Index

Strategy v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · None stated GitHub repository of TLC 0TO100 Five Indicators Strategy

The AI SuperTrend x Pivot Percentile strategy combines SuperTrend trend following with KNN-based AI predictions, Pivot Percentile levels, and ADX/DMI filtering. SuperTrend indicators run on multiple higher timeframes with configurable lengths and factors, whil

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of AI SuperTrend x Pivot Percentile - Strategy

Trend Analyzer EMA Only

by panzmoravylab
2 stars

Trend Analyzer EMA Only compares a fast and a slow exponential moving average on the price chart and labels the state uptrend, downtrend, or neutral. A buy or sell signal appears when the fast average crosses the slow average while both slopes agree and their

Indicator v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Trend Analyzer EMA Only

Calculates a long-term Exponential Moving Average as a baseline for fair value alongside a Relative Strength Index. Generates long entry signals when the close price trades at least five percent below the moving average while the RSI is oversold. Exits trades

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · MIT GitHub repository of Buffett-Inspired Value Strategy

ADR label

by etnt
2 stars

This indicator calculates and displays the Average Daily Range percentage alongside a Mark Minervini Trend Template score in an on-screen table. It evaluates moving average alignments, 52-week price extremes, and moving average slope criteria to generate a Tre

Indicator v6 Screeners & dashboardsTrend
Updated 1 year ago · MPL-2.0 GitHub repository of ADR label
2 stars

Multi-Indicator Trading System is a price chart overlay indicator that combines exponential moving averages, MACD, RSI, and multi-timeframe Ichimoku cloud analysis. It evaluates local timeframe indicators alongside higher timeframe trend filters to generate bu

Indicator v5 TrendOscillators & momentum
Updated 1 year ago · MIT GitHub repository of Multi-Indicator Trading System

This overlay indicator marks swing highs and lows, then draws supply and demand boxes around points of interest. It labels higher highs, lower highs, higher lows, and lower lows, and can show break-of-structure and point-of-interest labels plus an optional zig

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of FluidTrades - SMC Lite + Moving Average Ribbon
2 stars

Parabolic SAR Strategy executes buy and sell orders based on Parabolic SAR trend flips, filtered by customizable technical indicators. Traders can enable an RSI momentum filter, a configurable moving average trend baseline, and an ADX strength threshold. Posit

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · MIT GitHub repository of Parabolic SAR Strategy

Bitcoin Momentum Strategy

by Web3Degenerate
2 stars

This strategy enters long positions when price trades above a higher-timeframe exponential moving average and momentum conditions are clear. It avoids new entries during volatility caution periods, which trigger when pullbacks exceed specified Average True Ran

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Bitcoin Momentum Strategy
2 stars

This indicator plots the Vortex Indicator and the Relative Strength Index together in a separate pane. It calculates VI+ and VI- from absolute high-low ranges over a shared length, then draws RSI from a chosen source with a selectable SMA or EMA of the RSI. Ho

Indicator v5 Oscillators & momentumTrend
Updated 2 years ago · MIT GitHub repository of Combined Indicator RSI, Vortex

Saty ATR Levels

by mikah13
2 stars

Saty ATR Levels calculates projected support, resistance, trigger, and target levels overlaid on the price chart using Average True Range and Fibonacci ratios. It supports multiple trading modes, including Day, Multiday, Swing, Position, and Long-term options.

Indicator v5 Volatility & bandsSupport & resistance Repaints
Updated 2 years ago · None stated GitHub repository of Saty ATR Levels
2 stars

This indicator plots a Nadaraya-Watson kernel estimate of the selected source on the price chart and draws upper and lower envelopes around it. A Gaussian window weights nearby bars. Bandwidth sets how wide that smoothing is, and a multiplier scales the mean a

Indicator v5 TrendVolatility & bands Repaints
Updated 2 years ago · None stated GitHub repository of Nadaraya-Watson Envelope [LuxAlgo]
2 stars

This strategy calculates the built-in Supertrend indicator using customizable ATR length and factor multiplier parameters, plotting the trend lines and colored fills directly on the price chart. It executes a long order when the Supertrend direction flips to b

Strategy v5 TrendVolatility & bands
Updated 3 years ago · None stated GitHub repository of 슈퍼트렌드 전략

Smart Money Concepts [LuxAlgo]

by srinivas-yarramsetti
2 stars

This indicator plots Smart Money Concepts elements on the price chart including internal and swing order blocks, bullish and bearish structures with BOS and CHoCH breaks, fair value gaps, equal highs and lows, and swing points. It can color candles according t

Indicator v5 SMC / ICT / price actionCandlestick patterns Repaints
Updated 3 years ago · None stated GitHub repository of Smart Money Concepts [LuxAlgo]

This indicator overlays a Supertrend calculation with filled trend zones and ATR-based premium or discount offset lines directly on the price chart. Upon direction changes in the Supertrend, it identifies highest highs and lowest lows during the preceding tren

Indicator v5 TrendSupport & resistance
Updated 3 years ago · None stated GitHub repository of [JL] Supertrend Zone Pivot Point with Zigzag Fib
2 stars

This trend-following strategy plots an 8-period WMA on close prices, a 10-period WMA on open prices, a 100-period Hull Moving Average, and a VWAP EMA overlay on the price chart. It enters long when the fast WMA crosses above the slow WMA while above the HMA fi

Strategy v5 TrendMoving averages
Updated 3 years ago · None stated GitHub repository of [CBB] LWMA OCx 8/10 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