Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 44)

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

257 stars

This strategy overlays a volume-weighted moving average of open prices and standard-deviation bands on the ES futures chart, aimed at the one-minute timeframe. It requests open and low from several higher timeframes with lookahead enabled. Percentage inputs se

Strategy v5 Volatility & bandsMoving averages Repaints
Updated 7 weeks ago · None stated GitHub repository of ES - Futures 1M No repaint

Dead Cat Bounce

by TradersPost
228 stars

Calculates consecutive bar sequences that fail to create new price extremes and identifies potential reversal breakout points. When a run breaks, the script plots measured move projection arrows, high-water mark lines, and Fibonacci levels directly on the pric

Strategy v6 BreakoutMean reversion
Updated 3 months ago · None stated GitHub repository of Dead Cat Bounce

Aroon-based Strategy

by capissimo
114 stars

This indicator overlay generates buy and sell signals based on Aroon extreme levels combined with optional volume or volatility filters. It calculates Aroon Up and Aroon Down lines using localized high and low lookbacks, generating trade entries when Aroon rea

Indicator v4 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Aroon-based Strategy
106 stars

This strategy plots 50-, 100- and 200-period simple moving averages on the price chart. After a user-chosen start date, it enters a long position when the 50-period average crosses above the 100-period average, using 100 percent of equity. A short order is cod

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of 50/100/200 Moving Average Strategy

Calculates and plots an Autoregressive Finite Impulse Response (AFIRMA) moving average directly on the price chart. It weights historical price data using selectable windowing functions, including Hanning, Hamming, Blackman, and Blackman-Harris filters. An opt

Indicator v6 Moving averagesTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Autoregressive FIR Moving Average (AFIRMA)

Strategy Template

by iamrichardD
57 stars

This strategy template implements an EMA trend filter paired with MACD momentum confirmations. Long positions trigger when the fast EMA is above the slow EMA alongside a bullish MACD crossover and positive histogram, while short positions require the reverse.

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · Apache-2.0 GitHub repository of Strategy Template
16 stars

Seykota Alt 21: Breakeven Lock is a trend-following breakout strategy based on Donchian channels and ATR position sizing. It enters positions on Donchian channel breakouts and scales in up to multiple units as price moves in favor. The system moves stop losses

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 21: Breakeven Lock

This strategy plots an ATR Chandelier trailing stop on the price chart and tracks a directional trend state. It marks confirmed flips, weak body-rejected flips, and wick traps, and colors bars as price nears warning or danger zones around the flip trigger. Ada

Strategy v6 TrendVolatility & bands
Updated 3 days ago · MIT GitHub repository of Chandelier Flip Radar [WavesUnchained]

Quantum Structure | jjart

by MeridianAlgo
9 stars

This indicator analyzes market structure and identifies key swing highs, swing lows, and consolidation ranges across multiple timeframes. It automatically adapts swing lengths and consolidation thresholds according to chosen profiles for scalping, intraday, or

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 4 months ago · MIT GitHub repository of Quantum Structure | jjart
8 stars

MA+ATR+ADX+PP Strategy combines configurable moving averages with an ADX-modulated ATR volatility band to generate trading signals directly on the price chart. It allows traders to select between eight moving average types, including SMA, EMA, Hull, and Tilson

Strategy v4 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of MA+ATR+ADX+PP Strategy

ADX Dots

by lunarticktrading
7 stars

This indicator evaluates trend strength by calculating the Average Directional Index (ADX) and plotting colored dots at a fixed horizontal level in a separate pane. The color of each dot dynamically indicates whether the trend is weak, medium, or strong based

Indicator v6 Trend
Updated 2 weeks ago · None stated GitHub repository of ADX Dots

Pulse Mean Accelerator

by eddiebelaval
7 stars

This indicator overlays a dynamic moving average on the price chart by adjusting a baseline mean with a pulse acceleration factor. It measures rate of change differences between price and the moving average, scaling the displacement by volatility via standard

Indicator v6 TrendMoving averages
Updated 3 months ago · None stated GitHub repository of Pulse Mean Accelerator
7 stars

This long-only strategy identifies pullback opportunities within a broader trend. It enters a long position when the closing price trades above a long-term exponential moving average while falling below a short-term exponential moving average. Once in a trade,

Strategy v5 TrendMoving averages
Updated 1 year ago · MPL-2.0 GitHub repository of Pullback Strategy for Stocks

Cerebr

by jerryinyang
5 stars

Cerebr is a multi-timeframe trend-following strategy that combines Hull Moving Average (HMA), SuperTrend, and MACD indicators to generate trading signals. Users can individually toggle each component and adjust parameters such as the higher timeframe HMA perio

Strategy v4 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Cerebr
5 stars

This strategy plots a short and a long exponential moving average on the price chart and opens long trades only. A long entry needs a recent close cross above the short average, a bullish candle still above it, and the short average above the long average. It

Strategy v4 TrendMoving averages
Updated 3 years ago · Apache-2.0 GitHub repository of 50 EMA + 200 EMA Long Strategy (H)

EMA Ribbon [trugurpala]

by trugurpala
4 stars

This indicator calculates eight Exponential Moving Averages with Fibonacci lengths ranging from 8 to 233. It plots all eight EMAs on the price chart and dynamically colors them green during bullish alignment (when the fastest EMAs are stacked sequentially abov

Indicator v6 Moving averagesTrend
Updated 2 months ago · MIT GitHub repository of EMA Ribbon [trugurpala]

UMURLU-5-8-13-X

by Kalumur
4 stars

UMURLU-5-8-13-X overlays three exponential moving averages (5, 8, and 13 EMAs) alongside dual Bollinger Bands with narrow and wide standard deviation multipliers directly on the price chart. It generates visual signal labels on the chart when the 5-period EMA

Indicator v5 Moving averagesVolatility & bands
Updated 2 years ago · None stated GitHub repository of UMURLU-5-8-13-X
4 stars

The SnagProfit Trending 1H indicator calculates EMA crossovers using periods 5, 10 and 20 on the close price to identify bullish and bearish trend conditions. It draws a table panel on the chart that labels long trend status as OK CALL or NO CALL. The indicato

Indicator v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of SnagProfit Trending 1H

This indicator evaluates multiple technical trading strategies and strategy combinations across various timeframes to identify the top-performing setup for Turkish stocks and other assets. Depending on whether the active chart is intraday or higher timeframe,

Indicator v5 Screeners & dashboardsTrend
Updated 2 days ago · None stated GitHub repository of Otomatik En İyi Strateji - BIST

Jash Test

by jash-git
3 stars

This indicator plots five exponential moving averages of Fibonacci lengths on the price chart: 3 and 13 as fast lines, 34 and 55 as slow lines, and 144 as a filter. They are drawn in red, orange, blue, purple, and black. The visible code also counts how many o

Indicator v5 TrendMoving averages
Updated 4 weeks ago · None stated GitHub repository of Jash Test
3 stars

Identifies continuation trade setups based on Beat the Market Maker (BTMM) second-leg patterns directly on the price chart. It defines trading session phases across Asian, London, and New York sessions, filters impulse legs using fast and slow exponential movi

Indicator v5 SMC / ICT / price actionSessions & time
Updated 1 year ago · None stated GitHub repository of BTMM Second Leg Confirmation
3 stars

This strategy is written for NVIDIA stock and overlays the price chart. It opens a long when price crosses above an exponential moving average, the rate of change is positive, and the average true range exceeds the previous daily ATR. It closes that long when

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of NVDA Buy/Sell Strategy

Currency Strength Chart

by itmakesyousick
3 stars

The Currency Strength Chart calculates and plots relative currency strength values for major forex currencies in a separate pane. Calculations can be based on raw price action, RSI, CCI, or Stochastic oscillators, smoothed with various moving average types. Us

Indicator v5 Oscillators & momentumTrend
Updated 4 years ago · None stated GitHub repository of Currency Strength Chart
2 stars

EMD Trend calculates trend direction by combining moving averages with an exponential moving deviation filter. Rendered as an overlay on the main price chart, it generates visual long and short trend signals and offers optional bar coloring. It includes an on-

Indicator v6 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of EMD Trend [InvestorUnknown]

Previous Candle Theory

by wynnforthework
2 stars

This strategy enters trades based on consecutive candle directions relative to a chosen moving average filter. It triggers a long entry when both the current and previous candles close bullish above the moving average, and a short entry when both candles close

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Previous Candle Theory

Quick Stats

by etnt
2 stars

Quick Stats displays key trading metrics directly on the price chart overlay. It calculates Mark Minervini's Trend Template rules by scoring moving average alignments (50, 150, and 200 SMAs), 200 SMA slope, and 52-week high/low proximities. Additionally, it co

Indicator v5 TrendVolatility & bands
Updated 1 year ago · MPL-2.0 GitHub repository of Quick Stats

Moving Average Color Filter

by Web3Degenerate
2 stars

This indicator calculates an Exponential Moving Average (EMA) and plots it directly on the main price chart. It dynamically changes the color of the EMA line based on the relationship between the current closing price and the moving average value. The line tur

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Moving Average Color Filter

Custom ZZ v1.0

by WISEPLAT
2 stars

This indicator plots a custom ZigZag line connecting extreme high and low points on the price chart whenever price reverses by more than a specified percentage. It uses arrays to track these points based on close prices and a chosen lookback length. The script

Indicator v4 TrendSupport & resistance
Updated 3 years ago · None stated GitHub repository of Custom ZZ v1.0

Range + Trend Strategy

by DaniilOkrug
2 stars

This strategy calculates support and resistance lines by identifying pivot highs and pivot lows over configurable left and right lookback periods. It computes linear slope and intercept values to project dynamic trend lines on the main price chart. Optional ta

Strategy v4 TrendSupport & resistance Repaints
Updated 4 years ago · MIT GitHub repository of Range + Trend Strategy

Drawing Chartpoint Trendline

by pineforge-4pass
1 stars

Drawing Chartpoint Trendline is a strategy that calculates a 20-period simple moving average to dynamically construct a trendline using chart points between past SMA values. It extracts the projected line price at the previous bar as a reference level on the p

Strategy v6 Moving averagesSupport & resistance
Updated 7 days ago · Apache-2.0 GitHub repository of Drawing Chartpoint Trendline

This trading strategy generates scalping entries by combining exponential moving averages with momentum and trend filters. It triggers long or short trades when the short EMA crosses the long EMA, provided RSI, MACD, ADX trend strength, and Stochastic levels c

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · Custom licence GitHub repository of Ultimate Scalping PRO Legend Pro

Momentum Cascade

by vedkanani123
1 stars

A separate-pane momentum indicator by Lyro RS that computes rate of change over an adjustable length and passes it through three EMA stages, described as instant, reactive and committed. A trend is flagged only when all three stages agree. It can show signals

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

Corpus Array Basic State is a strategy designed to demonstrate state tracking using Pine Script arrays. It calculates a 20-period exponential moving average (EMA) and populates an array with closing prices during the initial bars. The strategy enters a long po

Strategy v5 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Corpus Array Basic State

Keltner Hull Suite

by ymlee1104
1 stars

This overlay indicator draws a volume-weighted trend line and ATR bands on the price chart. It marks a bullish or bearish state when close moves outside those bands and keeps the previous state while price stays between them. Users can show a filled cloud or o

Indicator v6 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of Keltner Hull Suite

Chandelier Exit

by Basant1Saini
1 stars

This strategy calculates ATR-based Chandelier Exit bands anchored to highest and lowest price extremes, plotting trailing stop levels directly on the price chart. It enters long or short positions when price crosses opposite bands, subject to an optional 200-p

Strategy v5 TrendVolatility & bands
Updated 8 months ago · None stated GitHub repository of Chandelier Exit

Matrix Scalper Algo

by Tradehook-org
1 stars

A Pine v5 indicator that combines a higher-timeframe trend with a short-term entry on the price chart. The trend is a fast EMA above or below a slow EMA on a chosen higher timeframe, shown as a background color. An entry marks when price crosses a 9-period EMA

Indicator v5 ScalpingTrend Repaints
Updated 8 months ago · None stated GitHub repository of Matrix Scalper Algo

[e2] Setup

by amico1234
1 stars

Calculates and plots sequential countdown setups similar to DeMark TD Setup, tracking price flips with a configurable lookback and count limit directly on the price chart. It identifies completed counts, perfection, intersections, and multi-setup occurrences s

Indicator v4 Support & resistanceTrend
Updated 2 years ago · None stated GitHub repository of [e2] Setup

Efficiency Ratio

by JohnsonHsiao
1 stars

Efficiency Ratio measures market efficiency and trend strength over a configurable rolling window by dividing net price displacement by the sum of absolute bar-by-bar price changes. It plots the calculated ratio as an oscillator in a separate pane alongside ho

Indicator v5 TrendOscillators & momentum
Updated 3 years ago · None stated GitHub repository of Efficiency Ratio

ETHUSDT Binance 5m

by tseitz
1 stars

The script calculates multiple offset VWAP lines alongside Doji candle filters to generate trading signals on a five-minute cryptocurrency chart. It identifies bullish entry conditions when non-Doji green candles break above upper VWAP thresholds, and bearish

Strategy v4 Moving averagesCandlestick patterns
Updated 4 years ago · None stated GitHub repository of ETHUSDT Binance 5m
947 stars

The Adaptive Laguerre Filter calculates a smoothed, dynamically adjusted trendline plotted directly on the main price chart. It dynamically adjusts its damping factor (alpha) based on recent price range variations and median percentile calculations over a spec

Indicator v4 TrendMoving averages
Updated 12 days ago · GPL-3.0 GitHub repository of Adaptive Laguerre Filter
330 stars

This strategy plots a Supertrend line from ATR length and factor, plus a single EMA, on the price chart. It enters long when Supertrend turns bullish or while the trend is bullish and price crosses back above the EMA below the last entry price. Short entries m

Strategy v5 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Supertrend + EMA rebound [Alorse]

STRG-Kijun

by harryguiacorn
220 stars

STRG-Kijun is an Ichimoku-based trend-following strategy that generates trading signals when the Kijun-sen (base line) changes slope direction. It plots the standard Ichimoku cloud, baseline, lagging span, and directional signal arrows directly on the price ch

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of STRG-Kijun

5212 EMA Strategy

by hasnocool
106 stars

This strategy combines a triple exponential moving average system with a Stochastic RSI oscillator to identify trend-following entry opportunities directly on the price chart. It plots 50, 100, and 200-period EMAs while computing smoothed Stochastic RSI values

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of 5212 EMA Strategy

The indicator calculates the Average Directional Movement Index (ADX) along with +DI and -DI lines to measure trend strength and direction. It plots ADX, +DI and -DI in a separate pane on the chart. The main setting is the period length for smoothing, defaulti

Indicator v6 TrendOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Average Directional Movement Index (ADX)
56 stars

An overlay indicator that plots dynamic trendlines and support/resistance channels on the price chart. It detects pivot high and low points across a configurable lookback period to draw S/R zones and calculate trendline slopes using ATR, standard deviation, or

Indicator v5 Support & resistanceTrend Repaints
Updated 2 months ago · None stated GitHub repository of Trendline Support Resistance 2024
47 stars

The Convolution Moving Average (CONV) indicator calculates a smoothed price series via FIR convolution with a custom kernel. It plots the CONV value as an overlay line directly on the price chart. The main input allows selecting any source series while the ker

Indicator v6 Moving averagesTrend
Updated 8 months ago · MIT GitHub repository of Convolution Moving Average (CONV)

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