Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 31)

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 plots a custom MACD oscillator directly on the main price chart while incorporating multi-depth Zigzag pattern detection. It supports four MACD calculation modes—Traditional, AS Histogram, Leader, and Source—with customizable fast, slow, and sig

Indicator v5 Oscillators & momentumMoving averages Repaints
Updated 9 months ago · None stated GitHub repository of MACD-X Overlay More Than MACD
1 stars

A long-biased signal indicator for the price chart built on a Hull moving average. A buy is shown when price is above a rising HMA, provided volume agrees through a price-volume trend filter or a momentum override based on RSI applies. After a buy, a trailing

Indicator v6 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of RAPF v21.0 [Balanced Momentum]

Hull Suite by InSilico

by turnupdigital
1 stars

An indicator that plots a Hull moving average on the price chart, with a choice of Hma, Thma or Ehma variants, an adjustable length and multiplier, and an option to take the average from a higher timeframe. The line is coloured by trend direction and can be dr

Indicator v6 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Hull Suite by InSilico

TeeLek CDC Action Zone

by theteelek
1 stars

A multi-timeframe overlay indicator that compares an EMA 12 with an EMA 26 on weekly, daily, 6-hour, 4-hour, 2-hour and 1-hour data and shades the area between them on the chart. The fill is green when the fast average is above the slow one and red otherwise.

Indicator v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of TeeLek CDC Action Zone
1 stars

This strategy calculates fast and slow simple moving averages to identify trend direction changes on the price chart. It enters a long position when the fast simple moving average crosses above the slow simple moving average and opens a short position when it

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Two Moving Average Crossover
1 stars

A scalping strategy that goes long when a 9 EMA crosses above a 21 EMA while price crosses above VWAP, and short on the opposite pair of crosses. Exits close the trade at 1.5 ATR from the average entry price or on a MACD cross with a new five-bar extreme. A br

Strategy v5 ScalpingMoving averages
Updated 1 year ago · None stated GitHub repository of S50 TFEX Scalping Strategy
1 stars

A long-side strategy that combines a Stochastic Momentum Index, a fast and slow EMA pair and MACD histogram. It enters long when the SMI crosses above its EMA while below the overbought level, and exits on the opposite SMI cross or when the fast EMA crosses un

Strategy v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of SMI-MA Long Strategy

Trend Histogram

by JoeTonDev
1 stars

A separate-pane indicator that shows two trend states as colored histogram bars, a slow one from 3, 8 and 20 period simple averages and a fast one from 21, 55 and 89 period averages. Green means the averages are stacked bullishly, yellow a pullback, light red

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Trend Histogram

My strategy 11

by akash-yellgetti
1 stars

A strategy-type script for the price chart built around a fast and slow moving average pair, exponential or simple, whose lines and fill change colour with the direction of the gap. It prints B and S labels at crossovers and builds text messages for an externa

Strategy v5 Moving averagesTrend
Updated 2 years ago · None stated GitHub repository of My strategy 11
1 stars

A separate-pane tool that plots a very long RSI, 500 periods by default, with a ribbon of five exponential moving averages of the RSI at 1 to 5 bars. Dashed guide levels are set at 85, 70, 50, 20 and 10 and can be changed. A lookback period setting is also pro

Indicator v5 Oscillators & momentumMoving averages
Updated 4 years ago · None stated GitHub repository of RSI+EMAs for Bootsie Strategy

EMA Cross Strategy

by tseitz
1 stars

The EMA Cross Strategy calculates an exponential moving average of close prices over a user-defined length. It enters a long position when a green candle opens above the moving average line, simultaneously closing any active short position. Conversely, it open

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of EMA Cross Strategy
947 stars

This indicator plots a Sharp Modified Moving Average on the price chart. It calculates the line as three times a weighted moving average minus twice a simple moving average of the selected source. The line turns green when it rises and pink when it falls. Opti

Indicator v6 Moving averages
Updated 12 days ago · GPL-3.0 GitHub repository of Sharp Modified Moving Average
257 stars

Donald - Test Logic Futures is an overlay strategy designed for intraday futures trading. It combines kernel regression functions with exponential moving averages to evaluate price retracements and entry timing. Trades are filtered by session execution windows

Strategy v5 TrendMoving averages Repaints
Updated 7 weeks ago · None stated GitHub repository of Donald - Test Logic Futures

22-MA Strategy

by capissimo
114 stars

22-MA Strategy plots a selectable center moving average on the price chart and marks upper and lower levels a fixed pip distance from that average. It supports twenty-two average types, from SMA, EMA, and HMA variants through filters such as Kalman and JMA-sty

Indicator v4 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of 22-MA Strategy
106 stars

This strategy plots on the price chart and enters when three smoothed moving averages are aligned, RSI is on the matching side of 50, and a Williams fractal appears. An upward stack with RSI above 50 and a down fractal opens a long; the opposite setup opens a

Strategy v5 Moving averagesOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of 3SmmaCrossUp + Fractal + RSI

Moon Dev GEX Walls & Trap

by moondevonyt
92 stars

This indicator estimates gamma exposure levels and intraday context for index instruments like SPY and ES. It calculates VWAP with standard deviation bands as a gamma flip proxy, highlighting market regimes through background colors. It plots prior day high, l

Indicator v5 Support & resistanceSessions & time
Updated 2 months ago · Custom licence GitHub repository of Moon Dev GEX Walls & Trap
53 stars

This strategy implements Larry Connors' 2-period RSI mean-reversion algorithm overlaid on the price chart. It filters trades using a long-term Simple Moving Average (SMA), entering long positions when the price trades above the SMA and the short-term RSI drops

Strategy v6 Oscillators & momentumMean reversion
Updated 2 months ago · MPL-2.0 GitHub repository of Larry Connors 2-Period RSI Strategy

Calculates and plots a second-order Butterworth low-pass infinite impulse response filter on the price chart. It smooths price series data by attenuating high-frequency market noise according to a specified cutoff period. Users can adjust the length setting an

Indicator v6 Moving averagesTrend
Updated 8 months ago · MIT GitHub repository of Butterworth 2nd Order Filter (BUTTER)

RSI-VWMA

by Zettt
43 stars

This indicator calculates the Relative Strength Index using a volume-weighted moving average of the closing price as its source. It plots the resulting oscillator in a separate pane alongside configurable overbought and oversold threshold lines. The plot line

Indicator v4 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of RSI-VWMA

This overlay strategy is written for the SOLUSDT perpetual on the one-minute chart. It tracks confirmed pivot highs and lows as resistance and support circles, then marks strong buy or sell states when close crosses those levels. Long and short conditions comp

Strategy v5 Support & resistanceBreakout Repaints
Updated 2 years ago · None stated GitHub repository of SOLUSDTPERP 1m - Strategy Candle Bar

Zen rEMA

by Zen-Tim
29 stars

Zen rEMA is an overlay indicator that calculates an exponential or simple moving average and an ATR-normalized slope angle over a chosen lookback. Optional markers show an always-in state that turns long after two bull bars close above the average and short af

Indicator v6 Moving averagesTrend
Updated 2 weeks ago · MIT GitHub repository of Zen rEMA

Tri VWMA

by tistaharahap
25 stars

The Tri VWMA indicator calculates and plots three Volume Weighted Moving Averages on the price chart using customizable lookback periods. It displays three distinct moving average lines to help users analyze price trends and relationships across multiple time

Indicator v4 Moving averagesTrend
Updated 6 years ago · None stated GitHub repository of Tri VWMA

Normalize Heatmap Indicator

by palitojendthen
20 stars

The Normalize Heatmap Indicator scales a chosen price source between 0 and 1 over a set lookback period using stochastic-style min-max normalization. It paints price candles on the main chart using configurable Rainbow or RGB color gradients based on the norma

Indicator v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Normalize Heatmap Indicator
16 stars

Follow Line Indicator X HULL combines a Bollinger Band and ATR-filtered trend line with Hull Moving Average variations (HMA, EHMA, THMA) on the price chart. It plots dynamic trend lines, visual bands, and entry or exit signal shapes on trend flips. Users can t

Indicator v4 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Follow Line Indicator X HULL

Trend Compass 1H

by chris-c-thomas
14 stars

Trend Compass 1H provides strategic trend assessment and higher-timeframe context for 1-hour price charts. It plots an exponential moving average ribbon along with key structural reference levels from higher timeframes, including 4-hour, daily, and weekly EMAs

Indicator v6 TrendMoving averages
Updated 6 months ago · MIT GitHub repository of Trend Compass 1H

WE Alpha

by davro
10 stars

WE Alpha is an oscillator that combines a custom MACD line and histogram with a modified Chaikin Money Flow calculation scaled directly to MACD values. It plots the MACD line, signal line, histogram area, and a money flow line dynamically colored according to

Indicator v4 Oscillators & momentumVolume
Updated 5 years ago · None stated GitHub repository of WE Alpha

Quant RSI

by JasonTeixeira
9 stars

Quant RSI is an indicator that plots a Laguerre-filtered Relative Strength Index (RSI) in a separate pane. It incorporates Hull Moving Average smoothing to reduce lag, along with ATR-based volatility calculations and ADX trend tracking. The indicator evaluates

Indicator v6 Oscillators & momentumVolatility & bands
Updated 2 weeks ago · Custom licence GitHub repository of Quant RSI

Multi-Trend

by lunarticktrading
7 stars

This indicator draws a combined trend overlay on the price chart. It can enable a SuperTrend based on ATR length and a factor, a fast and slow moving-average cloud using SMA or EMA, and a VIDYA line. Separate switches control whether each component is calculat

Indicator v6 TrendMoving averages
Updated 2 weeks ago · None stated GitHub repository of Multi-Trend

Momentum - MOM

by eddiebelaval
7 stars

The Momentum - MOM indicator calculates standard price momentum over a user-defined length and source, then smooths the momentum values using a customizable moving average. Users can choose from multiple moving average types, including EMA, SMA, RMA, WMA, VWMA

Indicator v6 Oscillators & momentumMoving averages
Updated 3 months ago · None stated GitHub repository of Momentum - MOM

Tiered Exit (Memecoin)

by muammeryldrm42
7 stars

This strategy enters long trades when a fast EMA crosses above a slow EMA. Position risk and profits are managed through tiered exit stages: three custom percentage-based profit targets with partial exits, a hard percentage stop loss, and a trailing drawdown e

Strategy v5 TrendMoving averages Repaints
Updated 3 months ago · MIT GitHub repository of Tiered Exit (Memecoin)
7 stars

This indicator plots a modified MACD-style momentum oscillator in a separate pane. It compares a zero-lag EMA of the typical price with smoothed moving averages of the high and low, then sets the impulse to the distance outside that range or to zero when price

Indicator v6 Oscillators & momentumMoving averages
Updated 5 months ago · None stated GitHub repository of Impulse MACD Modified

SuperTrend

by trsdn
6 stars

The SuperTrend indicator computes upper and lower bands from ATR values using a multiplier on a selected source such as HL2. It maintains adaptive trend lines that shift color from green to red based on price position relative to the bands. The green line func

Indicator v5 TrendVolatility & bands
Updated 7 days ago · MIT GitHub repository of SuperTrend

50 EMA + 200 EMA

by krosenfeld7
5 stars

This indicator plots a short-term 50-period exponential moving average (EMA) and a long-term 200-period EMA directly on the main price chart. It generates long and short signals when price crosses the 50 EMA in alignment with the broader trend defined by the r

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

Antigravity Superstar

by eltonaguiar
4 stars

This strategy draws on the price chart and combines a triple EMA stack, a volume spike with a minimum price move, and a MACD line-signal crossover. It enters long or short only when at least the chosen number of those three signals agree, with an optional RSI

Strategy v6 TrendMoving averages
Updated 2 days ago · None stated GitHub repository of Antigravity Superstar

MTF Trend Dashboard Lab

by mitchell-917
4 stars

This indicator evaluates and displays market trend direction across four user-defined timeframes simultaneously. For each timeframe, it calculates a moving average and compares the timeframe close price against it to determine a bullish, bearish, or neutral bi

Indicator v5 Screeners & dashboardsMoving averages
Updated 11 months ago · Custom licence GitHub repository of MTF Trend Dashboard Lab

Nazilli SuperTrend

by Kalumur
4 stars

The Nazilli SuperTrend indicator combines an ALMA moving average with multiple SuperTrend configurations to identify trend changes on the price chart. It plots the ALMA line in blue and red colors for up and down trends, along with SuperTrend lines for four di

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Nazilli SuperTrend

EMA-Tarama

by gocaman
3 stars

This indicator plots six exponential moving averages on the price chart and places buy and sell labels when the first EMA crosses the third. It calculates MACD from fast and slow averages, with selectable SMA or EMA smoothing, and classifies the histogram as r

Indicator v5 Moving averagesOscillators & momentum
Updated 2 days ago · None stated GitHub repository of EMA-Tarama

MirPapa_Lib_trend

by alvinng214
2 stars

MirPapa_Lib_trend is a Pine Script utility library providing trend and momentum calculation functions for other scripts. It features implementations for several moving average types, including the Hull Moving Average (HMA), Exponential Hull Moving Average (EHM

Library v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of MirPapa_Lib_trend

ZEGUELA DEMATRON AXS 2H

by danielvm-git
2 stars

This strategy calculates and plots three double exponential moving averages (DEMA) on the price chart using lengths of 8, 24, and 0. It generates long signals on DEMA crossovers and short signals on crossunders. Positions are entered based on these signals and

Strategy v4 Moving averagesTrend Repaints
Updated 2 months ago · MIT GitHub repository of ZEGUELA DEMATRON AXS 2H

Alper

by avatar-lavventura
2 stars

Alper is a multi-indicator trading strategy combining a WaveTrend oscillator, RSI, and Squeeze Momentum logic based on Bollinger Bands and Keltner Channels. Operating within a user-defined backtest time window, it plots WaveTrend lines, overbought and oversold

Strategy v4 Oscillators & momentumVolatility & bands
Updated 7 months ago · None stated GitHub repository of Alper

VGF Price-Volume TEMA

by ryangaraygay
2 stars

This indicator colors chart bars based on a Triple Exponential Moving Average (TEMA) applied to candle body volume (candle body multiplied by volume). It categorizes market flow into trending bullish, trending bearish, or non-trending messy conditions based on

Indicator v5 VolumeCandlestick patterns
Updated 1 year ago · MIT GitHub repository of VGF Price-Volume TEMA

HTF EMA

by Web3Degenerate
2 stars

This Pine Script indicator plots a higher-timeframe exponential moving average on the price chart. The script calculates the EMA using a configurable length and timeframe, then applies request.security to retrieve the value without repainting. It draws the lin

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

This indicator combines a Nadaraya-Watson kernel regression estimator with moving average trend overlays. It recalculates kernel-weighted lines across historical bars on the latest candle, plotting reversal arrows when the curve direction shifts. Additionally,

Indicator v4 Moving averagesTrend Repaints
Updated 4 years ago · MIT GitHub repository of Nadaraya-Watson Estimator + Moving Average Colored EMA/SMA

Dial Main Period

by pineforge-4pass
1 stars

A long-only EMA crossover strategy whose fast and slow lengths change with the chart timeframe. Separate pairs of lengths are set for 5, 15, 60 and 240 minute charts, and other timeframes use the 15 minute pair. It enters long when the fast EMA crosses above t

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of Dial Main Period

MA Cross

by GammaExpansion
1 stars

This strategy calculates fast and slow moving averages using SMA or EMA selections and plots them on the price chart. It signals long entries on fast MA crossing above slow MA, optionally requiring slow MA to be rising. It closes positions on fast MA crossing

Strategy v6 Moving averagesTrend
Updated 7 days ago · MIT GitHub repository of MA Cross

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