Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 61)

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

DEPV2 DEBUG S32

by YuceSezar89
1 stars

DEPV2 is a multi-symbol cryptocurrency indicator that processes 20 major crypto pairs including BTC, ETH, SOL, BNB and others. It evaluates four signal classes consisting of trend, momentum, volatility and volume. Signals are generated according to user-select

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

Bull Bear Market Ribbon

by vedkanani123
1 stars

A simple price-chart indicator that plots a fast and a slow moving average, defaulting to 21 and 55 periods, and fills the space between them as a ribbon. Both lines and the fill are blue when the fast average is above the slow one and red when below. The aver

Indicator v6 Moving averagesTrend
Updated 2 months ago · None stated GitHub repository of Bull Bear Market Ribbon
1 stars

This strategy identifies liquidity sweeps around swing pivot levels and trades reversals aligned with higher-timeframe trend context. It enters long when price pierces a prior pivot low and closes back above it while trading above the daily 200 EMA. Short entr

Strategy v6 SMC / ICT / price actionTrend
Updated 2 months ago · None stated GitHub repository of TN Liquidity Sweep Sovereign
947 stars

The Recursive Median Filter combines a median percentile calculation with a lowpass exponential filter to smooth price action directly on the main price chart. It calculates the median source value across a specified median length and recursively blends it usi

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

This strategy calculates the Qualitative Quantitative Estimation (QQE) indicator by applying exponential moving averages to a relative strength index and its ATR range. It identifies shifts between bullish and bearish momentum to generate trading signals on th

Strategy v4 Oscillators & momentumTrend
Updated 2 months ago · None stated GitHub repository of QQE Signals [Alorse]

Try Trading Future

by dearvn
257 stars

This futures trading strategy combines Fair Value Gap (FVG) detection filtered by Average True Range (ATR) with multi-timeframe Exponential Moving Averages (8, 55, and 165 lengths). It identifies entry setups during a defined intraday trading session window wh

Strategy v5 SMC / ICT / price actionMoving averages Repaints
Updated 7 weeks ago · None stated GitHub repository of Try Trading Future
16 stars

Seykota Alt 6 Pure ATR Stop is a trend-following strategy based on Donchian channel breakouts and ATR volatility trailing stops. It enters trades when price breaks out beyond the Donchian lookback channel, provided optional market regime and volume filters are

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 6: Pure ATR Stop

This strategy trades long and short using TradingLatino rules as ABCBitcoin interprets them. Entries need EMA 10 crossing or aligned with EMA 55 on the one-hour, four-hour, and daily charts, agreeing ADX slope and directional monitor, and price on the matching

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard ABCBitcoin TradingLatino C003

Triple EMA + Stochastic

by krosenfeld7
5 stars

This overlay indicator combines three Exponential Moving Averages (EMAs) with a Stochastic RSI to plot trend-following trade setup labels on the price chart. It checks for sequential EMA alignment alongside Stochastic RSI crossovers and specific candle price p

Indicator v4 Moving averagesOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of Triple EMA + Stochastic
4 stars

This strategy trades USD/JPY on the price chart during Tokyo and London sessions. It enters long when the fast EMA crosses above the slow EMA while price is above the trend EMA and RSI is above its midpoint, and it enters short on the opposite cross. Position

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of USD/JPY Carry Trend [trugurpala]

DX SPX VLT

by g-moe
3 stars

DX SPX VLT is an overlay indicator that evaluates market trends by combining moving average slope analysis, Aroon filters, and DTEK Supertrend components. It plots colored background highlights to represent overall trend direction, displays a moving average li

Indicator v5 TrendMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of DX SPX VLT

Moving Averages Trends and Filters

by mushroom-men-Trading
2 stars

This script provides a consolidated library of moving average calculations in Pine Script v6. It implements FIR functions including ALMA using Gaussian weights, BLMA with Blackman window, and BWMA using Bessel function, along with IIR moving averages from miha

Indicator v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Moving Averages Trends and Filters

P_syn_alerts_log

by GammaExpansion
1 stars

This Pine Script indicator detects when the closing price crosses above a 20-period simple moving average. When a crossover occurs, it triggers an alert condition, executes a dynamic alert call with the current close price, and plots a value of 1 (and 0 otherw

Indicator v6 Moving averagesTrend
Updated 7 days ago · MIT GitHub repository of P_syn_alerts_log

DEPV2 DEBUG S33

by YuceSezar89
1 stars

This indicator monitors up to twenty cryptocurrency perpetual pairs across four analytical categories: trend, momentum, volatility, and volume. It generates trade signals using multiple modes, including single-method execution, simultaneous confluence requirin

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

Cardwell Dual Confluence

by vedkanani123
1 stars

A price-chart indicator by MarkitTick based on Cardwell RSI ideas. It produces buy and sell signals from a fast and slow smoothed RSI crossover and from an RSI regime check combined with a moving average trend, with bull and bear RSI ranges. A minimum bar gap

Indicator v6 Oscillators & momentumTrend
Updated 2 months ago · None stated GitHub repository of Cardwell Dual Confluence
1 stars

This strategy couples a moving average crossover with external macroeconomic data imported via request.seed. It calculates a 20-period SMA on the fetched macro metric to identify Risk-On, Risk-Off, or Neutral market regimes. Long entries trigger when the 12 EM

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Macro Modeling Sovereign
947 stars

Recursive Moving Trend Average (RMTA) is an overlay indicator that calculates a recursively smoothed moving average line to track market direction. It computes a secondary recursive variable using an exponential smoothing factor derived from the user-selected

Indicator v4 TrendMoving averages
Updated 12 days ago · GPL-3.0 GitHub repository of Recursive Moving Trend Average
330 stars

This script plots three moving averages on the price chart: a fast EMA or SMA with 10 periods, a slow EMA or SMA with 20 periods, and a trend EMA or SMA with 100 periods. It signals trend changes by drawing a white cross when the fast moving average crosses ab

Indicator v4 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of 3 EMA/SMA + Cross [Alorse]
106 stars

The Automatic Moving Average strategy computes an adaptive moving average by dynamically adjusting its length based on price touches against candle wicks and bodies. It applies Exponential Moving Average smoothing to define trend direction and plots a color-co

Strategy v5 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Automatic Moving Average
16 stars

This strategy enters on Donchian channel breaks and can trade long, short, or both. Position size for each unit is based on a percentage of equity divided by an initial ATR stop. A chandelier stop trails a multiple of ATR from the highest high since entry for

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 7: Chandelier Trail

This strategy evaluates market signals using a combination of Trend Indicator A-V2, Supertrend, and QQE Mod along with a VWMA trend line. It generates long or short entries when a specified minimum number of sub-strategies align. Position management includes c

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

Game Theory EMA Strategy

by eddiebelaval
7 stars

The Game Theory EMA Strategy combines triple Exponential Moving Averages with game theory modeling to generate trade entries on price charts. It evaluates buyer and seller momentum alongside volume weighting to compute expected utility metrics and Nash equilib

Strategy v6 TrendMoving averages
Updated 3 months ago · None stated GitHub repository of Game Theory EMA Strategy

This strategy plots three exponential moving averages on the price chart and opens long trades when those averages stack upward, price closes above the shortest average, and a smoothed stochastic RSI has K above D. It also requires a rising bullish candle on a

Strategy v4 TrendMoving averages
Updated 3 years ago · Apache-2.0 GitHub repository of Triple EMA + Stochastic Long Strategy (D)
4 stars

This strategy trades USD/JPY on the price chart. It enters long when a fast EMA crosses above a slow EMA and short when the fast EMA crosses below, but only during the Tokyo or London sessions in GMT. Each entry places an ATR-based stop loss and take profit us

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of USD/JPY Forex Strategy [trugurpala]

DEPV2 DEBUG S34

by YuceSezar89
1 stars

DEPV2 DEBUG S34 is a multi-symbol crypto signal indicator that analyzes 20 Binance pairs (BTC, ETH, SOL, and others) using trend, momentum, volatility, and volume methods. It plots signals in a separate pane based on user-selected confirmation modes such as si

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

Bitmoon System

by morindok
1 stars

Calculates dynamic fractal levels and time symmetry dynamic lengths on the main price chart. It uses extended Williams Fractals across a user-defined fractal period to detect key structural pivot highs and lows. The script measures bar distances between detect

Indicator v5 Support & resistanceTrend Repaints
Updated 7 weeks ago · None stated GitHub repository of Bitmoon System

Supertrend Comparison

by ivansoft
1 stars

Plots the built-in Supertrend with a factor of 3 and ATR period of 10, then plots a hand-written Pine version of the same calculation so the two can be compared. Green segments mark an uptrend and red segments a downtrend. It appears in a separate pane rather

Indicator v6 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Supertrend Comparison

The Regularized Exponential Moving Average (REMA) is a technical indicator that applies a regularization factor to the standard EMA formula to reduce lag and filter out market noise. It calculates a smoothed line using a specified length, price source, and reg

Indicator v4 Moving averagesTrend
Updated 12 days ago · GPL-3.0 GitHub repository of Regularized Exponential Moving Average
106 stars

This script calculates and plots the Average Directional Index alongside directional movement values in a separate pane. Although declared as a strategy, it only plots the indicator oscillator against customizable minimum and maximum threshold levels without d

Strategy v5 Trend Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Average Directional Index

Evening Star - Bearish

by TWODS-CAPITAL
37 stars

The Evening Star - Bearish indicator identifies and marks the three-candle Evening Star bearish reversal pattern directly on the main price chart. It detects a strong bullish candle, followed by a small-bodied gapping candle, and finishes with a strong bearish

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Evening Star - Bearish
16 stars

This strategy enters long or short breakouts when price crosses a Donchian channel and exits with a volatility-adaptive Donchian lookback that is shorter in low volatility and longer in high volatility. It sizes each unit from a percentage of equity and an ATR

Strategy v6 TrendVolatility & bands
Updated 12 months ago · None stated GitHub repository of Seykota Alt 8: Adaptive Exit

This strategy generates long and short trade signals by combining Trend Indicator A-V2, Supertrend, and QQE Mod. It executes entries on the price chart with integrated risk management features including a default stop loss, optional take profits, trailing take

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

Calculates three Exponential Moving Averages (short, intermediate, long) alongside Stochastic RSI to identify short trade entries. A short position opens when the EMAs align in a downward trend, Stochastic K crosses below D, and a bearish price bar closes belo

Strategy v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of Triple EMA + Stochastic Short Strategy

This strategy generates trading signals using a dual exponential moving average cross confirmed by the Relative Strength Index. It restricts entries to specific market session hours (09:30-18:15 UTC+3) designed for Turkish VIOP index futures. Long positions en

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · MIT GitHub repository of VİOP BIST30 Alert Strategy [trugurpala]
3 stars

This strategy generates long trade entries when a short exponential moving average crosses above a long exponential moving average. It features comprehensive position management tools including an ATR-based stop loss, a maximum percentage loss threshold, a pro

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

G Trend

by wynnforthework
2 stars

G Trend is an overlay indicator that builds ATR trailing stops around the midpoint of each bar and flips between a long and a short state when price crosses the opposite stop. A buy label appears when the state turns long and a sell label when it turns short.

Indicator v4 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of G Trend

DEPV2 DEBUG S35

by YuceSezar89
1 stars

DEPV2 DEBUG S35 is a debugging indicator that calculates multi-symbol trading signals using four methods: trend, momentum, volatility, and volume. It monitors 20 different crypto pairs including BTCUSDT, ETHUSDT, and others. The script allows users to select s

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

BoS Boxes

by morindok
1 stars

Marks break-of-structure phases on the price chart. It finds confirmed pivot highs and lows using a configurable number of bars on each side, five by default. A close above the last pivot high sets a bullish state and a close below the last pivot low sets a be

Indicator v5 SMC / ICT / price actionTrend
Updated 7 weeks ago · None stated GitHub repository of BoS Boxes
1 stars

A trend flip indicator on the price chart, where BUY exits a short and enters long and SELL does the reverse. Version 2 makes a reversal a two-stage event: the opposite side must break the active ATR trail for consecutive closes, then show persistence, trade m

Indicator v6 TrendVolatility & bands Repaints
Updated 2 months ago · None stated GitHub repository of CODEX NEXUS v2 - Anti-Whipsaw MTF
228 stars

TradersPost Trading Checklist is an overlay indicator that evaluates a suite of popular technical conditions for long and short trade setups. It checks session-anchored VWAP, fast and slow EMA alignments and crosses, 200 SMA, RSI overbought or oversold conditi

Indicator v6 Screeners & dashboardsTrend
Updated 3 months ago · None stated GitHub repository of TradersPost Trading Checklist
47 stars

This indicator calculates and plots a Kaiser Window Moving Average directly on the price chart. It applies a symmetric finite impulse response filter using the Kaiser-Bessel window function, powered by a 25-term power series approximation of the modified Besse

Indicator v6 Moving averagesTrend
Updated 8 months ago · MIT GitHub repository of Kaiser Window Moving Average
37 stars

This indicator identifies the five-candle bearish continuation pattern known as the Falling Three Methods on the main price chart. It checks for an initial long bearish candle within a downtrend, three consecutive small bullish candles contained within the fir

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Falling Three Methods - Bearish
16 stars

Seykota Alt 9: Time Exit Primary executes a Donchian breakout trend-following strategy that prioritizes time-based exits over price-based trailing stops. It enters long or short on 55-bar Donchian channel breakouts, sizing positions by ATR-based risk and pyram

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 9: Time Exit Primary

This strategy combines Trend Indicator A-V2, Supertrend and QQE Mod to generate long and short signals on the price chart. It enters positions based on the combined trend signals and manages exits using take profit and stop loss levels. Position sizing follows

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

VİOP Session Strategy

by trugurpala
4 stars

This strategy trades Turkish VIOP BIST 30 futures on the price chart. It opens positions when a fast exponential moving average crosses a slow one, but only while chart time falls inside the 09:30 to 18:15 UTC+3 session. Stop loss and take profit distances are

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of VİOP Session 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