Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 13)

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

Trend Analyzer EMA Only

by panzmoravylab
2 stars

Trend Analyzer EMA Only compares a fast and a slow exponential moving average on the price chart and labels the state uptrend, downtrend, or neutral. A buy or sell signal appears when the fast average crosses the slow average while both slopes agree and their

Indicator v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Trend Analyzer EMA Only

Calculates a long-term Exponential Moving Average as a baseline for fair value alongside a Relative Strength Index. Generates long entry signals when the close price trades at least five percent below the moving average while the RSI is oversold. Exits trades

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · MIT GitHub repository of Buffett-Inspired Value Strategy
2 stars

Multi-Indicator Trading System is a price chart overlay indicator that combines exponential moving averages, MACD, RSI, and multi-timeframe Ichimoku cloud analysis. It evaluates local timeframe indicators alongside higher timeframe trend filters to generate bu

Indicator v5 TrendOscillators & momentum
Updated 1 year ago · MIT GitHub repository of Multi-Indicator Trading System

This overlay indicator marks swing highs and lows, then draws supply and demand boxes around points of interest. It labels higher highs, lower highs, higher lows, and lower lows, and can show break-of-structure and point-of-interest labels plus an optional zig

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of FluidTrades - SMC Lite + Moving Average Ribbon
2 stars

Parabolic SAR Strategy executes buy and sell orders based on Parabolic SAR trend flips, filtered by customizable technical indicators. Traders can enable an RSI momentum filter, a configurable moving average trend baseline, and an ADX strength threshold. Posit

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · MIT GitHub repository of Parabolic SAR Strategy

Whale Detection with VWAP

by scallywag41
2 stars

This indicator identifies large volume trades occurring near the Volume Weighted Average Price (VWAP). It calculates a cumulative VWAP and checks whether the bar's volume meets or exceeds a specified minimum block trade volume. Additionally, it verifies if the

Indicator v5 VolumeMoving averages
Updated 2 years ago · None stated GitHub repository of Whale Detection with VWAP

Bitcoin Momentum Strategy

by Web3Degenerate
2 stars

This strategy enters long positions when price trades above a higher-timeframe exponential moving average and momentum conditions are clear. It avoids new entries during volatility caution periods, which trigger when pullbacks exceed specified Average True Ran

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Bitcoin Momentum Strategy

Mc War OB + EMA

by tuanmcwar
2 stars

This price-chart indicator plots a 34-period EMA and an 89-period EMA and defines buy and sell conditions from their relationship to the prior close. It is built to draw bullish and bearish order-block boxes, optionally recolor blocks that price has broken, an

Indicator v5 Moving averagesSMC / ICT / price action
Updated 2 years ago · None stated GitHub repository of Mc War OB + EMA

MACD

by CjHare
2 stars

This indicator calculates the MACD in a separate pane. It subtracts a slow exponential moving average from a fast one, then smooths that difference with another exponential moving average to form the signal. It plots the MACD and signal as solid lines, a colum

Indicator v5 Oscillators & momentumMoving averages
Updated 2 years ago · Apache-2.0 GitHub repository of MACD
2 stars

This indicator overlays multiple moving averages on the price chart including 5, 10, 21, 30, 50, 150 and 200 period EMAs and SMAs. It draws D-Day markers with labels, identifies buying and selling climaxes, plots 52-week high and low levels, and detects VIX in

Indicator v5 Moving averagesSupport & resistance Repaints
Updated 2 years ago · MIT GitHub repository of Combined Candle Counter
2 stars

This trend-following strategy plots an 8-period WMA on close prices, a 10-period WMA on open prices, a 100-period Hull Moving Average, and a VWAP EMA overlay on the price chart. It enters long when the fast WMA crosses above the slow WMA while above the HMA fi

Strategy v5 TrendMoving averages
Updated 3 years ago · None stated GitHub repository of [CBB] LWMA OCx 8/10 Strategy

MACD #1

by storm0611
2 stars

MACD #1 is a momentum indicator that calculates the MACD line as the difference between a fast EMA and a slow EMA of the close price. It also computes the signal line as the EMA of the MACD line with a default length of 9. The script plots the MACD line in blu

Indicator v5 Oscillators & momentumMoving averages
Updated 4 years ago · None stated GitHub repository of MACD #1

Supertrend UP/DOWN

by minaecer
2 stars

This strategy plots a Supertrend line on the price chart and colors it green in an up direction and red in a down direction. It also marks direction changes with arrows below the bar. Entries come from a separate moving-average rule: a long when the 14-period

Strategy v5 TrendMoving averages
Updated 4 years ago · MPL-2.0 GitHub repository of Supertrend UP/DOWN

Calculates and plots daily moving averages, including 200, 100, and 50-period SMAs as well as a 20-period EMA, onto intraday price charts. It also includes an optional Williams Alligator Jaw line calculated using a smoothed moving average. Settings allow adjus

Indicator v5 Moving averagesTrend Repaints
Updated 4 years ago · MIT GitHub repository of Daily Moving Averages on Intraday Chart

Overbought

by kat3samsin
2 stars

This strategy identifies overbought conditions in uptrends for long entries. It calculates RSI with 14 periods, 50 and 200 period SMAs, ALMA smoothed close, and Stochastics with customizable K D and smooth periods. Entries occur when RSI exceeds 70 price excee

Strategy v4 TrendOscillators & momentum
Updated 5 years ago · MIT GitHub repository of Overbought

6 EMAs Integrated

by sean-ccho
1 stars

Plots six exponential moving averages on the price chart, with default lengths of 5, 10, 20, 50, 100 and 200 applied to the close. The three short-term lines and three long-term lines are grouped in the settings, and each line has its own on/off switch and len

Indicator v5 Moving averagesTrend
Updated 2 days ago · None stated GitHub repository of 6 EMAs Integrated
1 stars

This indicator calculates the classic Awesome Oscillator by subtracting a 34-period simple moving average from a 5-period simple moving average of median prices. It plots the resulting values as a color-coded column histogram in a separate pane, turning green

Indicator v6 Oscillators & momentumMoving averages
Updated 2 days ago · Custom licence GitHub repository of Awesome Oscillator

Strategy Template

by Jahanzaib211
1 stars

A strategy template that enters long when a fast EMA crosses above a slow EMA while price is above a higher-timeframe EMA, and short on the opposite setup, optionally limited to a session window. Entries happen only on a confirmed bar with no open position. Ea

Strategy v6 Moving averagesTrend
Updated 2 days ago · MIT GitHub repository of Strategy Template

Confluence Trend + Momentum

by nvolpe2007-cell
1 stars

A long-or-cash strategy that holds a position only when two conditions agree: the close is above a 100-bar simple moving average and above the close from 20 bars earlier. Otherwise it stays in cash. By default it requests daily bars whatever the chart timefram

Strategy v6 TrendMoving averages
Updated 2 days ago · None stated GitHub repository of Confluence Trend + Momentum

ML Strategy Webhook

by GeekRabbit007
1 stars

A simple strategy built to feed a server with alert data. It plots a fast and a slow EMA, 12 and 26 by default, goes long when the fast crosses above the slow, and on the opposite cross closes the long and opens a short. There is no stop loss or take profit, s

Strategy v6 TrendMoving averages
Updated 3 days ago · None stated GitHub repository of ML Strategy Webhook

Bounce 2.0

by mphinance
1 stars

Overlays five EMAs at 8, 21, 34, 55 and 89 on the price chart and marks a Bounce 2.0 pullback setup. The setup needs the shorter EMAs in bullish order, ADX at or above 25, a stochastic reading at or below 40 and price within a band around the 21 EMA. A label a

Indicator v6 TrendMoving averages
Updated 3 days ago · Custom licence GitHub repository of Bounce 2.0

Alerts & Automation

by jayadevrana
1 stars

This indicator plots a fast and a slow exponential moving average on the price chart and marks a buy when the fast average crosses above the slow average and a sell when it crosses below. It builds a plain-text price message and a JSON order message that inclu

Indicator v6 Moving averages
Updated 4 days ago · MPL-2.0 GitHub repository of Alerts & Automation

ES1! Short 1D MA200 MA5

by luifertorres
1 stars

A short-only daily strategy for E-mini S&P futures, the mirror of the long version. It enters short when the 200-period SMA is falling, the candle is bullish and the whole bar sits above the 5-period SMA, and it closes the position when price closes below the

Strategy v6 Mean reversionMoving averages
Updated 6 days ago · MIT GitHub repository of ES1! Short 1D MA200 MA5

EMA-Volume

by engtuncay
1 stars

EMA-Volume calculates two Exponential Moving Averages alongside volume moving averages derived from scaled USD volume. It draws directly on the price chart, plotting both moving averages with bullish and bearish crossover markers and colored background highlig

Indicator v6 Moving averagesTrend
Updated 7 days ago · None stated GitHub repository of EMA-Volume

MA + R:R Strategy

by MuhammadMuhamid
1 stars

A strategy that combines optional multi-timeframe moving average trend filters, SuperTrend, linear regression, VWMA, volume and higher-high structure checks to trigger entries on crypto spot pairs. Risk is set with a swing-low stop and a take profit at a chose

Strategy v6 TrendMoving averages Repaints
Updated 13 days ago · None stated GitHub repository of MA + R:R Strategy

An overlay indicator that plots 9, 21 and 50 period EMAs and prints BUY or SELL labels when the 9 EMA crosses the 21, price sits on the correct side of the 50 EMA, the candle matches the direction and volume is above its 20-bar average. On each signal it store

Indicator v5 Moving averagesTrend
Updated 2 weeks ago · None stated GitHub repository of 9-21-50 EMA Strategy With SL Hit

[ad] SFP + FVG / IFVG

by amadeo987
1 stars

This overlay indicator draws swing-based liquidity levels, fair value gaps and inverted fair value gaps on the price chart. It marks a sweep as RAW after a wick takes a swing and price closes back, then shows a short confirmation label after a later close beyo

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 3 weeks ago · MIT GitHub repository of [ad] SFP + FVG / IFVG

Key Level Confluence

by mrme000m
1 stars

The Key Level Confluence indicator plots support and resistance levels on the price chart. It calculates pivot highs and lows, the point of control from a simplified volume profile, VWAP, EMA50 and EMA200, Bollinger Bands, and ATR-based stop levels. Confluence

Indicator v5 Support & resistanceMoving averages
Updated 7 weeks ago · None stated GitHub repository of Key Level Confluence
1 stars

A second version of an index-oriented strategy that uses TRAMA adaptive moving averages with short and long lengths, a hold percentage and a hedge percentage. It can add an RSI slope filter on a chosen timeframe and an optional Turtle-style mode that adds to p

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of Hedge Fund Manager 2 SIGIL

Calculates and plots customizable sets of moving averages across intraday, daily, weekly, and monthly timeframes directly on the main price chart. Supports SMA, EMA, RMA, VWMA, and WMA calculations with per-line width and color options, moving average clouds,

Indicator v6 Moving averagesTrend Repaints
Updated 2 months ago · MPL-2.0 GitHub repository of Moving Averages For All Timeframes

Gold Dominator Pro

by thanvish21
1 stars

Gold Dominator Pro is an overlay strategy aimed at gold. It reads a higher-timeframe trend from three exponential moving averages and includes RSI, MACD, Stochastic RSI, ADX, ATR, and volume settings. Optional session, equity-curve, and maximum-drawdown guards

Strategy v5 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Gold Dominator Pro

GrimmArty Strategy

by GreyssonEnterprises
1 stars

A Pine v5 strategy version of a candle and moving average indicator. It draws four smoothed moving averages (21, 50, 100 and 200), a trend fill against the 200 average, three line strike markers and engulfing-style candle markers, and can shade a time-zone tra

Strategy v5 Moving averagesCandlestick patterns
Updated 3 months ago · MIT GitHub repository of GrimmArty Strategy
1 stars

A variant of the Elephant Bars overlay that considers only one-bar retracements. It flags candles whose body is at least a set multiple of the average body, then marks a following bar as a retracement when its body is small relative to the elephant bar and its

Indicator v5 Candlestick patternsMoving averages
Updated 3 months ago · None stated GitHub repository of Elephant Bars Single Retracement

Non-repainting HTF EMA

by ForexCodes-hq
1 stars

This indicator plots an exponential moving average calculated from a user-defined higher timeframe directly on the price chart. It avoids repainting and lookahead bias by applying a one-bar historical offset to the higher-timeframe data with lookahead disabled

Indicator v6 Moving averagesTrend
Updated 3 months ago · MIT GitHub repository of Non-repainting HTF EMA

This overlay indicator unifies three optional alert modules on the price chart. It plots a fast and a slow exponential moving average and an optional horizontal price level. On confirmed bars only, it sends webhook-ready JSON when the fast average crosses the

Indicator v6 Moving averagesOscillators & momentum
Updated 3 months ago · MIT GitHub repository of Multi-Condition Alert Manager [QuantForge]
1 stars

A starter template for a Pine v6 indicator in a separate pane, with comments in Chinese. It computes two exponential moving averages of a chosen source with different lengths, converts the first into a 0 to 100 rolling percentile, and offers show toggles and a

Indicator v6 Oscillators & momentumMoving averages
Updated 3 months ago · None stated GitHub repository of Template A Separate Pane Indicator

Simple Options Bias Strategy

by SankarSrinivasan1
1 stars

This strategy determines directional market bias for options traders by combining a 20-period Exponential Moving Average (EMA) and a 14-period Relative Strength Index (RSI). It enters a long position when the closing price is above the 20 EMA and RSI is below

Strategy v5 TrendOscillators & momentum
Updated 4 months ago · GPL-3.0 GitHub repository of Simple Options Bias Strategy

Unified Trade Signal

by ashishgkwd
1 stars

Unified Trade Signal is an overlay indicator that prints a buy or sell label only when several conditions agree on the same bar. For a buy, price must break above a Nadaraya-Watson envelope upper band, the fast EMA must be above the slow EMA, an adaptive trend

Indicator v6 TrendOscillators & momentum Repaints
Updated 4 months ago · None stated GitHub repository of Unified Trade Signal
1 stars

This Pine Script strategy tests type casting and mathematical operations using logarithmic scaling on price deviation. It calculates a simple moving average over a user-defined length, computes the absolute spread between price and the average, and scales it u

Strategy v6 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Cast And Log10 Support
1 stars

The script is an indicator that plots multiple moving averages on the price chart. It displays HMA 9, EMA 16, HMA 21, EMA 34 and EMA 50 lines with separate bullish and bearish colors plus optional band fills for each. Users toggle visibility of lines and fills

Indicator v6 Moving averages
Updated 5 months ago · None stated GitHub repository of EMA High/Low/Median Ribbon

MC-Predict HullMA v2

by ebarkinkaras-lang
1 stars

A price-chart overlay that plots a Hull moving average with a set of EMAs, SuperTrend and Bollinger Bands, and scores the market by weighting trend, momentum, volatility, volume, support and resistance, and a k-nearest-neighbours estimate. The nearest-neighbou

Indicator v5 AI / machine learningTrend
Updated 5 months ago · None stated GitHub repository of MC-Predict HullMA v2

SahanS Full Indicator

by sahansbandara
1 stars

An all-in-one overlay indicator that merges a divergence detector, smart money concepts, order blocks, liquidity swings and moving averages. The divergence part checks regular and hidden divergences between price and up to ten oscillators including RSI, MACD,

Indicator v5 DivergenceSMC / ICT / price action
Updated 5 months ago · None stated GitHub repository of SahanS Full Indicator

FPL Cheatcode

by onlyspx
1 stars

This indicator draws up to six configurable moving averages on the price chart. Each has its own type (SMA, EMA, SMMA, WMA or VWMA), length, source, offset and optional higher timeframe. Defaults are 50 and 200 averages on the chart timeframe plus hourly 21 EM

Indicator v6 Moving averagesTrend
Updated 6 months ago · None stated GitHub repository of FPL Cheatcode

Beginner EMA + RSI + ATR

by Sandesh30-cloud
1 stars

Beginner EMA + RSI + ATR is a long-only trend-following strategy plotted directly on the price chart. It identifies an uptrend when the 50-period EMA trades above the 200-period EMA, triggering long entries when the 14-period RSI crosses above the 50 centerlin

Strategy v5 TrendOscillators & momentum
Updated 6 months ago · None stated GitHub repository of Beginner EMA + RSI + ATR

Breadth Dip Buying

by AlanGuo
1 stars

A long-only strategy that combines a market breadth index, the percentage of stocks above their 50-day average, with a long moving average of 225 periods. When price is above the average, it buys if breadth drops below 25. In bear mode, which is off by default

Strategy v6 Mean reversionMoving averages
Updated 7 months ago · None stated GitHub repository of Breadth Dip Buying

Precious Metals Dashboard

by TehbynDFRNT
1 stars

Overlays fast, slow and trend EMAs with an optional cloud, cross triangles and volume spike markers on the price chart, and pulls spot gold, silver and a list of ASX gold and silver miners through security requests. A table summarises daily change, RSI, volume

Indicator v6 Screeners & dashboardsMoving averages
Updated 7 months ago · None stated GitHub repository of Precious Metals Dashboard

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