Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 81)

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

Stochastic

by hasnocool
106 stars

This strategy combines a smoothed stochastic oscillator with three exponential moving averages. It opens a long position of 1000 units when the stochastic K line crosses above D and the 5-period and 15-period EMAs both cross above the 50-period EMA. It closes

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Stochastic

TTM Trend

by mihakralj
99 stars

TTM Trend plots an exponential moving average of a chosen source on the price chart and colors the line by the direction of its one-bar change. A positive change is green, a negative change is red, and an unchanged value is gray. Optional bands scale with the

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of TTM Trend

PSAR

by g-moe
3 stars

This indicator plots the Parabolic SAR (PSAR) on the price chart combined with Relative Strength Index (RSI) momentum filters. It calculates SAR dots and triangle markers to display trend direction. When a PSAR trend reversal occurs alongside confirmation from

Indicator v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of PSAR

QQE Glaz

by g-moe
3 stars

This indicator calculates a Quantitative Qualitative Estimation (QQE) variant and plots it in a separate pane. It computes an EMA-smoothed RSI alongside a double Wilder-smoothed ATR of that RSI. From these, it creates fast and slow trailing stop bands based on

Indicator v5 Oscillators & momentumTrend
Updated 5 months ago · None stated GitHub repository of QQE Glaz

Range Filter

by g-moe
3 stars

Range Filter is a chart strategy that estimates a smoothed price range from absolute bar-to-bar changes using two exponential averages and a multiplier. It plots a filtered price line plus high and low target bands on the price chart, colors bars by filter dir

Strategy v5 TrendVolatility & bands
Updated 5 months ago · None stated GitHub repository of Range Filter

Supertrend ADX Filter

by pineforge-4pass
1 stars

The Supertrend ADX Filter strategy calculates Supertrend direction and ADX strength to generate trend signals. It plots the Supertrend line on the price chart in green for bullish and red for bearish. Long entries trigger on Supertrend direction change to bull

Strategy v6 TrendOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of Supertrend ADX Filter
99 stars

This indicator calculates Adam White's Vertical Horizontal Filter in a separate pane. It divides the close range over the lookback by the sum of absolute bar-to-bar close changes, so higher values indicate a more directional path and lower values a more rangin

Indicator v6 Trend
Updated 4 weeks ago · Apache-2.0 GitHub repository of VHF: Vertical Horizontal Filter

Swing Pivot ATR

by pineforge-4pass
1 stars

Swing Pivot ATR is a trend-breakout strategy that identifies swing highs and lows using pivot points and enters positions on price breakouts. It tracks historical pivot high and low levels, plotting them as steplines directly on the price chart. When price clo

Strategy v6 TrendBreakout
Updated 6 days ago · Apache-2.0 GitHub repository of Swing Pivot ATR

Vortex Indicator

by mihakralj
99 stars

This indicator calculates and plots the positive and negative Vortex Indicator lines, VI+ and VI-, in a separate pane alongside a neutral reference line at 1.0. It uses circular buffers and running sums to compute true range and directional vortex movement eff

Indicator v6 TrendOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Vortex Indicator

Tally Volume Index ROC

by pineforge-4pass
1 stars

A long-only strategy that measures the rate of change of the Negative Volume Index and Positive Volume Index over separate windows. It enters long when both growth rates first exceed their minimum thresholds and price is above a trend EMA. It exits when either

Strategy v6 VolumeTrend
Updated 6 days ago · Apache-2.0 GitHub repository of Tally Volume Index ROC

TArec_p02_UNT

by pineforge-4pass
1 stars

The strategy tests untested TA classes including ALMA, SAR and rolling correlation under bar magnifier. It enters long only when ALMA crosses above close, SAR flips below price and 20-period correlation of close and volume is positive. It exits long when SAR f

Strategy v6 TrendOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of TArec_p02_UNT
3 stars

Tracks local swing highs and lows to determine market structure and current market bias. It draws horizontal price lines required to break structure, labels structural reversals or breaks, and highlights Buy The Dip and Sell The Rally setup points. Settings al

Indicator v5 SMC / ICT / price actionTrend
Updated 5 months ago · None stated GitHub repository of SCL True Market Structure

SHORT eMACD

by g-moe
3 stars

SHORT eMACD is a short-only strategy that evaluates bearish momentum using MACD crossunders, exponential moving averages (EMA), and consecutive candle filters. It offers five configurable entry modes combining MACD signals and custom EMA candle logic. Users ca

Strategy v5 TrendOscillators & momentum Repaints
Updated 5 months ago · None stated GitHub repository of SHORT eMACD

Torque TSI Signal

by pineforge-4pass
1 stars

A long-only strategy built on the True Strength Index smoothed by an RMA signal line, shown in a separate pane with a minimum strength line. It enters long when the index crosses above its signal, exceeds a minimum strength and price is above a trend EMA. It e

Strategy v6 Oscillators & momentumTrend
Updated 6 days ago · Apache-2.0 GitHub repository of Torque TSI Signal
3 stars

This indicator plots smoothed Heiken Ashi candles on the price chart using two stages of exponential moving averages. It computes smoothed open, high, low, and close values with adjustable lengths of 10. Bullish candles appear green and bearish candles appear

Indicator v5 Candlestick patternsTrend Repaints
Updated 5 months ago · None stated GitHub repository of Smoothed Heiken Ashi Candles
1 stars

This Pine Script strategy executes a dual moving average crossover system designed as a validation test for intraday order capping across exchange session rollovers. It calculates a 9-period fast SMA and a 21-period slow SMA, entering long on bullish crossover

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of US-equity Intraday Cap (Scaffold)

Wiener Filter (WIENER)

by mihakralj
99 stars

This indicator plots a Wiener filter of a chosen price source on the price chart. It estimates noise from squared differences over a lookback window, estimates signal power from a smoothed mean of squared deviations, and blends the source toward that mean with

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Wiener Filter (WIENER)
3 stars

Supertrend Channels is a price-chart overlay. It builds ATR bands around the hl2 midpoint using a length and a multiplier, then tightens the upper or lower band while price stays on one side. A binary trend state flips when close crosses the opposite band. Fro

Indicator v5 TrendVolatility & bands
Updated 5 months ago · None stated GitHub repository of Supertrend Channels

Chilllax Moving Averages with Qullamaggie Colors calculates and displays two configurable moving averages directly on the price chart. It evaluates the alignment and directional slope of both averages compared to their values a set number of bars ago. Based on

Indicator v4 Moving averagesTrend
Updated 5 months ago · None stated GitHub repository of Chilllax Moving Averages with Qullamaggie Colors

Williams Alligator

by mihakralj
99 stars

Calculates and plots the classic Williams Alligator indicator using smoothed moving averages (SMMA / Wilder's RMA) with exponential warmup compensation. It computes three distinct smoothed lines: the Jaw, Teeth, and Lips, which are plotted directly on the main

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Williams Alligator

VCP probe 06 - adx regime

by pineforge-4pass
1 stars

This strategy isolates and tests manual directional movement and ADX calculations plotted directly on the main price chart. It constructs plusDI, minusDI, and ADX without using built-in indicators, entering a long position when ADX exceeds 25 in an uptrend and

Strategy v6 TrendOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of VCP probe 06 - adx regime

ATR Trailing Stop

by mihakralj
99 stars

Calculates an ATR-based trailing stop overlaid on the price chart to assist with trend identification and stop placement. Using a specified ATR period and multiplier, it projects upper and lower bounds around the closing price. The stop line ratchets up during

Indicator v5 TrendVolatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of ATR Trailing Stop

ATR Trailing

by g-moe
3 stars

Calculates a dynamic trailing stop based on the Average True Range (ATR) and a sensitivity multiplier. It plots the trailing stop directly on the price chart, coloring the line green during uptrends and red during downtrends. Buy and sell labels appear when th

Indicator v4 TrendVolatility & bands
Updated 5 months ago · None stated GitHub repository of ATR Trailing
3 stars

Blastoise's Indicator draws dynamic support and resistance trend lines on the price chart. It locates swing highs and swing lows with a fixed 20-bar pivot and joins the last three of each into rising lower lines and falling upper lines. A line is kept only whe

Indicator v4 TrendSupport & resistance
Updated 5 months ago · None stated GitHub repository of Blastoise's Indicator

VCP Probe 08 - Integration

by pineforge-4pass
1 stars

This integration strategy combines seven analytical layers into a single system drawn directly on the main price chart. It calculates pivot highs and lows, Fair Value Gaps (FVG) scaled by ATR, smoothed RSI momentum, volume z-score anomalies, cumulative volume

Strategy v6 TrendVolume
Updated 6 days ago · Apache-2.0 GitHub repository of VCP Probe 08 - Integration
3 stars

The Directional Movement Index plots the Average Directional Index (ADX) along with the Positive Directional Indicator (+DI) and Negative Directional Indicator (-DI) in a separate pane. It calculates trend strength and direction from price changes using true r

Indicator v4 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Directional Movement Index

Elder Impulse System

by mihakralj
99 stars

Elder Impulse System plots a column series in a separate pane. It compares a 13-period exponential moving average with its previous value and a MACD histogram with its previous value. A rising EMA and rising histogram print 1, a falling EMA and falling histogr

Indicator v5 TrendOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Elder Impulse System

Holt-Winters Channel

by mihakralj
99 stars

This overlay indicator estimates a Holt-Winters-style level, trend, and acceleration from the close, then projects a middle line one step ahead. It tracks a smoothed squared forecast error and multiplies its square root by the multiplier to form upper and lowe

Indicator v5 TrendVolatility & bands
Updated 4 weeks ago · Apache-2.0 GitHub repository of Holt-Winters Channel

Volatility Stop

by mihakralj
99 stars

The Volatility Stop indicator calculates a trailing stop level based on Average True Range (ATR) to help identify trend direction and reversal levels. It tracks price changes over a user-defined ATR period and multiplier, plotting a green line during uptrends

Indicator v5 Volatility & bandsTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Volatility Stop

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