Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 62)

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

This strategy executes long positions based on a fast and slow exponential moving average crossover. It manages open positions using an ATR-based stop loss, an optional maximum percentage loss floor, a percentage-based profit target, and a dedicated management

Strategy v5 TrendMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of EMA Crossover ATR Strategy v2

Price Action Trading 策略

by wynnforthework
2 stars

Calculates and plots a customizable moving average alongside trailing ATR bands, forming the Profit Maximizer trend-following framework. It supports multiple moving average algorithms including EMA, ZLEMA, VAR, and TSF, alongside configurable ATR multipliers.

Strategy v4 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Price Action Trading 策略
1 stars

This strategy enters long positions every Monday at 00:00 UTC on the 15-minute chart. It computes quantity as 10 percent of current equity divided by the bar close, rounded to three decimal places for stability. Market orders open the position and it flattens

Strategy v6 TrendMean reversion
Updated 7 days ago · Apache-2.0 GitHub repository of Parity probe 05 - small equity fraction
1 stars

A strategy that enters on a liquidity sweep and reclaim of a stored swing level, gated by trend and momentum filters. Trend uses EMAs, ADX, DI alignment and a confirmed higher-timeframe EMA check, and momentum uses ROC and balance of power. Cleaner overlay ext

Strategy v6 TrendSMC / ICT / price action Repaints
Updated 8 days ago · GPL-3.0 GitHub repository of Sweep Trend Continuation + SVP

DEPV2 DEBUG S36

by YuceSezar89
1 stars

DEPV2 DEBUG S36 is a multi-symbol quantitative research indicator rendered in a separate pane. It evaluates market conditions across up to twenty cryptocurrency pairs by combining four distinct analytical dimensions: trend, momentum, volatility, and volume. Us

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S36
257 stars

This indicator detects a large set of classic candlestick patterns and plots colored labels on the price chart. Trend context uses a 50-period simple moving average, or the 50 and 200 averages stacked together, and can be switched off. Users filter bullish, be

Indicator v4 Candlestick patternsTrend
Updated 7 weeks ago · None stated GitHub repository of Snag - All Candlestick Patterns

Kalman Filter (KF)

by mihakralj
47 stars

The Kalman Filter (KF) calculates a recursive state estimation to smooth price data and reduce noise on the main chart. It continuously updates state and error covariance estimates by balancing process noise against measurement noise via the Kalman gain. Users

Indicator v6 Moving averagesTrend
Updated 8 months ago · MIT GitHub repository of Kalman Filter (KF)

Falling Window - Bearish

by TWODS-CAPITAL
37 stars

This indicator identifies the bearish falling window candlestick pattern, a two-candle continuation setup where a downward price gap occurs during a downtrend. It validates the pattern when the current bar's high is strictly lower than the previous bar's low u

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Falling Window - Bearish

Ruckard AndresAristizibal Joya D003 is an automated crypto trading strategy that evaluates entry and exit signals using a combination of Trend Indicator A-V2, Supertrend, and QQE Mod, alongside customizable Curie closing moving average filters. The script exec

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Ruckard AndresAristizibal Joya D003
7 stars

This indicator plots a zero-lag EMA center line with ATR bands on the price chart. It marks bullish or bearish mode after closes stay beyond a band for a set number of bars and the center line slopes that way. Confirmed buy and sell labels appear only after th

Indicator v6 TrendMoving averages Repaints
Updated 3 months ago · None stated GitHub repository of GK Trend Ribbon SWING + PREPARE HUD
3 stars

This strategy overlays three Simple Moving Averages, one Exponential Moving Average, and a dynamic trailing swing line directly on the price chart. It determines market direction by tracking recent highest highs and lowest lows over a customizable swing period

Strategy v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of EMA Crossover Scott Strategy
2 stars

This strategy plots period high and low breakout bands on the price chart and trades breaks of those bands. It goes long when price closes above the upper band while that band is above a simple moving average, and short on the opposite setup. Position size is

Strategy v4 TrendBreakout
Updated 1 year ago · None stated GitHub repository of Trend #1 - ATR+Breakout high/low

Ichimoku Cloud

by Web3Degenerate
2 stars

This indicator calculates and overlays standard Ichimoku Cloud components on the price chart, including the Conversion Line, Base Line, Lagging Span, and Leading Spans A and B. It imports an external library to detect candlestick patterns like hammers and shoo

Indicator v5 TrendSupport & resistance
Updated 2 years ago · None stated GitHub repository of Ichimoku Cloud
1 stars

A strategy with one entry type, a liquidity sweep and reclaim of a stored swing level, allowed only when trend and momentum filters agree. The trend filter uses a fast and slow EMA, a minimum ADX, DI alignment and an optional confirmed higher-timeframe EMA che

Strategy v6 TrendSMC / ICT / price action Repaints
Updated 8 days ago · GPL-3.0 GitHub repository of Sweep Trend Continuation Strategy

DEPV2 DEBUG S37

by YuceSezar89
1 stars

DEPV2 DEBUG S37 is a separate-pane indicator that watches up to twenty user-chosen symbols, defaulting to Binance perpetual crypto pairs. It forms directional signals from four method classes: trend, momentum, volatility, and volume. Modes use one class, requi

Indicator v6 Screeners & dashboardsTrend Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S37

CODEX NO1 Flip Engine v2

by vedkanani123
1 stars

A confirmed-close trend flip indicator on the price chart, where BUY exits a short and enters long and SELL does the reverse. It uses an ATR trail, a zero-lag EMA for fast structure and a slow baseline, plus ADX, choppiness, efficiency and RSI inputs. An optio

Indicator v6 TrendVolatility & bands Repaints
Updated 2 months ago · None stated GitHub repository of CODEX NO1 Flip Engine v2
1 stars

This strategy calculates a composite rating from a TechnicalRating library using moving averages and oscillators. It plots signals directly on the price chart. The ratingSignal setting selects which components to base the signal on: MAs, Oscillators, or All. W

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Technical Ratings Strategy

SlimTrades 2h

by tseitz
1 stars

SlimTrades 2h is an intraday strategy overlaying short-term high and low price channels alongside momentum measurements from MACD and RSI. It tracks local highs and lows over a user-defined lookback period, plotting them directly on the price chart. The script

Strategy v4 TrendOscillators & momentum
Updated 4 years ago · None stated GitHub repository of SlimTrades 2h

Schaff Trend Cycle

by everget
947 stars

This indicator plots the Schaff Trend Cycle in a separate pane. It subtracts a slow exponential moving average from a fast one, applies a stochastic cycle twice, and smooths each result to form a 0–100 oscillator. Line color follows the slope, or the upper and

Indicator v4 Oscillators & momentumTrend
Updated 12 days ago · GPL-3.0 GitHub repository of Schaff Trend Cycle
99 stars

This indicator calculates the Directional Movement Index from true range and plus and minus directional movement, smoothed with Wilder's compensated RMA. It plots the DX line together with plus DI and minus DI in a separate pane and draws a dashed horizontal l

Indicator v6 Trend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Directional Movement Index (DX)

This strategy plots on the price chart and combines Trend Indicator A-V2, Supertrend, and QQE Mod to choose long or short entries. Optional start and stop times limit when it trades. Percentage take profit and stop loss are enabled by default, while trailing t

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Ruckard AndresAristizibal Joya E002

This strategy executes trades based on price crosses over dynamic swing breakout levels filtered by a baseline moving average. It plots three simple moving averages and an exponential moving average directly on the price chart alongside buy and sell arrows. Lo

Strategy v5 Moving averagesTrend
Updated 5 months ago · None stated GitHub repository of EMA Crossover Scott Strategy v2

Trend #4 - ATR+EMA channel

by wynnforthework
2 stars

Trend #4 - ATR+EMA channel is a strategy that plots ATR bands, a blue Keltner-style channel, and a red EMA on the price chart. It generates long entries when price crosses above the blue channel and red EMA with zero position, using position sizing based on st

Strategy v4 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Trend #4 - ATR+EMA channel

Multiple Moving Averages

by Web3Degenerate
2 stars

Plots up to five configurable moving averages directly on the price chart. Users can individually select the period and calculation type for each line from EMA, SMA, HMA, WMA, DEMA, VWMA, or VWAP. A master setting enables overriding all moving average types at

Indicator v5 Moving averagesTrend
Updated 2 years ago · None stated GitHub repository of Multiple Moving Averages

DEPV2 DEBUG S39

by YuceSezar89
1 stars

DEPV2 DEBUG S39 is a multi-asset signal evaluation indicator designed to monitor up to twenty cryptocurrency pairs simultaneously. It processes four analytical categories—trend, momentum, volatility, and volume—to evaluate market direction. Users can configure

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S39

CODEX NO1 Flip Engine v3

by vedkanani123
1 stars

A confirmed-close trend flip indicator on the price chart, where BUY exits a short and enters long and SELL does the reverse. Version 3 adds an adaptive KAMA component to the baseline and a reversal acceptance step that checks directional energy, close locatio

Indicator v6 TrendVolatility & bands Repaints
Updated 2 months ago · None stated GitHub repository of CODEX NO1 Flip Engine v3

This strategy combines a simplified Lorentzian distance-based machine learning prediction with a three-factor filter matrix to generate trade signals. It normalizes RSI, CCI, ADX, and momentum over rolling windows to evaluate feature distance, while scoring tr

Strategy v6 AI / machine learningTrend
Updated 2 months ago · None stated GitHub repository of TN ML Matrix Ensemble Sovereign v6

Trend Line Plot Indicator

by TradersPost
228 stars

The Trend Line Plot Indicator automatically identifies pivot highs and lows across price history and draws dynamic bullish and bearish trend lines directly on the price chart. Users can adjust the pivot lookback length, filter lines based on a minimum number o

Indicator v6 Support & resistanceTrend
Updated 3 months ago · None stated GitHub repository of Trend Line Plot Indicator
99 stars

Plots one component of an à trous stationary Haar discrete wavelet transform of a chosen source in a separate pane. Decomposition levels from one to eight set the lookback, which doubles with each level. Output zero returns the deepest approximation, described

Indicator v6 Trend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Discrete Wavelet Transform (DWT)

GT EMA

by eddiebelaval
7 stars

This strategy uses two EMAs with a trend filter to generate crossover signals on the price chart. It applies game theory validation through Nash equilibrium detection and expected utility calculations based on RSI and volume. Trades enter on confirmed crossove

Strategy v6 TrendOscillators & momentum Repaints
Updated 3 months ago · None stated GitHub repository of GT EMA
6 stars

CRT Bias Scanner Optimized is a Pine Script v5 indicator that scans 16 assets including major forex pairs, indices, commodities and crypto at user-defined intervals. It calculates bias signals across symbols and displays results with last scan timestamp when e

Indicator v5 Sessions & timeScreeners & dashboards
Updated 7 months ago · None stated GitHub repository of CRT Bias Scanner Optimized
3 stars

This indicator identifies price action reversal setups by combining candlestick patterns with Exponential Moving Average (EMA) trend filters. It calculates two customizable EMAs (default 10 and 20 periods) and fills the area between them to form an EMA cloud.

Indicator v5 Candlestick patternsMoving averages
Updated 5 months ago · None stated GitHub repository of Engulfing Patterns

Trend Continuation Zones

by rosijay17-cmd
1 stars

An overlay indicator that signals trend-continuation breakouts only in the direction of a mandatory trend filter built from a long EMA and a confirmed higher-timeframe EMA stack. Recent swing highs and lows are stored as reference levels, and a breakout needs

Indicator v6 TrendBreakout
Updated 8 days ago · GPL-3.0 GitHub repository of Trend Continuation Zones

DEPV2 DEBUG S42

by YuceSezar89
1 stars

This multi-asset indicator evaluates market conditions across four analytical dimensions: trend, momentum, volatility, and volume. Configured for up to twenty cryptocurrency pairs, it generates trade signals through isolated methods, simultaneous multi-method

Indicator v6 TrendOscillators & momentum Repaints
Updated 13 days ago · None stated GitHub repository of DEPV2 DEBUG S42

CODEX NO1 Flip Engine v4

by vedkanani123
1 stars

A confirmed-close trend flip indicator on the price chart, where BUY exits a short and enters long and SELL does the reverse. Version 4 is a separate state machine using a fast ZLEMA, a slow baseline, KAMA and a widened ATR trail. A signal needs a completed-bo

Indicator v6 TrendVolatility & bands Repaints
Updated 2 months ago · None stated GitHub repository of CODEX NO1 Flip Engine v4

Trend by Linreg Slope

by ivansoft
1 stars

An indicator that measures trend from the slope of a linear regression. It smooths the average of open and close with a short moving average, fits a regression line over a chosen number of bars, and plots the slope in a separate pane as an area, teal when risi

Indicator v6 Trend
Updated 1 year ago · None stated GitHub repository of Trend by Linreg Slope
947 stars

The Spencer 15-Point Moving Average is a technical indicator that applies Spencer's 15-point smoothing algorithm to financial price data. It calculates a weighted average across 15 historical periods using predefined symmetric weights designed to smooth noise

Indicator v4 Moving averagesTrend
Updated 12 days ago · GPL-3.0 GitHub repository of Spencer 15-Point Moving Average
114 stars

This indicator adapts Michael Chalek's Dual Thrust trading concept to plot breakout levels and overlay bands directly on the price chart. It calculates lookback ranges based on historical price action and provides two algorithmic variations along with multiple

Indicator v4 TrendBreakout Repaints
Updated 1 year ago · None stated GitHub repository of Dual Thrust Trading Algorithm

Backtester v5

by hasnocool
106 stars

This strategy plots a 50-period and a 200-period simple moving average on the price chart and trades their crosses. It opens a long when the fast average crosses above the slow average and closes that long on the opposite cross; shorts use the reverse crosses.

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

Calculated Colors

by be-thomas
65 stars

This script demonstrates how to dynamically alter plot transparency using calculated color values in Pine Script. It computes a 20-period simple moving average of the closing price and determines its relative height over a 100-bar lookback using the percent ra

Indicator v4 TrendMoving averages
Updated 6 days ago · GPL-3.0 GitHub repository of Calculated Colors

Ruckard Curie B004

by ruckard
13 stars

Ruckard Curie B004 is a trend-following strategy designed for cryptocurrency trading. It generates signals by combining fast and slow moving averages calculated from high and low source prices with directional strength filtering using ADX and DI indicators. Th

Strategy v5 Moving averagesOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Ruckard Curie B004

This indicator scores trend alignment across the chart timeframe and three configurable higher timeframes. It classifies each timeframe as bullish or bearish with Supertrend and, when enabled, a volatility regime, then combines the results into a 0–100 conflue

Indicator v6 TrendVolatility & bands
Updated 3 days ago · MIT GitHub repository of MTF Trend Alignment Dashboard [WavesUnchained]
3 stars

This indicator identifies pullback reversal setups by combining dual exponential moving averages with candlestick patterns. It plots two EMAs with a shaded cloud to define trend direction. When price touches or crosses the slower EMA and closes back in trend a

Indicator v5 Candlestick patternsMoving averages
Updated 5 months ago · None stated GitHub repository of Engulfing Patterns

USI Flip Strategy

by skipp-dev
1 stars

USI Flip Strategy calculates a multi-length Ultimate Speed Index (USI) consisting of six RSI lines (L0 to L5) to identify market momentum shifts on the price chart. It enters long or short positions when fast lines cross slow lines, filtered by volume ratio th

Strategy v6 Oscillators & momentumTrend
Updated 4 days ago · None stated GitHub repository of USI Flip Strategy

This strategy detects EMA crossovers on the price chart using 9 and 21 period EMAs. It sets pending long signals on fast EMA cross above slow EMA and pending exit on cross below. Entries and exits trigger only on confirmed bars via barstate.isconfirmed. Long e

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of PF barstate-magnifier probe 01a - isconfirmed ON

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