Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 48)

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

1 stars

This indicator identifies regular and hidden divergences across up to ten technical oscillators simultaneously, including RSI, MACD, Stochastic, CCI, Momentum, OBV, VW-MACD, CMF, MFI, and an external source. It plots divergence lines and text labels directly o

Indicator v4 DivergenceOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Divergence for Many Indicators yzz

RSI Please!

by tseitz
1 stars

A Pine v4 strategy that plots a 66-period weighted moving average and combines a 12/26 MACD, a 14-period RSI, candle sizes and rolling highs and lows over a long lookback. Inputs set take-profit and stop-loss percentages for each side, the long lookback and th

Strategy v4 Oscillators & momentumMoving averages Repaints
Updated 4 years ago · None stated GitHub repository of RSI Please!

Moving Median

by everget
947 stars

Moving Median calculates the 50th percentile value of a specified price source over a user-defined lookback period using the nearest rank method. It plots directly on the main price chart as a single line. When trend highlighting is enabled, the plot changes c

Indicator v4 Moving averagesTrend
Updated 12 days ago · GPL-3.0 GitHub repository of Moving Median

ATR Mean Reversion

by hasnocool
106 stars

This strategy identifies mean reversion opportunities using ATR bands on the price chart. It enters long positions when price touches the lower band (open minus ATR) with no open position and within the set time filter. Positions exit on the upper band breach,

Strategy v5 Mean reversionVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of ATR Mean Reversion
47 stars

This indicator plots a Hull Moving Average on the price chart. It computes weighted moving averages of the selected source over half the period and the full period, subtracts the full average from twice the half average, then smooths that difference with a wei

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Hull Moving Average (HMA)
13 stars

This strategy uses the Noro Trend Ribbon to determine trend direction and open long or short positions. It defines a corridor from recent high and low prices and enters positions when price crosses the corridor boundaries, sized as a percentage of capital. Fas

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of R010 R Noro Trend Ribbon

WaveTrend [LazyBear]

by avatar-lavventura
2 stars

The WaveTrend indicator calculates two oscillator lines, wt1 and wt2, using a channel length on hlc3 price and an average length. It plots wt1 in green and wt2 in red in a separate pane together with overbought and oversold horizontal levels and the histogram

Indicator v4 Oscillators & momentumMoving averages
Updated 7 months ago · None stated GitHub repository of WaveTrend [LazyBear]

McGinley Dynamic Indicator (MGDI)

by mushroom-men-Trading
2 stars

The McGinley Dynamic Indicator calculates an adaptive smoothed value that responds dynamically to recent price changes. It plots one line on the price chart to show trend direction and strength. Users set the lookback period for the initial average and the fac

Indicator v6 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of McGinley Dynamic Indicator (MGDI)

Quatro SMA

by wynnforthework
2 stars

The Quatro SMA strategy identifies trend direction using four Simple Moving Averages combined with a volume confirmation filter. Long entries trigger when three fast SMAs align sequentially above a 200-period SMA while current bar volume exceeds 2.5 times its

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Quatro SMA
1 stars

This Pine Script strategy identifies trend changes by checking for crossovers between fast and slow EMAs on the current timeframe. It confirms the trend with a higher timeframe EMA confluence gate set to 60 minutes. The strategy draws its signals directly on t

Strategy v6 TrendMoving averages
Updated 7 days ago · Apache-2.0 GitHub repository of MTF probe 11 - HTF bracket manual trail
330 stars

The MACD + RSI Strategy [Alorse] combines moving average convergence divergence (MACD) crossovers with recent Relative Strength Index (RSI) extreme levels to generate long trading signals overlaid directly on the price chart. A long entry triggers when the MAC

Strategy v4 Oscillators & momentumMoving averages
Updated 2 months ago · None stated GitHub repository of MACD + RSI Strategy [Alorse]

ATR RSI Strategy v2

by hasnocool
106 stars

This strategy combines Average True Range (ATR) and the Relative Strength Index (RSI) to generate volatility-filtered momentum trades on the price chart. It checks whether a normalized ATR moving average falls within user-defined bounds and requires current AT

Strategy v5 Oscillators & momentumVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of ATR RSI Strategy v2
47 stars

This indicator applies the hyperbolic tangent to a chosen source series and plots the result in a separate pane. It centers the transform on a 200-bar simple moving average of that source, multiplies the deviation by a steepness factor, and maps the output int

Indicator v6 Moving averagesMean reversion
Updated 8 months ago · MIT GitHub repository of Hyperbolic Tangent (TANH)
5 stars

This indicator plots 50, 100 and 150 period exponential moving averages on the price chart and measures each average slope in degrees. It places a long label when the averages stack upward, all slopes exceed the angle limit, and price closes back above the sho

Indicator v4 TrendMoving averages Repaints
Updated 3 years ago · Apache-2.0 GitHub repository of Triple EMA + Sloping Trend

MESA Adaptive Moving Average (MAMA)

by mushroom-men-Trading
2 stars

The MAMA indicator calculates the MESA Adaptive Moving Average and Filtered Adaptive Moving Average using Ehlers' MESA algorithm. It plots both lines in yellow directly on the price chart as a smoothed trend indicator. Main settings include the source series a

Indicator v6 TrendMoving averages Repaints
Updated 9 months ago · None stated GitHub repository of MESA Adaptive Moving Average (MAMA)
2 stars

The SVIX Bollinger Bands Strategy V2 uses Heikin-Ashi price calculations to plot customized Bollinger Bands and Keltner Channels directly on the price chart. It triggers a long entry when the Heikin-Ashi close crosses above the lower Bollinger Band. The strate

Strategy v5 Volatility & bandsMean reversion
Updated 1 year ago · None stated GitHub repository of SVIX Bollinger Bands Strategy V2

This strategy plots multi-timeframe Bollinger Bands on the price chart and trades mean reversion around them. It enters long when the close is below the higher-timeframe lower band and, if enabled, short when the close is above the upper band. An optional high

Strategy v4 Volatility & bandsMean reversion Repaints
Updated 2 months ago · None stated GitHub repository of MTF Bollindger Bands Strategy [Alorse]

This strategy trades long and short on the price chart using a multi-timeframe TradingLatino setup. It requires EMA 10 to cross or sit above or below EMA 55 on the one-hour, four-hour, and daily charts, together with a positive ADX slope, a directional monitor

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

This strategy evaluates bullish trend strength by calculating three Exponential Moving Averages (50, 100, and 150 periods) alongside their average slope angles in degrees. It plots the EMAs on the price chart and triggers long entries when the moving averages

Strategy v4 TrendMoving averages
Updated 3 years ago · Apache-2.0 GitHub repository of Triple EMA + Sloping Trend Long Strategy
4 stars

This strategy trades momentum breakouts based on the alignment of three exponential moving averages. It enters a long position when all three EMAs align in ascending order and enters short when they align in descending order. Positions are managed with ATR-bas

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of Triple EMA Strategy [trugurpala]

Wick Hunter VWAP

by avatar-lavventura
2 stars

This indicator calculates the volume-weighted average price using a specified period and plots it on the price chart along with upper and lower bands set at a percentage deviation above and below the VWAP value. The bands serve as reference levels for potentia

Indicator v4 Moving averagesSupport & resistance
Updated 7 months ago · None stated GitHub repository of Wick Hunter VWAP

Modified Moving Average (MMA)

by mushroom-men-Trading
2 stars

This indicator calculates a modified moving average that mixes a simple moving average with a weighted component over a circular buffer. It plots the resulting line on the price chart. The period sets the lookback, which must be at least 2, and the source choo

Indicator v6 Moving averages
Updated 9 months ago · None stated GitHub repository of Modified Moving Average (MMA)

Wave Trend Overbought Oversold

by wynnforthework
2 stars

This indicator plots the WaveTrend Oscillator in a separate pane. It computes an EMA of normalized price deviations from the median price divided by standard deviation, then applies an SMA to generate the oscillator line. Signals trigger on overbought conditio

Indicator v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of Wave Trend Overbought Oversold

TMA Overlay

by webcrack4
1 stars

TMA Overlay plots four smoothed moving averages of close, with lengths 21, 50, 100 and 200, on the price chart. The 100-period line can be hidden. It fills the area between a two-period EMA and the 200-period smoothed average green or red according to which is

Indicator v4 Moving averagesCandlestick patterns
Updated 9 months ago · None stated GitHub repository of TMA Overlay

Aggregate Signal (v.2)

by capissimo
114 stars

Aggregate Signal (v.2) is an oscillator indicator that combines multiple technical factors into a single composite score. It scales OHLCV data using minimax normalization and evaluates indicators such as MACD, RSI, Stochastic, CCI, Momentum, On-Balance Volume,

Indicator v4 Oscillators & momentumMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of Aggregate Signal (v.2)

This strategy plots automated Fibonacci bands paired with exponential moving averages on the price chart across strong, regular, and sideways trend modes. It triggers entry orders upon price interactions with configured Fibonacci thresholds and bullish signals

Strategy v5 Support & resistanceMoving averages Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Auto Fib Golden Pocket Band - Autofib Moving Average

This indicator calculates the Integral of Linear Regression Slope (ILRS), an overlay trend filter originally described by John Ehlers. It computes the rolling least-squares linear regression slope over a user-defined window using a circular buffer and integrat

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Integral of Linear Regression Slope (ILRS)

This strategy enters long or short when price closes beyond a Donchian channel and can require a slow moving average, called the tide, to agree with the direction. It sizes each unit from ATR risk, sets an initial ATR stop, and adds units after further ATR mov

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 5: Close-Confirmed + Tide

This strategy enters long or short when eight conditions align over the last two bars. It requires EMA 10 and EMA 55 alignment on the one-hour, four-hour and daily charts, a positive ADX slope, matching monitor direction, and price relative to a 400-bar point

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

EMA System

by eddiebelaval
7 stars

EMA System plots four exponential moving averages on the price chart and marks a long-only pullback setup. It treats price above the 200 EMA and the 21 EMA above the 50 EMA as a valid trend, then flags a buy when price is near the 21 EMA, volume is below its s

Indicator v6 TrendMoving averages
Updated 3 months ago · None stated GitHub repository of EMA System

This strategy plots three exponential moving averages on the price chart and measures their average slope in degrees over a chosen lookback. The visible logic looks for a stacked EMA order and a close that crosses back above the shortest average after dipping

Strategy v4 TrendMoving averages
Updated 3 years ago · Apache-2.0 GitHub repository of Triple EMA + Sloping Trend Short Strategy
4 stars

This strategy plots a fast and a slow exponential moving average on the price chart and enters when they cross. A long opens when the fast average crosses above the slow average, and a short opens on a cross below unless long-only mode is on. An optional trend

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of Universal Strategy [trugurpala]

This indicator plots custom dual moving average crossovers directly on the price chart to signal potential Call (long) and Put (short) entries. Users can choose from SMA, EMA, WMA, VWMA, or HMA types for both moving averages. Upon a confirmed crossover, the sc

Indicator v5 Moving averagesTrend
Updated 5 months ago · None stated GitHub repository of Dual MA Crossover Call Put Targets

Wick Hunter VWAP

by avatar-lavventura
2 stars

Calculates a custom Volume Weighted Average Price (VWAP) over a user-defined rolling period using standard HLC3 price data. It plots the central VWAP value alongside upper and lower percentage bands positioned 0.7 percent above and below the main average line.

Indicator v4 Moving averagesVolume
Updated 7 months ago · None stated GitHub repository of Wick Hunter VWAP

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
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

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
99 stars

This indicator plots a cumulative moving average, also called a running mean, of a chosen price series on the price chart. It updates one bar at a time with Welford's method, weighting each new value by one over the bar count so the line is the mean of all his

Indicator v6 Moving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Cumulative Moving Average

Envelope

by TWODS-CAPITAL
37 stars

This indicator plots a percentage envelope around a moving average of the selected source on the price chart. It computes a simple or exponential moving average as the basis, then places upper and lower bands a fixed percentage above and below that line. The l

Indicator v5 Moving averagesVolatility & bands
Updated 3 years ago · MIT GitHub repository of Envelope

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
2 stars

Dynamic Gap Probability Tool is a price-chart indicator that plots a selectable moving average and measures how far the close sits from it as a rounded percentage. It stores historical counts of bars above and below that average at each deviation size, then sh

Indicator v6 Moving averagesScreeners & dashboards
Updated 8 months ago · None stated GitHub repository of Dynamic Gap Probability Tool

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

HMD MACD

by Web3Degenerate
2 stars

HMD MACD plots a moving-average convergence divergence oscillator in a separate pane. It subtracts a slow moving average from a fast moving average of the chosen source, then smooths that difference into a signal line. Users can select SMA or EMA for both line

Indicator v5 Oscillators & momentumMoving averages
Updated 2 years ago · None stated GitHub repository of HMD MACD

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

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