Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 19)

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

Improvisando [Alorse]

by Hugs-4-Bugs
4 stars

This strategy combines candlestick price action with Exponential Moving Average, RSI, and MACD filters to identify short-term trend trades. A long signal occurs when a bullish candle engulfs the previous open while price remains above the EMA, RSI stays below

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Improvisando [Alorse]

EMA Trend Meter

by ShabbirHasan1
4 stars

Calculates three exponential moving averages and compares them against a faster 13-period baseline exponential moving average. It displays three horizontal rows of circular plots in a separate pane to represent each moving average length comparison. A circle t

Indicator v5 TrendMoving averages
Updated 1 year ago · Custom licence GitHub repository of EMA Trend Meter
4 stars

The script is a Pine Script v4 strategy that generates buy and sell signals from crossovers of fast EMA (period 5) and slow EMA (period 10). It overlays signals directly on the price chart for cryptocurrency trading. Additional filters check for hammer candles

Strategy v4 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of EMA Cross Crypto Strategy

Dereköy-Darvas

by Kalumur
4 stars

The Dereköy-Darvas indicator combines Darvas Box boundary levels with dual Bollinger Bands plotted directly on the main price chart. It calculates top and bottom box lines based on recent high and low extremes to outline price consolidation zones. Simultaneous

Indicator v5 Volatility & bandsSupport & resistance
Updated 2 years ago · None stated GitHub repository of Dereköy-Darvas

Dead Cross Over

by might-tree
4 stars

Dead Cross Over is a trend-following strategy that calculates a 10-period fast EMA and a 100-period slow EMA directly on the price chart. It enters a long position when the fast EMA crosses above the slow EMA while price sits above the slow EMA. The position i

Strategy v5 Moving averagesTrend
Updated 3 years ago · None stated GitHub repository of Dead Cross Over

This indicator scores price from a basket of moving averages and oscillators and plots the result as pump waves in a separate pane. Users can base the rating on moving averages, oscillators, or both, and toggle the total, moving-average, and oscillator waves p

Indicator v4 Oscillators & momentumMoving averages
Updated 3 years ago · None stated GitHub repository of Technical Ratings Pro - Pump Wave

This indicator identifies long-term trend directions and momentum shifts using weighted moving averages. It plots 13, 48, and 200-period WMAs directly on the price chart. The script evaluates price crossovers relative to each average as well as moving average

Indicator v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of Snag - Swing Trade Long Term V2

Regime HA on EMA

by aofwittawat
4 stars

This indicator classifies a market regime by comparing a Heikin Ashi close with an exponential moving average of that close. It requests Heikin Ashi open, high, low, and close from a user-selected timeframe, then plots no lines and colors the pane background g

Indicator v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of Regime HA on EMA
4 stars

This strategy enters long or short when a moving average of open prices crosses a moving average of close prices. It plots those averages and optional trend-coloured bars on the price chart. Settings choose the average type and length, an alternate-resolution

Strategy v4 TrendMoving averages Repaints
Updated 5 years ago · None stated GitHub repository of Open Close Cross Strategy R5.1

Higher Timeframe Trend

by degenview
3 stars

This indicator plots an exponential moving average taken from a selected higher timeframe and colors both the line and the chart background by whether the close is above or below that average. It requests the EMA through request.security and, when the chosen t

Indicator v6 TrendMoving averages
Updated 2 days ago · GPL-3.0 GitHub repository of Higher Timeframe Trend

BOLL-20-50 TARAMA

by gocaman
3 stars

Calculates 50-period and 200-period Exponential Moving Averages alongside standard and wide Bollinger Bands. It generates buy and sell signal labels on the chart when the Bollinger Band basis crosses above or below the 50 EMA. The script also includes volume-w

Indicator v5 Moving averagesVolatility & bands
Updated 2 days ago · None stated GitHub repository of BOLL-20-50 TARAMA

Overlay Scaffold

by jpantsjoha
3 stars

This indicator plots a fast and a slow exponential moving average on the price chart. It marks bullish and bearish crosses with optional labels and circle markers, and it shades the background according to which average is higher. Users can change both lengths

Indicator v6 Moving averagesTrend
Updated 4 weeks ago · Custom licence GitHub repository of Overlay Scaffold

3MA Average

by g-moe
3 stars

The 3MA Average indicator calculates three separate moving averages using customizable lengths and types, including SMA, EMA, WMA, HMA, and VWMA. It then computes the arithmetic mean of these three values to create a composite moving average plotted directly o

Indicator v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of 3MA Average

Market Regime - 50W SMA

by LucasRibeiroCaetano
3 stars

This indicator classifies market conditions into Bull Market, Correction, or Bear Market regimes using a 50-week Simple Moving Average (SMA). It requests weekly timeframe data to track consecutive weekly closes relative to the 50W SMA. A Bear Market regime is

Indicator v5 TrendMoving averages
Updated 11 months ago · Custom licence GitHub repository of Market Regime - 50W SMA
3 stars

This indicator computes Root Mean Square Error (RMSE) relative to benchmark moving averages such as EMA or ALMA and applies Bollinger Band envelopes or iterative loop thresholds. It plots the RMSE metric and threshold bands in a separate pane to signal trend c

Indicator v6 Volatility & bandsMoving averages
Updated 12 months ago · None stated GitHub repository of RMSE Bollinger Bands + Loop | Lyro RS

SPX/Gold Ratio Bubble Detector

by EngineeredSuccess
3 stars

Calculates the price ratio between the S&P 500 (defaulting to SPY) and Gold (defaulting to GLD) to evaluate macro valuation extremes. It tracks the ratio alongside a simple moving average and evaluates market status across customizable warning, danger, and ext

Indicator v6 Moving averagesSupport & resistance
Updated 1 year ago · Custom licence GitHub repository of SPX/Gold Ratio Bubble Detector

BTMM Core Foundation

by jcortes254
3 stars

This indicator plots five exponential moving averages on the price chart using lengths of 5, 13, 50, 200 and 800, labeled as a food system. It scores directional bias against a user threshold, includes an optional 15-minute-and-above rule, and shows the result

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of BTMM Core Foundation

MOTO ka AnjalikaAstra

by HelloMoto069
3 stars

MOTO ka AnjalikaAstra is an overlay indicator that combines Ichimoku Cloud concepts with Average True Range volatility filters. It calculates custom Tenkan-Sen, Kijun-Sen, and Senkou Span components using ATR bands rather than standard high and low price chann

Indicator v5 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of MOTO ka AnjalikaAstra
3 stars

Sapphire Fibonacci Strategies is a multi-mode strategy that combines Momentum Breakout, Mean Reversion, and Fibonacci Retracement models built on Fibonacci-period moving averages. It generates long and short trade signals based on price crossovers and moving a

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Sapphire Fibonacci Strategies

Combined Liquidity, Channels, RSI, and VWAP is an overlay indicator that plots multiple technical analysis metrics directly on the price chart. It calculates Keltner and Donchian Channels, volume-based metrics like cumulative volume delta (CVD), VWAP with stan

Indicator v5 Volatility & bandsOscillators & momentum Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Combined Liquidity, Channels, RSI, and VWAP

Cross SMA - DataCrypto Analytics

by datacrypto-analytics
3 stars

This overlay indicator plots a 30-period and a 100-period simple moving average of close on the price chart and fills the space between them. It marks a sell label when the slower average crosses above the faster one and a buy label when it crosses below, and

Indicator v4 Moving averages
Updated 3 years ago · Apache-2.0 GitHub repository of Cross SMA - DataCrypto Analytics

MA & DMI

by maxits
3 stars

MA & DMI is a strategy that combines moving average crossovers with Directional Movement Index filters to identify trade setups. It calculates a slow SMA, a medium EMA, and a fast EMA alongside ADX and DI values. Trade risk management uses an ATR-based multipl

Strategy v4 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of MA & DMI

RSI Bounce

by blackcat1402
3 stars

RSI Bounce calculates custom Relative Strength Index levels scaled back onto price, creating nine price-equivalent RSI band series centered around a median RSI baseline. It combines short-term RSI extreme checks with customized MACD signal line crossovers to i

Indicator v4 Oscillators & momentumMoving averages
Updated 5 years ago · MIT GitHub repository of RSI Bounce

QQQ 5min Pure Runner

by yalili8521
2 stars

This strategy identifies trend continuation and accumulation setups on 5-minute charts. It enters long or short positions based on an aligned moving average stack, rising or falling price grinds within a lookback period, and a maximum bar size threshold to avo

Strategy v6 TrendMoving averages
Updated 9 days ago · None stated GitHub repository of QQQ 5min Pure Runner

This strategy identifies trend pullback entries using MACD signal line crossovers plotted in a separate indicator pane. Long trades enter on bullish MACD crossovers below the zero line when price is above a trend EMA and ADX exceeds a minimum threshold, with r

Strategy v6 TrendOscillators & momentum
Updated 2 weeks ago · MIT GitHub repository of MACD Pullback Sniper | Trend + ADX Filtered Strategy

Alertatron-Link Demabot 2H

by danielvm-git
2 stars

This strategy calculates up to three Double Exponential Moving Averages (DEMA) to generate trading signals based on moving average crossovers and crossunders. When configured, an optional third DEMA acts as a directional trend filter. It opens positions upon c

Strategy v4 Moving averagesTrend
Updated 2 months ago · MIT GitHub repository of Alertatron-Link Demabot 2H

This indicator calculates dynamic grid trading boundaries derived from Bollinger Bands to define upper, lower, and middle range levels. It computes moving average basis lines and standard deviation bands, applying user-defined offsets, smoothing, and minimum o

Indicator v6 Volatility & bandsSupport & resistance Repaints
Updated 8 months ago · MIT GitHub repository of Grid Bot Bollinger Bands [psyll]

MA Oscillator Map

by mushroom-men-Trading
2 stars

MA Oscillator Map calculates momentum and trend oscillations relative to configurable moving average baselines. It supports multiple moving average types, including SMA, EMA, HMA, VWMA, SMMA, WMA, and Adaptive Least Squares Moving Average (ALSMA). Operating in

Indicator v6 Moving averagesOscillators & momentum
Updated 9 months ago · None stated GitHub repository of MA Oscillator Map

This indicator plots multiple moving averages including SMA10, SMA50, SMA100, SMA200, Ichimoku conversion and lead lines, and 52-week high and low levels on the price chart. It detects breakouts using volume multiplier, optional gaps, and strong candle require

Indicator v6 BreakoutMoving averages Repaints
Updated 10 months ago · MIT GitHub repository of Ede – MA + Breakout Strategie (Dynamic MAs)
2 stars

This indicator combines Qualitative Quantitative Estimation (QQE), the AK Trend Line, and Elder's Force Index (EFI) into a single separate pane tool. It calculates QQE using smoothed RSI and Wilder's ATR, computes AK Trend values with dynamic scale factors mat

Indicator v6 Oscillators & momentumVolume
Updated 11 months ago · MPL-2.0 GitHub repository of QQE + AK Trend + EFI Combined

ORB Hunter

by nxtaiapp
2 stars

ORB Hunter is an Opening Range Breakout strategy that identifies price breakouts beyond a defined opening session window (such as 09:30 to 09:45 EST). It places long or short trades when price crosses the opening range bounds with buffer, confirmed by optional

Strategy v5 BreakoutSessions & time
Updated 11 months ago · MIT GitHub repository of ORB Hunter

Trend Indicator A

by iceberg211
2 stars

Trend Indicator A plots a moving-average trend overlay on the price chart. It calculates a selectable average of close and, optionally, of high and low, then colors the lines and the area between them bullish, bearish, or neutral. The main settings choose the

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

MovingAverages

by Electrified-Trading
2 stars

This library exports utilities for calculating moving averages rather than drawing them on a chart. It provides a volume-adjusted weighted moving average that combines volume weighting with triangular recent-bar emphasis, and a coefficient moving average that

Library v6 Moving averagesVolume
Updated 1 year ago · MPL-2.0 GitHub repository of MovingAverages

9day Swing

by scallywag41
2 stars

9day Swing is a TradingView indicator that overlays SMA 9, EMA 20 and SMA 200 on the price chart to identify trend direction. It plots these moving averages in red, yellow and white or gray respectively. The indicator generates buy and sell signals as green an

Indicator v4 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of 9day Swing

Bollinger Bands

by Web3Degenerate
2 stars

This Pine Script converts a Bollinger Band Breakout indicator into a strategy. It plots Bollinger Bands on the price chart using a 100-period SMA as the middle band with upper deviation of 3 and lower deviation of 1. Signals trigger on price crossing the bands

Strategy v5 Volatility & bandsMoving averages
Updated 2 years ago · None stated GitHub repository of Bollinger Bands
2 stars

This indicator displays market trend filter information and momentum metrics in a separate pane based on the Weekend Trend Trader strategy. It evaluates a benchmark index, such as the NASDAQ 100, comparing its close price to a simple moving average to render a

Indicator v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Weekend Trend Trader Ribbon
2 stars

This indicator plots five predefined daily moving averages directly on the main price chart. It calculates a 10-period EMA, 21-period EMA, 50-period SMA, 150-period SMA, and 200-period SMA to assist with trend identification and dynamic support or resistance t

Indicator v5 TrendMoving averages
Updated 2 years ago · MIT GitHub repository of Daily MA's [JR-Academy]
2 stars

Calculates custom exponential moving averages and standard deviation envelopes based on price offsets and lookback windows. It plots dynamic channel bands, mean reversion zones, and squeeze indicators in a separate pane. Users can adjust the moving average len

Indicator v5 Moving averagesVolatility & bands
Updated 3 years ago · None stated GitHub repository of [CBB] Rising Falling Color Band

SassizStocEMA-Lazy Bear

by sassiz-root
2 stars

SassizStocEMA-Lazy Bear is a Pine Script strategy that plots on the price chart and combines a stochastic oscillator with near and far exponential moving averages. It is aimed at crypto markets. Long and short directions can be enabled separately, and crosses

Strategy v5 Oscillators & momentumMoving averages
Updated 3 years ago · MIT GitHub repository of SassizStocEMA-Lazy Bear

Simple Indicator

by storm0611
2 stars

This indicator plots four exponential moving averages directly on the main price chart. It calculates EMAs using hardcoded lengths of 20, 50, 100, and 200 bars applied to the closing price, styled with distinct colors and increasing line widths. It also includ

Indicator v5 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of Simple Indicator
2 stars

MC Strategy - Defensive executes long trades using a WaveTrend oscillator combined with a volume-weighted money flow calculation. It enters long positions when the WaveTrend lines cross upward under low money flow conditions or when price sufficiently diverges

Strategy v4 Oscillators & momentumVolume
Updated 5 years ago · None stated GitHub repository of MC Strategy - Defensive

RSI powerzone

by kat3samsin
2 stars

The RSI powerzone strategy plots the 4-period RSI in a separate pane along with horizontal levels at 30 and 55. It identifies an uptrend using a series of simple moving averages on the close price. The strategy enters long positions when the uptrend condition

Strategy v4 Oscillators & momentumMoving averages
Updated 5 years ago · MIT GitHub repository of RSI powerzone
1 stars

A test indicator on the price chart that combines optional entry filters with adaptive exit sizing. Filters include a moving average, a confirmation moving average, a higher-high higher-low market structure check using pivots and a MACD direction check. Take p

Indicator v6 Volatility & bandsMoving averages
Updated 2 days ago · None stated GitHub repository of USE Adaptive Kelly Test

Ghost Alpha

by mphinance
1 stars

A price-chart overlay that blends a Hull moving average band, an optional higher timeframe Hull, a TRAMA line, Keltner bands, 50 and 200 SMAs and an intraday VWAP. It also covers swing structure detection with levels and supply and demand zones, a two-line Wil

Indicator v6 TrendMoving averages
Updated 3 days ago · Custom licence GitHub repository of Ghost Alpha
1 stars

This indicator plots fast and slow EMAs on the price chart with a fill between them to show trend direction. It ranks ATR volatility over the past 200 bars to define three regimes: quiet (trade only), wild (high volatility), and neutral. The background shades

Indicator v6 TrendVolatility & bands
Updated 4 days ago · MPL-2.0 GitHub repository of Complete System: Regime + Edge + Risk

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