Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 30)

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

VIX Term Structure

by namuan
318 stars

This indicator plots the implied volatility term structure for US equities in a separate pane. It requests close data for four Cboe volatility indexes: VIX9D (9-day), VIX (30-day), VIX3M (3-month), and VIX6M (6-month) on the current timeframe. For each index,

Indicator v5 Volatility & bandsMoving averages
Updated 2 months ago · MIT GitHub repository of VIX Term Structure

Swoosh Indicator

by harryguiacorn
220 stars

Swoosh Indicator is an overlay that marks directional conditions on the price chart. It checks whether four simple moving averages are stacked in order and whether the MACD line is above or below its signal line. When both agree, it plots a green up arrow belo

Indicator v5 Moving averagesOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Swoosh Indicator

Williams %R (v.4)

by capissimo
114 stars

Williams %R (v.4) is a custom momentum indicator displayed in a separate pane that calculates a scaled Williams %R oscillator over a user-defined lookback period. It enhances standard analysis by layering a secondary confirmation feature—selectable among CCI,

Indicator v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of Williams %R (v.4)
99 stars

Calculates the Archer Moving Averages Trends (AMAT) indicator by comparing fast and slow Exponential Moving Averages (EMAs) alongside their slope directions. A bullish trend (+1) is identified when the fast EMA exceeds the slow EMA with both rising, while a be

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Archer Moving Averages Trends (AMAT)
56 stars

This indicator calculates an Exponential Moving Average and a Zero-Lag Moving Average to identify market trends on the price chart. It plots both moving averages and fills the space between them with color to highlight trend direction. Upon a crossover or cros

Indicator v5 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of No-Lag MA Trend Levels
53 stars

This strategy identifies long entry opportunities based on short-term price pullbacks below a major trend filter. It enters long when three consecutive lower closes occur below the 200-period simple moving average, followed by the current bar closing back abov

Strategy v6 TrendMoving averages
Updated 2 months ago · MPL-2.0 GitHub repository of Ivan Scherman Pattern - TP/SL
43 stars

This indicator plots five customizable moving averages from a chosen higher timeframe directly on the price chart. It does not provide trading signals, trade execution, or automated alerts. Users can configure the target resolution, adjust individual period le

Indicator v4 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Hardcoded Moving Averages

This strategy designed for Binance SOLUSDTPERP futures trading generates entries based on pivot high and low support or resistance levels, a 3-period EMA, and a custom smoothed trend filter line. It opens long or short positions when price confirms movement re

Strategy v5 TrendBreakout Repaints
Updated 2 years ago · None stated GitHub repository of SOLUSDTPERP - Strategy Candles Bar
20 stars

This indicator calculates a base moving average (EMA, SMA, WMA, or HMA) and projects multiple symmetrical envelope bands around it directly on the price chart. Users can adjust the length, source, moving average type, and initial envelope multiplier. Additiona

Indicator v5 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of Multiple Moving Average Envelope

Trend Compass 15m

by chris-c-thomas
14 stars

Trend Compass 15m is an intraday trend analysis overlay designed for 15-minute charts. It calculates a triple exponential moving average ribbon, higher-timeframe reference EMAs from 1H, 4H, and Daily periods, RSI and MACD divergences, On-Balance Volume trends,

Indicator v6 TrendMoving averages Repaints
Updated 6 months ago · MIT GitHub repository of Trend Compass 15m
8 stars

ATX-Long-Term Strategy is an overlay strategy built around a selectable moving average, ATR, and ADX. Settings offer eight average types, including Tilson T3, an optional second average, Heikin-Ashi prices, and a custom timeframe. Separate ATR multipliers appl

Strategy v4 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of ATX-Long-Term Strategy

LunarTick Trend

by lunarticktrading
7 stars

LunarTick Trend plots a cloud between a fast and a slow moving average on the price chart. The user chooses SMA or EMA and the two lengths, and both averages can be requested from a selected timeframe. Bullish and bearish colors mark the cloud, and optional re

Indicator v6 TrendMoving averages Repaints
Updated 2 weeks ago · None stated GitHub repository of LunarTick Trend

Impulse MACD

by s4mn0v
7 stars

The Impulse MACD indicator calculates a modified Moving Average Convergence Divergence to measure price momentum in a smoother and less noisy way than traditional MACD. It uses special moving averages with default lengths of 34 for the fast period and 9 for th

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

This strategy calculates standard Ichimoku Kinko Hyo components including the Tenkan-Sen, Kijun-Sen, Chikou-Span, and Senkou Spans A and B to plot the Ichimoku cloud directly on the price chart. It enters long positions when price and Kijun-Sen are above the K

Strategy v5 TrendMoving averages
Updated 1 year ago · MPL-2.0 GitHub repository of Ichimoku Kinko Hyo: Basic Strategy

This short-only trading strategy combines a 200-period Exponential Moving Average, a Stochastic RSI oscillator, and three distinct Supertrend indicators on the price chart. It evaluates price trend relative to the 200 EMA alongside Stochastic RSI crossunder co

Strategy v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of 200 EMA + Stochastic + Triple Supertrend Short Strategy

AG TrendPullback Short

by eltonaguiar
4 stars

The AG TrendPullback Short strategy identifies short pullback opportunities in downtrending markets. It calculates EMA50 and EMA200 crossovers, RSI2 overbought signals above 90, and ADX trend strength above 20. When these align, it enters a short position size

Strategy v6 TrendOscillators & momentum
Updated 2 days ago · None stated GitHub repository of AG TrendPullback Short

Triple MA Trend

by latentwill
4 stars

This strategy trades alignment of three simple moving averages on the price chart. A long opens when the short average crosses above the middle average while price stays above the long average. The opposite cross closes that long and opens a short. Length, sto

Strategy v5 TrendMoving averages
Updated 8 days ago · None stated GitHub repository of Triple MA Trend
4 stars

This strategy trades crude oil futures only during the New York session from 09:00 to 14:30. It enters long when a fast EMA crosses above a slow EMA and short on the opposite cross, and only while that session is open. Each entry sets an ATR-based stop loss an

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

MUSLUCA-V2

by Kalumur
4 stars

MUSLUCA-V2 is an overlay indicator that plots higher-timeframe moving averages on the price chart. It draws an 8-period and a 55-period exponential moving average from the four-hour timeframe, an 8-period daily exponential moving average, and 9-period and 15-p

Indicator v5 Moving averagesSupport & resistance Repaints
Updated 2 years ago · None stated GitHub repository of MUSLUCA-V2

My Custom Strategy 2

by might-tree
4 stars

This strategy calculates a 20-period volume-weighted moving average of the low, a 200-period Hull moving average of the high, and 25-period highest close values. It enters a long position when the high breaks above the previous highest close while the close re

Strategy v5 TrendMoving averages
Updated 3 years ago · None stated GitHub repository of My Custom Strategy 2

EMA 14 Haf-Aylık

by gocaman
3 stars

This indicator overlays multi-timeframe exponential moving averages and channel zones directly on the price chart. It calculates a weekly 14-period EMA, monthly 9-period and 14-period EMAs, along with a configurable 233-period high-low EMA channel with a shade

Indicator v5 Moving averagesTrend Repaints
Updated 2 days ago · None stated GitHub repository of EMA 14 Haf-Aylık
3 stars

This overlay indicator is a Phase 3 debug demonstration. It exposes toggles for memory profiling, code coverage, test-data collection, and benchmarking, plus a debug level and a maximum bar count. Minimal helper functions estimate memory use, count function ca

Indicator v5 Oscillators & momentumMoving averages
Updated 7 months ago · None stated GitHub repository of Phase 3 Comprehensive Test

Gold Digger AI

by IAMATOMIC001
3 stars

This strategy executes gap breakout entries directly on the price chart, opening long positions when the current open exceeds the prior high and short positions when the open drops below the prior low. It overlays a custom Supertrend filter, an EMA cloud, a Pa

Strategy v5 BreakoutMoving averages
Updated 12 months ago · None stated GitHub repository of Gold Digger AI

J's Composite Index

by jawauntb
3 stars

J's Composite Index combines RSI momentum with simple moving averages in a separate pane. It calculates an unbounded momentum RSI value by adding the bar-over-bar change of a 14-period RSI to a 3-period simple moving average of a 3-period RSI. The indicator pl

Indicator v5 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of J's Composite Index
2 stars

This trend-following strategy plots on the price chart and identifies continuation trades during established trends. It calculates dual exponential moving averages alongside an average directional index filter. Entries trigger when price pulls back into the mo

Strategy v6 TrendMoving averages
Updated 4 weeks ago · Custom licence GitHub repository of MP EMA 9/21 Pullback Continuation

Zeguela Dematron

by danielvm-git
2 stars

This strategy plots up to three double exponential moving averages on the price chart and looks for crossovers and crossunders between them. With the default lengths, the fastest DEMA crossing the second DEMA is the signal; a third length of zero is ignored, a

Strategy v4 Moving averagesTrend
Updated 2 months ago · MIT GitHub repository of Zeguela Dematron

WaveTrend with Crosses [LazyBear]

by avatar-lavventura
2 stars

This strategy calculates the WaveTrend oscillator using exponential moving averages of typical price and plots two signal lines alongside overbought and oversold thresholds in a separate pane. It enters long positions when the primary line crosses above the si

Strategy v4 Oscillators & momentumMoving averages
Updated 7 months ago · None stated GitHub repository of WaveTrend with Crosses [LazyBear]
2 stars

This indicator highlights buy setups on the chart when price is trending above an exponential moving average and the Relative Strength Index falls within a narrow neutral-to-bullish zone. When the closing price is above the configured EMA and the RSI is betwee

Indicator v5 Moving averagesOscillators & momentum
Updated 2 years ago · None stated GitHub repository of HMD 25 Week EMA and 55% RSI Indicator
2 stars

The Moving Average Based Zig Zag indicator computes a smoothed price series with a volume-weighted Hull Moving Average applied to the chosen pivot source, either high-low or open-close. It detects pivot highs and lows on this moving average to construct a conn

Indicator v5 Moving averagesTrend
Updated 3 years ago · None stated GitHub repository of Moving Average Based Zig Zag

MML Multi Indikator Script

by theupslidedown
2 stars

This strategy plots a range filter and high and low target bands on the price chart, and colors bars from filter direction. Inputs cover a backtest date window, WaveTrend Cipher B channel and average lengths, overbought and oversold levels, divergence threshol

Strategy v4 TrendOscillators & momentum
Updated 3 years ago · None stated GitHub repository of MML Multi Indikator Script

The script plots the Volume Weighted Average Price on the price chart. It calculates VWAP using a specified source such as hlc3 and an anchor period like Session, Week, Month or Quarter. The main settings control whether to hide the VWAP on daily or weekly tim

Indicator v6 VolumeSupport & resistance
Updated 2 days ago · Custom licence GitHub repository of Volume Weighted Average Price

TSMOM SMA200 + Band

by nvolpe2007-cell
1 stars

A low-turnover long-or-cash strategy on daily closes. It goes long when the close is above a 200-bar SMA by more than a percentage band, moves to cash when the close is below it by more than the band, and otherwise keeps the existing position. The band reduces

Strategy v6 TrendMoving averages
Updated 2 days ago · None stated GitHub repository of TSMOM SMA200 + Band

Expectancy Lab

by jayadevrana
1 stars

Expectancy Lab plots fast and slow exponential moving averages on the price chart to generate crossover signals. It simulates one trade at a time using an ATR-based stop loss and a risk-to-reward target multiplier. The script tracks historical trade outcomes t

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

TorkEma

by engtuncay
1 stars

This indicator calculates and plots a standard exponential moving average (EMA) directly on the main price chart. Users can customize the calculation period length and the input price source. The script renders a single orange line overlaying price action to a

Indicator v5 Moving averagesTrend
Updated 7 days ago · None stated GitHub repository of TorkEma

7/19 EMA Crypto

by kanylbullen
1 stars

The 7/19 EMA Crypto strategy calculates two exponential moving averages using lengths 7 and 19. It plots bullish crossovers as long signals and bearish crossovers as short signals directly on the price chart. Long positions enter on bullish EMA crossovers and

Strategy v5 TrendMoving averages
Updated 8 days ago · None stated GitHub repository of 7/19 EMA Crypto

MA Suite

by vedkanani123
1 stars

An overlay indicator built around one selectable moving average, with an optional extra smoothing step. It reads trend from price above or below the average or from a rising average, and marks support and resistance touches within a percentage tolerance, plus

Indicator v6 Moving averagesTrend
Updated 2 months ago · None stated GitHub repository of MA Suite

Polish Setup Strategy

by GreyssonEnterprises
1 stars

A Pine v5 strategy that uses smoothed moving averages of 21, 50 and 200, W and M pattern recognition with an optional volume check, an RSI midline filter and a time-zone trading session. Targets use extension levels, risk per trade is a base percentage capped

Strategy v5 Moving averagesSessions & time
Updated 3 months ago · MIT GitHub repository of Polish Setup Strategy
1 stars

Plots an exponential moving median on the price chart as a comparison with the standard EMA. For each bar it takes a window of recent prices, gives nearer bars exponentially larger weights, sorts the prices and returns the value where cumulative weight reaches

Indicator v5 Moving averages
Updated 3 months ago · None stated GitHub repository of Exponential Moving Median (EMM)
1 stars

This strategy executes trades based on Triangular Moving Average (TMA) crossings, Support and Resistance filters (such as Daily Pivots, Anchored VWAP, and 5-day moving averages), and volume or percentage gain criteria. Exits are driven by specific session time

Strategy v6 TrendMoving averages
Updated 4 months ago · None stated GitHub repository of STT SR TMA Scale ExitOnly Plan

Strategy Template

by mrdungx2603
1 stars

This is a Pine Script v6 strategy template that sets up a trading strategy drawing on the price chart. It includes inputs for data source, fast and slow length parameters, take profit and stop loss percentages, and a time-based trading session filter. The stra

Strategy v6 Moving averagesTrend
Updated 4 months ago · None stated GitHub repository of Strategy Template

KLSE Trend Template

by kevinesk
1 stars

This indicator evaluates Mark Minervini's Trend Template criteria directly on the price chart. It checks eight technical conditions based on 21, 50, 150, and 200-period exponential moving averages, alongside 52-week (260-bar) highs and lows. The script plots t

Indicator v5 TrendMoving averages
Updated 4 months ago · None stated GitHub repository of KLSE Trend Template

Intraday Trading

by rubbermetal
1 stars

Intraday Trading is an indicator that combines a fast MACD built from simple moving averages with an EMA structure made of a 50-period EMA of highs, a 50-period EMA of lows and a 15-period EMA of closes. Long and Short labels appear when the MACD crosses its s

Indicator v6 TrendOscillators & momentum
Updated 4 months ago · MPL-2.0 GitHub repository of Intraday Trading
1 stars

This indicator plots three exponential moving averages and shades London and New York session hours on the price chart. It generates buy and sell signals when the fast EMA crosses the slow EMA in the direction of the 200 EMA trend filter. Entries require confi

Indicator v6 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Señales Intradía EMA + MACD

Dragon Breakout

by AlanGuo
1 stars

A long strategy that plots five moving averages (25, 50, 100, 150 and 300 by default, SMA or EMA) and looks for a bullish candle that opens below and closes above at least a set number of them. The breakout must come on volume above a ratio of its recent avera

Strategy v6 BreakoutMoving averages
Updated 7 months ago · None stated GitHub repository of Dragon Breakout

Scalper Quick Strike

by Basant1Saini
1 stars

Scalper Quick Strike is a Pine Script strategy that trades on intraday charts using multiple EMAs and Stochastic oscillator. It calculates fast medium and slow EMAs along with a smoothed Stochastic to detect trend alignment and momentum shifts. Long entries tr

Strategy v5 TrendOscillators & momentum
Updated 8 months ago · None stated GitHub repository of Scalper Quick Strike

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