Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 61)

Open-source Pine scripts built on moving averages: EMA and SMA tools, ribbons, Hull and adaptive averages, and crossover strategies.

Pine scripts3,064
Code shown here1,765open licence
Updated in a year1,828
No repaint flag2,707

Moving averages: Indicators, Strategies and Libraries

Pivot Trendlines

by g-moe
3 stars

This indicator identifies pivot highs and lows using a swing lookback period and connects them with trendlines on the price chart. It generates long and short entry signals when price moves through predefined percentage thresholds in three steps for buy and se

Indicator v5 TrendSupport & resistance
Updated 5 months ago · None stated GitHub repository of Pivot Trendlines
2 stars

Christmas Toolkit [LuxAlgo] draws a decorative Christmas tree, garland, stars, and a moving deer on the price chart using labels. Width, offset, and garland rotations change the tree layout, while Static Tree and Deer Speed control whether the tree stays fixed

Indicator v5 Screeners & dashboardsOscillators & momentum Repaints
Updated 8 months ago · None stated GitHub repository of Christmas Toolkit [LuxAlgo]

CM MacD Ult MTF V2.1

by regalouisei
2 stars

This indicator plots a customizable MACD in a separate pane. It calculates the MACD line from fast and slow SMA or EMA values, a signal line, and a histogram of their difference. An optional indicator timeframe can use another chart resolution. Users can show

Indicator v5 Oscillators & momentumMoving averages
Updated 8 months ago · None stated GitHub repository of CM MacD Ult MTF V2.1

BB+RSI+OBV

by hasnocool
106 stars

This strategy combines Bollinger Bands, the Relative Strength Index (RSI), and On-Balance Volume (OBV) to generate trade signals directly on the price chart. Long entries trigger when price is above the middle SMA band, RSI is over 50, and OBV is rising. Short

Strategy v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of BB+RSI+OBV

This overlay indicator plots three moving averages chosen from EMA, SMA, HMA, VWMA, or RMA. Inputs also configure Stochastic RSI and RSI lengths, buy and sell thresholds, and an optional RSI divergence filter with its own lookback. A session window can restric

Indicator v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Pivot Trendlines with Divergence Scanner

Notch Filter (NOTCH)

by mihakralj
99 stars

Calculates and plots a second-order Infinite Impulse Response (IIR) notch filter directly on the price chart. Based on the RBJ Audio EQ Cookbook design, the filter attenuates a specific cyclic frequency component from the input series while preserving other ma

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Notch Filter (NOTCH)

This indicator plots pivot trendlines on the price chart and scans for divergences using RSI. It combines multiple moving averages, stochastic RSI indicators, and multi-timeframe stochastic RSI to generate buy and sell signals based on confluence. Entries foll

Indicator v5 TrendDivergence Repaints
Updated 5 months ago · None stated GitHub repository of Pivot Trendlines with Divergence Scanner

BB9 MA200 Strategy

by hasnocool
106 stars

A trend-following strategy combining Bollinger Bands with a long-term moving average filter. It plots a 200-period EMA along with standard 21-period Bollinger Bands directly on the price chart. Long entries trigger when both the upper and lower Bollinger Bands

Strategy v4 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of BB9 MA200 Strategy

NW - Nadaraya-Watson Kernel Regression is an indicator that applies a non-repainting Gaussian kernel regression filter to smooth price data. For each bar, it calculates a normalized weighted average of historical values using a Gaussian weighting function, ope

Indicator v6 Moving averagesTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of NW - Nadaraya-Watson Kernel Regression

This strategy draws on the price chart and manages long and short entries around pivot trendlines. It filters signals with three configurable moving averages, Stochastic RSI, a higher-timeframe Stochastic RSI, and optional RSI divergence. A session window can

Strategy v5 TrendOscillators & momentum Repaints
Updated 5 months ago · None stated GitHub repository of Pivot Trendlines with Divergence Scanner Strategy
1 stars

This indicator calculates a simple moving average (SMA) alongside a zero-centered symmetrized price series and its moving average. It uses Average True Range (ATR) to create a dynamic price offset, plotting a stepline translated moving average along with an up

Indicator v5 Moving averagesVolatility & bands
Updated 7 weeks ago · None stated GitHub repository of Symmetrized MA & Dynamic Offset
106 stars

This strategy plots a volume-weighted average price, Bollinger Bands built on that VWAP, a 200-period simple moving average, and Fibonacci pivot levels in a separate pane. It opens a long position when VWAP crosses above the band basis and the close is at or a

Strategy v4 Volatility & bandsSupport & resistance
Updated 2 years ago · GPL-3.0 GitHub repository of BBofVWAP with entry at Pivot Point

This strategy combines triple moving average trend filtering with Stochastic RSI levels and optional RSI divergence signals to generate long and short trade entries. It uses Average True Range multipliers to define dynamic take profit and stop loss levels for

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Pivot Trendlines with Divergence Scanner Strategy
3 stars

Premium Dashboard evaluates multiple technical indicators, including moving averages, oscillators, and price action metrics, displaying a consolidated confluence table on the main chart pane. It calculates bullish and bearish alignment across up to ten customi

Indicator v5 Screeners & dashboardsMoving averages
Updated 5 months ago · None stated GitHub repository of Premium Dashboard

Best Crypto DEMA

by hasnocool
106 stars

Best Crypto DEMA is a long-only trend-following strategy that generates trading signals based on Double Exponential Moving Average crossovers. It calculates fast and slow DEMAs across a user-defined timeframe resolution, with an option to derive prices from He

Strategy v4 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Best Crypto DEMA

Fair value bands

by regalouisei
2 stars

This overlay indicator plots a fair value basis on the price chart and surrounds it with threshold and deviation bands. The basis can be an SMA, EMA, HMA, RMA, WMA, VWMA, median, or a VWAP anchored to a chosen timeframe, using a selectable price source and len

Indicator v5 Moving averagesVolatility & bands
Updated 8 months ago · None stated GitHub repository of Fair value bands

Financials

by regalouisei
2 stars

The Financials indicator displays a fundamental and technical comparison table on the price chart for up to five user-selected stock symbols. It uses fundamental financial data requests to calculate key valuation and financial health ratios, including Price-to

Indicator v5 Screeners & dashboardsMoving averages
Updated 8 months ago · None stated GitHub repository of Financials

Binance Liquidations

by hasnocool
106 stars

Binance Liquidations is a strategy and separate-pane indicator that estimates derivative volume activity by calculating the volume spread between Binance perps and Coinbase spot data. It applies Weighted Moving Averages and a SuperSmoother filter to the volume

Strategy v4 VolumeMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Binance Liquidations
3 stars

This indicator plots a 20 period simple moving average of the closing price on the chart. The test_val input sets the number of last bars to show for the plot. It draws in a separate pane using price action principles and a moving average. No buy or sell signa

Indicator v5 Moving averagesCandlestick patterns
Updated 5 months ago · None stated GitHub repository of Price Action Candles
2 stars

This indicator plots FINRA daily short sale volume as colored columns alongside a simple moving average in a separate pane. Columns display in a brighter red shade whenever short volume exceeds the moving average. Users can configure the moving average length

Indicator v5 VolumeMoving averages
Updated 8 months ago · None stated GitHub repository of FINRA Daily Short Sale Volume
106 stars

The Binary Options Strategy Template is a Pine Script v4 strategy that overlays the 14-period simple moving average on the price chart. It signals long entries when the close price is above the SMA and short entries when below. Positions close automatically af

Strategy v4 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Binary Options Strategy Template

TMoon Mirror

by morindok
1 stars

TMoon Mirror plots a dynamic moving average line on the price chart that decays in length according to user-defined time ranges. It mirrors this line around a central level and plots top, middle, and bottom horizontal lines for support and resistance. An optio

Indicator v5 Moving averagesSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of TMoon Mirror
106 stars

This strategy calculates custom moving averages weighted by binomial coefficients. It plots a fast and a slow binomial moving average directly on the price chart, filling the space between them according to the trend direction. A long position enters when the

Strategy v4 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Binomial Moving Average

BlackSwan Strategy

by hasnocool
106 stars

This strategy detects large single-candle body expansions exceeding approximately 1.91% of price to enter momentum breakouts. It enters long positions on large bullish candles and short positions on large bearish candles. Positions are closed when the 144-peri

Strategy v4 BreakoutMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of BlackSwan Strategy

Golden Pocket

by regalouisei
2 stars

Golden Pocket indicator identifies potential reversal zones by drawing Fibonacci retracement lines and boxes between pivot highs and lows on the price chart. It applies moving average filters to confirm trend direction for both bull and bear setups. Users can

Indicator v5 Support & resistanceMoving averages
Updated 8 months ago · None stated GitHub repository of Golden Pocket

PF TV Golden 49 - NA NZ History

by pineforge-4pass
1 stars

This validation strategy evaluates warmup behavior and historical references using missing value functions like nz() and fixnan(). It calculates raw price changes, substitutes missing values, and computes an eight-period simple moving average score. The strate

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PF TV Golden 49 - NA NZ History
3 stars

This indicator calculates a 30-period and a 50-period simple moving average of the closing price and plots both lines in a separate pane. It fills the space between them teal when the shorter average is above the longer average and red when it is below. There

Indicator v5 Moving averagesTrend
Updated 5 months ago · None stated GitHub repository of Price Action Candles

Heatmap Volume [xdecow]

by regalouisei
2 stars

This indicator classifies volume by how many standard deviations it sits from a moving average and colors that classification as a heatmap in a separate pane. Extra-high, high, medium, normal, and low bands use multiplier thresholds. Users can color volume bar

Indicator v5 VolumeMoving averages
Updated 8 months ago · None stated GitHub repository of Heatmap Volume [xdecow]
106 stars

The Bollinger %B Candles Strategy evaluates price volatility and momentum by calculating Bollinger Bands %B oscillator values in a separate pane. It incorporates customizable moving average filters, ATR multipliers, and optional higher-timeframe yearly high or

Strategy v4 Volatility & bandsMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger %B Candles Strategy

This strategy builds a 3x3 covariance matrix from three collinear price series (close, close*2, close*3) and evaluates its eigenvalues to detect rank deficiency via NaN propagation. It generates long entries and exits using a 9/21 EMA crossover on the price ch

Strategy v6 Moving averagesVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PF typed-matrix probe 02 - eigen rank deficient
3 stars

This lightweight indicator calculates a 9-period Exponential Moving Average (EMA) and a 20-period EMA, plotting both directly on the price chart overlay. It also plots a third line in orange that displays the mathematical sum of the two EMAs as a simple trend

Indicator v5 Moving averagesTrend
Updated 5 months ago · None stated GitHub repository of Price Action Candles

PF UDT probe 04 - default param

by pineforge-4pass
1 stars

This Pine Script strategy implements a custom long-only EMA crossover on the price chart. It defines a UDT struct Cfg with a threshold method that accepts default parameter values. The strategy computes RSI and ATR indicators then uses three call styles to the

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PF UDT probe 04 - default param

Universe Of Mirrors

by morindok
1 stars

This Pine Script indicator calculates two pairs of parallel universes derived from moving averages of the source price using Fibonacci ratios of the golden ratio. It plots Universe A and Universe B lines along with their inverse counterparts, plus fill bands b

Indicator v5 TrendMoving averages
Updated 7 weeks ago · None stated GitHub repository of Universe Of Mirrors
1 stars

This strategy serves as a Pine Script v6 validation probe testing User-Defined Type (UDT) methods as conditional triggers for strategy entries. It calculates 9-period and 21-period Exponential Moving Averages to detect crossover and crossunder signals. Custom

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PF UDT Probe 14 - Method Drives Entry
1 stars

This indicator aggregates price action into constant-volume candles based on a configurable cumulative volume threshold. It renders these volume bars directly on the price chart using boxes and wick lines, updating dynamically during live formation. A Zero-Lag

Indicator v5 VolumeMoving averages
Updated 7 weeks ago · None stated GitHub repository of Volume Candles by BITMOON618
106 stars

Bollinger Band Breakout is a positional strategy combining Bollinger Bands with the Relative Strength Index (RSI). It opens long positions when price crosses above the upper Bollinger Band while 14-period RSI is between 60 and 70. Short entries trigger when pr

Strategy v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Band Breakout

This indicator plots a linear regression line based on closing prices using a 10-period window. The regression calculates a straight line that best fits the price data points over the specified length. It draws the resulting trend line in a separate pane for v

Indicator v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of Price Action Candles with Linear Regression
2 stars

Intersection Value Functions calculates the exact price level where two series intersect during a crossover or crossunder. It uses linear interpolation based on line slopes between consecutive bars to pinpoint the exact crossover value. The indicator plots two

Indicator v5 Moving averagesSupport & resistance
Updated 8 months ago · None stated GitHub repository of Intersection Value Functions
1 stars

This Pine Script v6 strategy is a validation probe for nested method calls on a user-defined type. Each bar it feeds close, a simple moving average, and standard deviation through a method chain that returns a z-score. It enters long only when that z-score is

Strategy v6 Moving averagesVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PF UDT probe 18 - method calls method

This strategy combines Volume Weighted Moving Average (VWMA) Bollinger Bands with 200-period and 50-period Exponential Moving Averages (EMAs). It identifies long trade opportunities when the 50 EMA is above the 200 EMA and price falls to or below the lower Fib

Strategy v4 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Band with Fib Golden Ratio (0.618)

This overlay indicator combines price-action swing structure with a MACD comparison and a dual moving-average filter. It finds pivot highs and lows, labels higher highs, lower highs, higher lows and lower lows, and builds a trend bias from those swings. It rep

Indicator v5 Candlestick patternsOscillators & momentum Repaints
Updated 5 months ago · None stated GitHub repository of Price Action Candles with MACD Signals

PF_WS01_REV

by pineforge-4pass
1 stars

This strategy uses two exponential moving averages (fast period 5, slow period 13) to detect trend changes via crossover signals on the price chart. It enters long on fast EMA crossing above slow EMA and short on the reverse crossover. The script includes expl

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

Zero-Lag Fractal KdV Smoothing is an indicator that applies fractal dimension-based smoothing to price data using a KdV-like wave equation. It computes a weighted average between the current close price and the prior filtered value, where the weights depend on

Indicator v5 Moving averagesVolatility & bands
Updated 7 weeks ago · None stated GitHub repository of Zero-Lag Fractal KdV Smoothing

This overlay strategy combines swing price structure with MACD structure and two higher-timeframe exponential moving averages. It finds pivot highs and lows over ten bars, labels higher highs, lower highs, higher lows and lower lows, and builds matching states

Strategy v5 TrendOscillators & momentum Repaints
Updated 5 months ago · None stated GitHub repository of Price Action Candles with MACD Signals Strategy
1 stars

This trend-following strategy calculates a primary filter using an EMA, SMA, or a blended average of both with scaled lengths, plotting it alongside a confirmation EMA on the price chart. Long positions are triggered when the primary filter crosses above the c

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge - Caliper Scalar Switch
106 stars

This strategy plots Bollinger Bands on the price chart using the middle band as a simple moving average and standard deviation bands. It signals long entries when the close price crosses below the middle band combined with Aroon up trending above 90 and within

Strategy v4 Moving averagesVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger bands And Aroon Scalping

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