Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 25)

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

VWAP (Cumulative)

by milocaetano
48 stars

The VWAP Cumulative indicator calculates and plots a continuous Volume Weighted Average Price directly on the main price chart. Instead of resetting at session or daily boundaries, it computes a running cumulative VWAP using typical price and volume across all

Indicator v5 TrendMoving averages
Updated 3 days ago · MIT GitHub repository of VWAP (Cumulative)
47 stars

This indicator plots the Arnaud Legoux Moving Average on the price chart. It weights recent source bars with a Gaussian window whose peak is shifted by the offset and whose width is set by sigma. The period input sets the lookback, and the source input selects

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Arnaud Legoux Moving Average (ALMA)
43 stars

This indicator plots the percentage difference between a fast exponential moving average and a slow one, scaled by the close, in a separate pane. It treats that gap as a standardized measure of trend strength and draws a zero line. Users set both EMA lengths a

Indicator v5 Moving averagesOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Standardized MA Difference

Engulfing Candles

by tistaharahap
25 stars

This overlay indicator marks bullish and bearish engulfing candles with arrows on the price chart. A bullish mark requires a prior down candle and a current bar that meets the script's open and close relationship; a bearish mark uses the opposite pattern. An o

Indicator v4 Candlestick patternsMoving averages
Updated 6 years ago · None stated GitHub repository of Engulfing Candles

Benso RSI + PMARP

by benso87
24 stars

This indicator plots an RSI and a PMARP line in a separate pane. It calculates RSI from a chosen source and length, then overlays an SMA or EMA signal. Horizontal bull and bear control and critical levels scale the oscillator. Optional arrows mark regular and

Indicator v5 Oscillators & momentumDivergence
Updated 4 years ago · MPL-2.0 GitHub repository of Benso RSI + PMARP
20 stars

This indicator plots John Ehlers's predictive moving average on the price chart. It builds a weighted average of the selected source, applies a second weighted average, and projects a prediction with a slower trigger. It draws the higher of those two series an

Indicator v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of John F. Ehlers - Predictive Moving Average
16 stars

This strategy implements a trend-following Donchian breakout system with pullback-based pyramiding. It initiates trades on Donchian channel breakouts and sizes positions based on ATR volatility risk. Instead of immediately adding units when the trend advances

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 14: Pullback Pyramid

Pocket Scout - SPY/QQQ

by chris-c-thomas
14 stars

Pocket Scout - SPY/QQQ is a mobile-optimized intraday bias indicator designed for major US equity ETFs and indices. It overlays a 9/21/50 EMA ribbon, session VWAP, prior day high/low/close levels, and intraday high/low lines directly on the main price chart. T

Indicator v6 TrendOscillators & momentum Repaints
Updated 6 months ago · MIT GitHub repository of Pocket Scout - SPY/QQQ

Crossing EMAs C

by ruckard
13 stars

Crossing EMAs C is an overlay strategy designed to demonstrate moving average crossover signals integrated with Zignaly alert triggers. Despite its name, the script calculates 14-period and 28-period simple moving averages. It enters a long position when the f

Strategy v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Crossing EMAs C

EMA Ribbon (9/21/55) - Eterna

by EternaHybridExchange
9 stars

EMA Ribbon (9/21/55) is a TradingView strategy that calculates three exponential moving averages with periods 9, 21 and 55. It plots the EMAs on the price chart and colors the background ribbon according to bullish or bearish alignment. The strategy enters lon

Strategy v5 TrendMoving averages
Updated 7 months ago · MIT GitHub repository of EMA Ribbon (9/21/55) - Eterna
8 stars

This strategy identifies trend retracements and breakout entries using an adjustable moving average ribbon alongside higher-timeframe anchored moving averages, fractal pivots, and support and resistance level extensions. Bar colors can be customized using a 3-

Strategy v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of Pullback Trading Tool ALT

This indicator plots three exponential moving averages and a Bollinger Band envelope on the price chart. The band basis can be an SMA, EMA, SMMA, WMA, or VWMA, with adjustable length, source, standard-deviation multiplier, and horizontal offset. Default EMA le

Indicator v6 Moving averagesVolatility & bands
Updated 5 months ago · None stated GitHub repository of EMA 21, 50, 200 & Bollinger Bands
7 stars

This indicator plots standard Bollinger Bands alongside scaled Average True Range (ATR) bands directly on the price chart. It is designed to assist traders in identifying price consolidation zones, potential breakout levels, dynamic stops, and take-profit targ

Indicator v5 Moving averagesVolatility & bands
Updated 1 year ago · MPL-2.0 GitHub repository of Bollinger and ATR Bands

This strategy overlays a 90-period simple moving average from the one-hour and four-hour charts with a daily session VWAP on the price chart. It buys when VWAP is at or above the four-hour average and crosses above the one-hour average, and sells short in the

Strategy v5 TrendMoving averages Repaints
Updated 3 years ago · MIT GitHub repository of 4h Bullish Buy 1h Bearish Sell Session

MACD

by trsdn
6 stars

Standard Moving Average Convergence Divergence (MACD) indicator implementation. It calculates the difference between a fast exponential moving average and a slow exponential moving average to form the MACD line. It then smooths the MACD line with a third movin

Indicator v5 Oscillators & momentumMoving averages
Updated 7 days ago · MIT GitHub repository of MACD

Trend Following MOMO

by TradersPost
6 stars

This indicator calculates 8-period and 21-period Exponential Moving Averages to identify trend direction and momentum crossovers on the price chart. When the 8-period EMA crosses above the 21-period EMA, a buy signal triangle is plotted below the bar. A cross

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Trend Following MOMO

Cerebr Sirius

by jerryinyang
5 stars

Cerebr Sirius is a multi-timeframe trend and momentum indicator overlay that combines exponential moving average trend analysis with VuManChu WaveTrend logic and Money Flow Index. It calculates fast and slow exponential moving averages to identify trend direct

Indicator v4 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Cerebr Sirius
5 stars

This indicator overlays multiple technical analysis tools onto the price chart to evaluate trend direction and trade setups. It computes an exponential moving average, a smoothed Stochastic RSI, a custom Williams Alligator using smoothed moving averages with o

Indicator v4 TrendMoving averages
Updated 3 years ago · Apache-2.0 GitHub repository of 200 EMA + Alligator + Stochastic

SMA Crossover

by DexWilder
4 stars

This strategy plots a fast and a slow simple moving average on the price chart. It enters long when the fast average crosses above the slow average and closes any open short at the same time. It closes the long and enters short when the fast average crosses be

Strategy v5 TrendMoving averages
Updated 3 days ago · None stated GitHub repository of SMA Crossover

BTC Trend Pullback

by trugurpala
4 stars

This strategy enters long when price and a fast EMA sit above a slower trend EMA and RSI crosses back above a pullback level. Shorts use the opposite RSI cross only when long-only mode is off. It sizes each order as a percentage of equity and places an ATR-bas

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · MIT GitHub repository of BTC Trend Pullback

动量策略-连续开单

by YooooungLee
4 stars

This strategy pairs dual exponential moving averages with a price momentum calculation to identify trend direction. It initiates long entries when the fast EMA trades above the slow EMA while momentum is positive, and enters short positions when the fast EMA f

Strategy v6 TrendOscillators & momentum
Updated 10 months ago · Apache-2.0 GitHub repository of 动量策略-连续开单

Linear Regression Channel

by Hugs-4-Bugs
4 stars

The Linear Regression Channel indicator calculates the slope, average and intercept of a linear regression line over the specified length using the chosen source. It plots the base regression line and upper and lower channels on the price chart. The channels a

Indicator v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Linear Regression Channel

Hull Suite by InSilico

by ShabbirHasan1
4 stars

Hull Suite by InSilico calculates and plots variations of the Hull Moving Average directly on the main price chart. It supports standard Hull MA, Exponential Hull MA, and Triple Hull MA calculations. The indicator renders the values as a single line or a fille

Indicator v4 TrendMoving averages
Updated 1 year ago · Custom licence GitHub repository of Hull Suite by InSilico

GERMENCIK-AT

by Kalumur
4 stars

This indicator plots custom upper and lower bands on the price chart based on a weighted moving average using hlc3 source, length of 50, and a standard deviation multiplier of 2. It also includes Arnaud Legoux Moving Average with adjustable length, offset, and

Indicator v5 Moving averagesVolatility & bands Repaints
Updated 2 years ago · None stated GitHub repository of GERMENCIK-AT

Calculates Kaufman's Adaptive Moving Average (KAMA) based on Kaufman's Efficiency Ratio to adjust smoothing dynamically according to market volatility and efficiency. Plotted directly on the price chart, it adapts faster during trending markets and slows down

Indicator v5 Moving averagesTrend
Updated 3 years ago · None stated GitHub repository of Kaufman's Adaptive Moving Average (KAMA)

Snagprofit WMA

by dearvn
4 stars

Snagprofit WMA is a multi-timeframe trend indicator that calculates a 125-period Weighted Moving Average across the 1-minute, 5-minute, 15-minute, and 1-hour timeframes alongside a local 50-period Simple Moving Average. It identifies momentum signals when pric

Indicator v5 Moving averagesTrend Repaints
Updated 4 years ago · None stated GitHub repository of Snagprofit WMA

TQQQ MA+TSI

by yalili8521
2 stars

The TQQQ MA+TSI strategy executes trades based on triple simple moving average alignment combined with True Strength Index (TSI) divergence or momentum filters. Designed primarily for intraday stock trading, it evaluates price accumulation across fast, mid, an

Strategy v6 TrendOscillators & momentum
Updated 9 days ago · None stated GitHub repository of TQQQ MA+TSI
2 stars

This indicator detects trend-following pullback entries using the Rank Correlation Index (RCI) and a triple Exponential Moving Average (EMA) ribbon. It identifies bullish setups when price maintains an upward EMA alignment while RCI reverses from oversold leve

Indicator v5 Oscillators & momentumMoving averages
Updated 2 weeks ago · None stated GitHub repository of Ver16-19 5M Entry Signal

On Balance Volume

by TamTH-Dev
2 stars

Calculates On Balance Volume (OBV) and displays it in a separate pane alongside optional exponential moving averages. Traders can toggle and configure three distinct EMAs with default lengths of 21, 55, and 144. The indicator provides extensive visual settings

Indicator v6 VolumeMoving averages
Updated 6 weeks ago · None stated GitHub repository of On Balance Volume

MATIC 2H ZEGUELA DEMABOT

by danielvm-git
2 stars

This strategy calculates up to three Double Exponential Moving Averages (DEMA) to determine trade entries directly on the price chart. It generates long signals on DEMA crossovers and short signals on crossunders, with conditional logic depending on active len

Strategy v4 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of MATIC 2H ZEGUELA DEMABOT

XAUUSD Strategy V4.17 is a Pine Script strategy that plots buy and sell signals on the gold price chart using Stochastic oscillator, RSI, EMA trend filters, Fibonacci zones, and ATR-based risk management. It supports confirm-only, confirm+scalp, or scalp-only

Strategy v5 Oscillators & momentumMoving averages

CM Ult MacD MTF

by avatar-lavventura
2 stars

This indicator plots a multi-timeframe MACD oscillator using customizable fast length, slow length, source, and signal smoothing. It displays the MACD line, signal line, and histogram in a separate pane, with options for trend-based coloring of lines, highligh

Indicator v5 Oscillators & momentumMoving averages
Updated 7 months ago · None stated GitHub repository of CM Ult MacD MTF

This indicator functions as a range-defining plugin for the Grid Bot system, calculating dynamic upper and lower grid boundaries based on a moving average and standard deviation offsets. It supports 17 different moving average algorithms, including EMA, SMA, H

Indicator v6 Moving averagesVolatility & bands Repaints
Updated 8 months ago · MIT GitHub repository of Grid Bot Moving Avarage StDev [psyll]

This indicator compares US sector ETFs with technology and utilities using price ratios that can be log-transformed. It smooths those ratios with a simple moving average and measures fast and mid-length percentage change to classify financials versus technolog

Indicator v5 Oscillators & momentumMoving averages
Updated 10 months ago · MIT GitHub repository of Sector RS & Intermarket Regime Dashboard

CTC Comet Strategy 7.2024.1

by wynnforthework
2 stars

This strategy executes trades based on dual exponential moving average trend alignment, customizable Bollinger Bands, and normalized ATR volatility thresholds. It enters positions in the direction of the moving average trend and manages risk using a dynamic st

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of CTC Comet Strategy 7.2024.1

This indicator calculates Mansfield Relative Strength by comparing the current asset's close against a reference index, sector, or industry benchmark. It plots the resulting relative strength curve alongside an exponential moving average in a separate pane, hi

Indicator v6 TrendMoving averages
Updated 1 year ago · MPL-2.0 GitHub repository of Mansfield Relative Strength indicator
2 stars

This indicator overlays trend and momentum analysis directly onto the price chart by combining a customizable moving average trend filter with dual QQE MOD calculations. It determines trend direction using selectable moving average types, including EMA, ALMA,

Indicator v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of 超级趋势 + QQE 集成指标

This indicator plots a short and a long simple moving average on the price chart and marks buy and sell labels when they cross, but only inside a user-set clock window. The short and long periods and the start and end times, entered as HHMM integers, control t

Indicator v5 Moving averagesSessions & time

VIX 10SMA

by klevler
2 stars

This indicator plots candles for a selected symbol, defaulting to CBOE:VIX, in a separate pane together with a simple moving average of close and a line at 1.2 times that average. It colors the background when the symbol high is more than 20 percent above the

Indicator v5 Volatility & bandsMoving averages
Updated 2 years ago · MIT GitHub repository of VIX 10SMA
1 stars

The Moving Average Exponential indicator plots an EMA of the input source with a user-defined length on the price chart. It supports offset for shifting the plot. Additional smoothing options apply different MA types to the EMA output and optionally overlay Bo

Indicator v6 Moving averagesVolatility & bands
Updated 2 days ago · Custom licence GitHub repository of Moving Average Exponential

I_ma

by GammaExpansion
1 stars

This indicator calculates and plots a wide selection of moving averages across multiple lookback lengths, including simple, exponential, running, weighted, volume-weighted, Hull, Arnaud Legoux, and linear regression curves. It also computes chained and volume-

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

EMA1-EMA2 Analiz

by engtuncay
1 stars

This indicator plots two exponential moving averages and two moving averages on the price chart. It calculates bullish and bearish crossovers between the primary moving averages to generate signals, displaying transition markers above and below bars as well as

Indicator v6 Moving averagesTrend
Updated 7 days ago · None stated GitHub repository of EMA1-EMA2 Analiz

MTF Overlay Suite

by MuhammadMuhamid
1 stars

A price-chart overlay that collects many modules in one script: four SMAs, four EMAs, three Supertrends, VWAP, Bollinger Bands, standard pivot points, support and resistance zones, trendlines and an automatic Fibonacci retracement. Each moving average can use

Indicator v6 Moving averagesSupport & resistance Repaints
Updated 13 days ago · None stated GitHub repository of MTF Overlay Suite
1 stars

This Pine Script strategy detects pin bar patterns on the price chart using body size relative to ATR and shadow conditions for long and short signals. It applies engulfing candle confirmation and filters by EMA trend direction with volatility bands. Multiple

Strategy v6 TrendVolatility & bands
Updated 3 weeks ago · None stated GitHub repository of Pin Bar Strategy Developed

VWAP Signal Suite

by JACKZHOU0521
1 stars

This indicator calculates a session-resetting Volume Weighted Average Price (VWAP) along with inner and outer standard deviation bands plotted directly on the price chart. It provides bar-close confirmed visual signals for VWAP crossovers, pullback reclaims fo

Indicator v6 Moving averagesVolatility & bands
Updated 5 weeks ago · None stated GitHub repository of VWAP Signal Suite

VWAP

by DEVfancybear
1 stars

This indicator calculates and plots the Volume Weighted Average Price (VWAP) directly on the main price chart using typical price values. It serves as a benchmark representing the average price weighted by volume throughout the session. Users can customize the

Indicator v6 Moving averagesVolume
Updated 7 weeks ago · MIT GitHub repository of VWAP

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