Pine Library · 3,870 open-source scripts

Free Trend Pine Scripts (page 67)

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

1 stars

A Pine v4 strategy that plots a 33-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of ZECBTC EMA Cross Strategy
114 stars

This strategy plots two Hull Moving Average variations on the main price chart, optionally smoothed with an adaptive Kalman filter algorithm. It enters long positions when the faster moving average crosses above the slower moving average and enters short posit

Strategy v4 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Hull Trend with Kahlman Strategy
13 stars

This strategy evaluates market trend direction using a Noro TrendRibbon and creates a price corridor based on recent moving-average extremes, plotting directly on the price chart. It executes long entries when price dips below the corridor during an upward tre

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon G004
2 stars

Rolling Z-Score Trend [QuantAlgo] calculates a rolling Z-score using mean and standard deviation over a user-defined lookback window to evaluate statistical price deviations and momentum. Plotted in a separate indicator pane, it displays the rolling Z-score li

Indicator v6 TrendOscillators & momentum
Updated 8 months ago · None stated GitHub repository of Rolling Z-Score Trend [QuantAlgo]

Triangular Moving Average (TRIMA)

by mushroom-men-Trading
2 stars

The Triangular Moving Average (TRIMA) indicator calculates a double-smoothed moving average that places greater weight on the middle values of the chosen lookback period. It dynamically generates a triangular weighting array to smooth price fluctuations and fi

Indicator v6 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of Triangular Moving Average (TRIMA)
1 stars

A strategy that enters on a 9 and 21 EMA crossover, optionally confirmed by RSI above 40 for longs or below 60 for shorts. Trades must agree with a 200 EMA market filter and a weekly 20 EMA taken from the previous completed week. Position size is set so the di

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign Advanced Swing
114 stars

This indicator plots a trend-following band directly on the price chart by comparing two variations of the Hull Moving Average, with an optional Kahlman filter applied to both. Line A calculates a standard Hull MA on selected price data, while Line B calculate

Indicator v4 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Hull-Kahlman Trend with Alerts

Boilerplate

by hasnocool
106 stars

Boilerplate is a foundational framework designed for automated strategy development. It integrates multi-timeframe Exponential Moving Average (EMA) and Average Directional Index (ADX) filters to avoid trading counter-trends or choppy markets, along with a sess

Strategy v5 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Boilerplate
13 stars

This strategy pairs the Noro Trendribbon directional filter with price corridors formed by high and low moving averages. In an uptrend, it initiates long trades when price pulls below the upper band corridor, while in a downtrend it enters short positions when

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon H005
1 stars

This strategy monitors two higher timeframes of 60 minutes and 240 minutes. It calculates whether the close on each timeframe exceeds the prior bar close, then checks if both are rising. When both conditions hold and no position exists, it enters a long trade

Strategy v6 Trend
Updated 7 days ago · Apache-2.0 GitHub repository of PF MTF probe 02 — dual TF closes
1 stars

This strategy calculates fast and slow exponential moving averages alongside the Average Directional Index. It plots both moving averages on the price chart and displays an on-screen table tracking trend strength, directional bias, and volatility. A long posit

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Tn Sovereign ADX Trend
13 stars

A trend-following strategy that combines the Noro TrendRibbon direction filter with high and low moving average corridors. It determines the dominant market direction from the trend ribbon and opens positions when price moves outside the corridor, taking long

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon I002
7 stars

Smart Krypto Futures Daytrade Suite is an all-in-one technical indicator tailored for intraday cryptocurrency trading. It plots higher-timeframe supply and demand zones, Fair Value Gaps with optional mitigation filtering, session VWAP, dynamic moving averages,

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 3 months ago · None stated GitHub repository of Smart Krypto Futures Daytrade Suite

Hercules Rewrite

by g-moe
3 stars

Hercules Rewrite is a signal and visual trade management indicator that overlays entry setups directly on the price chart. It detects candle setups based on minimum tick movement and engulfing patterns, filtering entries through parameters like moving averages

Indicator v5 Candlestick patternsTrend
Updated 5 months ago · None stated GitHub repository of Hercules Rewrite

PF MTF probe 03 — 60m SMA(20)

by pineforge-4pass
1 stars

The strategy computes the 20-period SMA on the 60-minute timeframe using request.security to obtain the HTF series. It generates long signals on SMA crossovers where the HTF close crosses above the SMA from below and exits long positions on downward crossovers

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of PF MTF probe 03 — 60m SMA(20)

Equity Curve (SuperTrend)

by YuceSezar89
1 stars

This indicator uses the SuperTrend to generate direction changes that calculate segment returns and update a cumulative equity curve. It starts with a balance of 100 and compounds returns for each signal segment until the next direction change, then plots the

Indicator v5 TrendVolatility & bands
Updated 13 days ago · None stated GitHub repository of Equity Curve (SuperTrend)

MTF Trend Signals

by vedkanani123
1 stars

A separate-pane indicator adapted from the AK MACD Bollinger Bands idea. It draws MACD-based Bollinger bands whose fill colour follows RSI against its moving average and the 55 and 45 levels. Buy and sell markers come from multi-timeframe alignment, using an a

Indicator v6 Oscillators & momentumTrend
Updated 2 months ago · None stated GitHub repository of MTF Trend Signals

TN Sovereign Audit

by raybird
1 stars

A strategy on the price chart that scores each bar from 0 to 4 using four checks: volume against its average, price against a higher-timeframe EMA, bar movement against an ATR noise level, and a fast EMA above a slow EMA. The score maps to signal grades, and a

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign Audit
13 stars

This strategy detects long and short signals from the Noro TrendRibbon ribbon side change. It draws a corridor from recent high and low prices on the chart. When price falls below the corridor on long signals it opens long positions sized to a percentage of co

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon J009
1 stars

This indicator splits price into SuperTrend segments and accumulates the percentage of up and down closes inside the active segment. It compares the live net move with the mean and standard deviation of earlier closed segments in the same direction, then plots

Indicator v5 TrendVolatility & bands
Updated 13 days ago · None stated GitHub repository of Segment TotalAmount Z (SuperTrend)
1 stars

This indicator plots a ribbon of seven exponential moving averages based on Fibonacci lengths (8, 13, 21, 34, 55, 89, and 144) directly on the price chart. It calculates volume-weighted distance gaps between consecutive moving averages normalized against a 50-

Indicator v5 Moving averagesTrend
Updated 7 weeks ago · None stated GitHub repository of Fibonacci Volumetric MA Ribbon
99 stars

This indicator calculates John Ehlers' two-pole Highpass Filter (HPF) to isolate cyclic noise from market data. By subtracting the highpass filter output from the input price series, it removes high-frequency fluctuations and plots the smooth underlying trend

Indicator v6 Trend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Highpass Filter (HPF)
47 stars

This indicator calculates the Schaff Trend Cycle oscillator using custom exponential moving averages with deterministic warm-up logic. It computes a MACD line from user-defined fast and slow lengths, passes it through a double stochastic calculation over a spe

Indicator v6 Oscillators & momentumTrend
Updated 8 months ago · MIT GitHub repository of Schaff Trend Cycle (STC)
13 stars

This strategy uses Noro TrendRibbon direction to set a long or short bias, then opens a trade when price leaves a high-low corridor built from recent candles. A long opens below the corridor in a long bias, and a short opens above it in a short bias, sized fro

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon Ladder

This indicator plots a four-layer Smart Money Concepts framework directly on the price chart. It maps external and internal market structure points (HH, HL, LH, LL), projects structural expectation zones for upcoming swing levels, detects Break of Structure (B

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 3 days ago · MIT GitHub repository of SMC Structure & Expectation [WavesUnchained]

This indicator segments recent price bars into defined groups and visual boxes to serve as a visual chart ruler. It includes automated trend detection with configurable angle thresholds to plot uptrend, downtrend, and range segments directly on the price chart

Indicator v6 TrendSupport & resistance
3 stars

Hercules Strategy Rewrite is an automated backtesting strategy that generates entry signals using engulfing candlestick patterns, tick thresholds, and support or resistance level breakouts. It offers multi-layer filtering including moving average trend checks,

Strategy v5 Candlestick patternsSessions & time
Updated 5 months ago · None stated GitHub repository of Hercules Strategy Rewrite
1 stars

This indicator plots the SuperTrend line directly on the price chart and evaluates historical trend segments. Whenever the SuperTrend flips direction, it records simulated long or short returns from flip to flip, plotting percentage return labels above or belo

Indicator v5 TrendScreeners & dashboards
Updated 13 days ago · None stated GitHub repository of Winrate Panel (SuperTrend)

Nexus Big Move v7

by vedkanani123
1 stars

A trend flip indicator on the price chart with BUY and SELL labels. It builds a zero-lag trail from ATR and an optional volume-weighted source, then lets a flip through only when several gates pass: choppiness, baseline slope, volatility expansion, efficiency

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Nexus Big Move v7

ta

by ivansoft
1 stars

Provides a collection of technical analysis calculation functions for use across Pine scripts. It exports implementations for various indicators and mathematical formulas, including oscillators like the Awesome Oscillator, Aroon, and Schaff Trend Cycle, moving

Library v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of ta
106 stars

This strategy trades breakouts beyond Bollinger Bands on the main price chart. It features optional trend filters using various moving average types, a volatility filter based on standard deviation relative to its moving average, and a daily rate-of-change fil

Strategy v5 BreakoutVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Bands - Breakout Strategy
47 stars

Calculates the linear regression slope for a selected price source over a configurable rolling lookback window. It tracks running sums using ring buffers to determine the rate of price change per bar. Configurable settings include the lookback period and price

Indicator v6 Trend
Updated 8 months ago · MIT GitHub repository of Slope, Linear Regression (SLOPE)

This strategy connects TradingView signals to Zignaly crypto trading platform with risk management. It plots a Noro TrendRibbon on the price chart to generate trend signals for entries. Long and short positions open based on ribbon conditions using specified M

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon Laddered C001

This indicator plots a double-smoothed Supertrend baseline on the price chart, combining a Supertrend midline with WMA and EMA smoothing to show trend direction. Direction uses an ATR-scaled baseline slope with hysteresis, while percentile-ranked slope magnitu

Indicator v6 TrendMoving averages
Updated 3 days ago · MIT GitHub repository of Smooth Trend Radar [WavesUnchained]
7 stars

This multi-timeframe indicator calculates Stochastic oscillator directional bias across three user-defined timeframes. It compares %K and %D to determine whether momentum is bullish or bearish on each timeframe. When all three timeframes align in the same dire

Indicator v6 Oscillators & momentumTrend Repaints
Updated 3 months ago · None stated GitHub repository of Stoch MTF 3 TF Direction Only

Calculates and plots Anchored VWAP curves on the price chart based on specific user-selected event timestamps or standard periodic intervals such as daily, weekly, and monthly levels. It features customizable bands around the VWAP lines, configurable using per

Indicator v5 VolumeSupport & resistance Repaints
Updated 8 months ago · None stated GitHub repository of Anchored VWAP Pinch & Handoff, Intervals, and Signals
1 stars

This strategy adapts the Chandelier Exit indicator to build a trend-following system with added audit filters. It calculates trailing stop levels using ATR and highest highs or lowest lows to determine directional shifts. Entries are filtered through a long-te

Strategy v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Tn Sovereign Chandelier
13 stars

Ruckard Noro TrendRibbon N003 is a trend-following strategy designed to generate long and short trade signals based on side changes in the Noro Trendribbon indicator. It calculates upper and lower moving average corridors alongside ADX smoothing to identify ch

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon N003
9 stars

Smooth Trend Radar Strategy calculates a double-smoothed Supertrend baseline using WMA and EMA to identify trend direction and sideway regimes. It plots baseline rejection signals on flips, trend slope filters, and statistical overextension highlights with can

Strategy v6 TrendMoving averages
Updated 3 days ago · MIT GitHub repository of Smooth Trend Radar Strategy
7 stars

This Pine Script strategy implements the Supertrend Elite Trend System for crypto markets. It combines signals from ten indicators including Supertrend, ALMA smoothing, CTI correlation, STC trend catcher, Gunxo sniper, DEMA with DMI, MM percentile, and DMI loo

Strategy v6 TrendMoving averages
Updated 3 months ago · None stated GitHub repository of Supertrend Elite Trend System

AR Forecast Scatterplot

by regalouisei
2 stars

This indicator plots an AR forecast on the price chart using the selected source. It computes autocorrelation between close and time across multiple lookback lengths to identify the strongest trend, then generates forecast results. Results appear as a scatter

Indicator v5 Trend
Updated 8 months ago · None stated GitHub repository of AR Forecast Scatterplot

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