Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 37)

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 combines Volume Weighted Bands, a Hull Moving Average with Keltner Channels, and a Swing Profile directly on the price chart. It calculates volume-weighted trend lines, ATR volatility bands, and swing structures to plot dynamic support and resis

Indicator v6 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of Keltner Hull Swing Profile

EMA Ribbon

by Basant1Saini
1 stars

The EMA Ribbon strategy plots six exponential moving averages (periods 8, 13, 21, 34, 55, 89) on the price chart to form a visual ribbon. It detects trend direction using full stack alignment, partial alignment (at least 4 of 6 consecutive pairs), or fast EMA

Strategy v5 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of EMA Ribbon

[Z] Moving Average

by zhuzp98
1 stars

This indicator calculates and plots eight separate moving averages directly on the price chart. It provides seven Simple Moving Averages with default periods of 5, 10, 20, 30, 60, 120, and 200, alongside one 20-period Exponential Moving Average. Each moving av

Indicator v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of [Z] Moving Average
1 stars

This indicator plots the 14-period simple moving average on the price chart. It defines functions that detect crossovers in the SMA line with price, RSI crossing 70 and 30 levels, and momentum line crossing zero. When these conditions occur, the script sends a

Indicator v4 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Alert with Multiple Indicators

Bjorgum MTF MA

by nvFede
1 stars

A Pine v4 overlay that draws up to three moving averages, each with its own type, length, optional timeframe and colours. Available types include EMA, HMA, WMA, DEMA, VWMA, VWAP, T3 and others. A length of zero disables an average. Lines and bars can be colour

Indicator v4 Moving averagesTrend
Updated 3 years ago · None stated GitHub repository of Bjorgum MTF MA

Grid Level

by JohnsonHsiao
1 stars

This indicator constructs a grid of upper and lower price levels centered around a Simple Moving Average baseline. It calculates ten upper bands and ten lower bands spaced evenly at step multipliers defined by the grid gap percentage. These bands are plotted d

Indicator v5 Support & resistanceMoving averages
Updated 3 years ago · None stated GitHub repository of Grid Level

Fast EMA

by tseitz
1 stars

A Pine v4 strategy that plots a very fast two-period EMA of the close in orange on the price chart. It goes long whenever the EMA is above its previous value and short whenever it is below, closing the opposite side, so it flips direction as the slope changes

Strategy v4 Moving averagesScalping Repaints
Updated 4 years ago · None stated GitHub repository of Fast EMA
947 stars

The Ahrens Moving Average calculates a smoothed trend-following line using a recursive formula that factors in both the immediate previous average and a historical average value. It plots directly on the main price chart as a continuous overlay. When color hig

Indicator v4 Moving averagesTrend
Updated 12 days ago · GPL-3.0 GitHub repository of Ahrens Moving Average
330 stars

Trend EMA + RSI is a trend-following strategy that generates trading signals using three exponential moving averages and RSI filter conditions. Long trades execute when a fast EMA crosses above a slow EMA while remaining above a long-term baseline EMA on a bul

Strategy v5 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Trend EMA + RSI [Alorse]

EMA Strategy

by capissimo
114 stars

Calculates a central Exponential Moving Average with upper and lower channel bands offset by a fixed pip distance, inspired by LazyBear's Pip Collector script. Generates buy and sell signals when price interacts with the envelope bands, with an optional ATR vo

Indicator v4 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of EMA Strategy

This strategy generates trading signals on the 5-minute price chart using Williams Fractals for trend reversals, combined with EMA fast and slow trend filters and optional RSI confirmation. Long entries trigger on bullish fractals aligned with rising EMA and R

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of 5min Williams Fractals Scalping (3commas)

Example 2

by be-thomas
65 stars

This indicator calculates a normalized percentage oscillator based on the distance between the closing price and a 10-period simple moving average. It displays the oscillator line alongside a dotted zero reference line in a separate indicator pane. The space b

Indicator v5 Oscillators & momentumMoving averages
Updated 6 days ago · GPL-3.0 GitHub repository of Example 2
47 stars

This indicator calculates and plots the cumulative arithmetic mean of a selected price series from the very beginning of the chart history. It continuously sums non-null values and divides by the total count of valid bars seen so far. The user can adjust the i

Indicator v6 Moving averages
Updated 8 months ago · MIT GitHub repository of Cumulative Mean (CUMMEAN)

No Repaint - MACD

by dearvn
43 stars

This indicator plots a MACD oscillator in a separate pane. It calculates the source as the average of the previous ten open prices, then subtracts a slow moving average from a fast moving average. A signal line and a histogram follow. Fast, slow, and signal le

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

Bollinger Bands

by TWODS-CAPITAL
37 stars

This indicator calculates and plots standard Bollinger Bands directly on the price chart. It computes a central basis line using a simple moving average of the selected price source over a user-defined period. Upper and lower bands are constructed by adding an

Indicator v5 Volatility & bandsMoving averages
Updated 3 years ago · MIT GitHub repository of Bollinger Bands

Divergenced H002

by ruckard
13 stars

Divergenced H002 is an automated trading strategy designed to identify divergence setups using transitions in the Squeeze Momentum Indicator combined with Curie moving average closing lines for exit conditions. It detects bearish divergence when momentum weake

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Divergenced H002

VWAP Bounce - Eterna

by EternaHybridExchange
9 stars

This strategy overlays volume-weighted average price deviation bands and an exponential moving average trend filter directly on the price chart. It enters long positions during an uptrend when price recovers above the lower band, and enters short positions in

Strategy v5 Mean reversionTrend
Updated 7 months ago · MIT GitHub repository of VWAP Bounce - Eterna

This indicator plots optional exponential and simple moving averages plus five fixed simple averages and one Hull moving average on the price chart. The optional EMA and SMA change color with slope: green when rising, red when falling, and blue when flat. The

Indicator v4 Moving averages
Updated 4 years ago · None stated GitHub repository of Moving Average Colored EMA/SMA
7 stars

This indicator combines a fast and slow exponential moving average crossover, an RSI filter, and a volume flow indicator into a weighted directional score. It draws an on-chart dashboard for those components and can plot buy or sell arrows when the score meets

Indicator v6 Screeners & dashboardsMoving averages
Updated 3 months ago · None stated GitHub repository of Scalping 3-Signal Dashboard v2
7 stars

This strategy executes breakout trades based on price channels and moving average trend alignment. It enters long positions when the closing price breaks above its 20-period high while trading above a 130-period simple moving average. Short positions enter whe

Strategy v5 BreakoutTrend
Updated 1 year ago · MPL-2.0 GitHub repository of Weekly Break out Strategy

Mean Price

by gorx1
5 stars

Mean Price is an indicator that calculates a custom weighted average price for each bar using open, high, low, and close values. The calculation dynamically adjusts its weighting depending on whether the bar closes higher, lower, or equal to its open price. An

Indicator v5 Moving averages
Updated 8 months ago · None stated GitHub repository of Mean Price

This indicator plots multi-timeframe 50-period exponential moving averages from the Daily and 4-hour charts directly onto the price chart. It generates bullish or bearish signals when the current close aligns with the Daily trend, crosses the 4-hour EMA, and b

Indicator v4 TrendMoving averages Repaints
Updated 3 years ago · Apache-2.0 GitHub repository of Daily Trend + 4 Hour Reversal + 15 Min Pressure

Bollinger Squeeze STEPFUN

by eltonaguiar
4 stars

This strategy detects Bollinger Band squeezes by measuring band width against a threshold. It waits for a confirmed breakout in either direction when bands expand, using optional volume confirmation. Long and short signals trigger on breakout after squeeze. Po

Strategy v5 Volatility & bandsBreakout
Updated 2 days ago · None stated GitHub repository of Bollinger Squeeze STEPFUN

Noob's MTF EMA Clouds

by InNoobWeTrust
4 stars

Noob's MTF EMA Clouds computes and overlays multi-timeframe Exponential Moving Average (EMA) pairs across up to five user-selected timeframes directly on the price chart. It calculates fast and slow EMAs to render shaded clouds that visualize trend direction a

Indicator v5 Moving averagesTrend
Updated 2 days ago · None stated GitHub repository of Noob's MTF EMA Clouds
4 stars

This strategy executes mean-reversion trades based on RSI overbought and oversold levels directly on the price chart. It generates long signals when the RSI crosses back above the oversold boundary and short signals when it crosses below the overbought boundar

Strategy v5 Mean reversionOscillators & momentum
Updated 11 months ago · Custom licence GitHub repository of RSI Mean Reversion Strategy [Lab]

Snagprofit WMA MA

by dearvn
4 stars

Snagprofit WMA MA calculates and plots weighted moving averages across multiple timeframes (1-minute, 5-minute, 15-minute, and 1-hour) alongside a chart-period simple moving average. It evaluates directional alignment between these moving averages and checks f

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

P-Erik Tarama

by gocaman
3 stars

P-Erik Tarama is a multi-symbol scanner indicator that displays technical screening results directly on the price chart. It evaluates assets against a composite bullish condition combining price position relative to the Ichimoku conversion line and weekly base

Indicator v5 Screeners & dashboardsTrend
Updated 2 days ago · None stated GitHub repository of P-Erik Tarama

Jash Test

by jash-git
3 stars

This indicator plots five Fibonacci-based exponential moving averages with periods 3, 13, 34, 55, and 144 directly on the price chart. Built around modified Guppy Multiple Moving Average (GMMA) concepts and Granville's rules, it tracks moving average alignment

Indicator v5 Moving averagesTrend
Updated 4 weeks ago · None stated GitHub repository of Jash Test
3 stars

Short Term Alpha Indicator calculates a weighted alpha from price change multiplied by volume, then derives EMAs at fast, medium, and slow lengths. It computes ROC values for the EMAs and applies percentile rank functions to identify deviations. These deviatio

Indicator v5 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Short Term Alpha Indicator

Algo

by TamTH-Dev
2 stars

The Algo indicator calculates and plots two Dynamic Simple Moving Averages on the price chart. It uses a custom DSMA function that applies a filter derived from exponential smoothing coefficients, scales the result by RMS, and smooths with alpha. DSMA1 applies

Indicator v6 Moving averagesTrend
Updated 6 weeks ago · None stated GitHub repository of Algo
2 stars

IFVG Signals Realtime identifies inverted fair value gaps combined with a moving average trend filter to plot trading signals and zone boxes directly on the price chart. It scans lookback bars for bullish and bearish fair value gaps and triggers real-time sign

Indicator v6 SMC / ICT / price actionMoving averages Repaints
Updated 2 months ago · None stated GitHub repository of IFVG Signals Realtime (No Wait)

Alpy

by avatar-lavventura
2 stars

This strategy overlays a 60-minute Volume Weighted Moving Average with percentage-based upper and lower bands, combined with an RSI oscillator and Williams Fractals. It triggers long entries when price pierces below the lower band and short entries when price

Strategy v4 Moving averagesOscillators & momentum Repaints
Updated 7 months ago · None stated GitHub repository of Alpy

Super 8 - 30m BTCUSDT.P

by wynnforthework
2 stars

Super 8 is a trend-following and momentum strategy designed for 30-minute cryptocurrency charts. It evaluates entries using dual EMAs, ADX strength filtering, Parabolic SAR direction, MACD or Z-VWAP calculations, and Bollinger Band width expansion alongside vo

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Super 8 - 30m BTCUSDT.P

Monte Carlo Lab

by jayadevrana
1 stars

Monte Carlo Lab calculates and visualizes simulated performance variations for an Exponential Moving Average crossover strategy directly on the price chart. It records trade outcomes using ATR-based stop-loss and target levels in terms of R-multiples. On the f

Indicator v6 Moving averagesTrend
Updated 4 days ago · MPL-2.0 GitHub repository of Monte Carlo Lab

Drawing UDT Alias Identity

by pineforge-4pass
1 stars

This strategy stores a line inside a user-defined type and keeps an alias to the same drawing. It plots an 18-period simple moving average as a line on the price chart and reads that line's end price back through the alias. When the level is ready, it enters o

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of Drawing UDT Alias Identity

Pivot Point SuperTrend

by kanylbullen
1 stars

This Pine Script strategy plots pivot points and a SuperTrend-style trailing line based on ATR and center line derived from pivots. It calculates trend direction and generates buy and sell signals on trend reversals. Signals are filtered by a user-selected mov

Strategy v5 TrendVolatility & bands Repaints
Updated 8 days ago · None stated GitHub repository of Pivot Point SuperTrend

An overlay indicator that builds opening range levels from a configurable market open time in the Asia/Kolkata timezone, then derives sub-levels and second and third support and resistance lines from the range. It adds 9 and 21 EMAs with crossover arrows and c

Indicator v5 Sessions & timeSupport & resistance

Turtle Trading Strategy

by GreyssonEnterprises
1 stars

This strategy overlays four smoothed moving averages and a trend fill between a two-period EMA and the longest average on the price chart. It marks optional three-line strike and engulfing candle patterns. Inputs set a Donchian channel length, the four average

Strategy v5 TrendMoving averages
Updated 3 months ago · MIT GitHub repository of Turtle Trading Strategy
1 stars

US Momentum Swing Screener is a daily chart overlay indicator for US equities and ETFs. It plots a composite score based on an EMA ribbon (9/21/50/200), RSI and StochRSI momentum, MACD confluence, volume surge detection, ADX trend strength, Bollinger Band posi

Indicator v5 Oscillators & momentumMoving averages
Updated 4 months ago · None stated GitHub repository of US Momentum Swing Screener
1 stars

Corpus Correlation Rotation is a cross-asset quantitative strategy that compares the price performance of the chart symbol against a user-selected benchmark asset. It measures five-bar price changes for both symbols, computes a 20-period statistical correlatio

Strategy v5 Oscillators & momentumMoving averages
Updated 4 months ago · MIT GitHub repository of Corpus Correlation Rotation

Simple MA Crossover Strategy

by gabriel-klettur
1 stars

The Simple MA Crossover Strategy calculates and plots a 55-period EMA and a 200-period EMA directly on the main price chart. It generates long entry signals when the 55 EMA crosses above the 200 EMA and short entry signals when it crosses below. Positions are

Strategy v5 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of Simple MA Crossover Strategy
1 stars

This overlay indicator combines three optional modules on the price chart. Volume weighted bands plot a smoothed trend and ATR-scaled envelopes in cloud or line-only form. The Keltner Hull suite calculates a Hull moving average and Keltner channels from a chos

Indicator v6 Moving averagesVolatility & bands
Updated 7 months ago · None stated GitHub repository of Keltner Hull Swing Profile

Gap and Go

by Basant1Saini
1 stars

This strategy trades opening gap continuation on the price chart. It measures the gap between the daily open and the prior daily close, then enters long after a qualifying gap up or short after a qualifying gap down when price stays beyond the open and a trend

Strategy v5 BreakoutOscillators & momentum Repaints
Updated 8 months ago · None stated GitHub repository of Gap and Go
1 stars

This price-chart indicator simulates dollar-cost averaging between a start date and an end date. It builds a five-bar Hull moving average, smooths it with an exponential average, and colors the line by direction. Inside the window, every bar adds a fixed BTC s

Indicator v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of TeeLek Lab 03 DCA and Pause

Indicators

by fiji-solutions
1 stars

This basic script demonstrates how to calculate and plot a simple technical indicator in Pine Script. It computes a 14-period Exponential Moving Average (EMA) using the closing price of each bar and renders the line in a separate pane. Designed as an education

Indicator v5 Moving averagesTrend
Updated 2 years ago · None stated GitHub repository of Indicators

Gann High Low

by rajatjpatel
1 stars

A Gann HiLo activator drawn on the price chart. It averages highs over one period and lows over another, 13 and 21 by default. When the close breaks below the prior low average, the line switches to the high average and turns maroon; when the close breaks abov

Indicator v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of Gann High Low
1 stars

A Pine v4 strategy that plots a 12-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 FILBTC EMA Cross Strategy

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