Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 3)

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

5 stars

The Adaptive Window Size indicator computes a quadratic signal from the chosen source series using absolute differences normalized by total variation. This signal feeds into an exponential formula to produce an adaptive window size value. The script plots both

Indicator v6 Volatility & bandsMoving averages
Updated 8 months ago · None stated GitHub repository of Adaptive Window Size

Koncord + MACD

by Following-BTC
5 stars

This indicator combines the Koncorde oscillator with a traditional Moving Average Convergence Divergence (MACD) indicator in a separate pane. It calculates Koncorde using a mixture of the Relative Strength Index (RSI), Money Flow Index (MFI), Bollinger Bands o

Indicator v5 Oscillators & momentumVolume
Updated 2 years ago · None stated GitHub repository of Koncord + MACD

This technical indicator combines multiple popular analysis tools into a single price chart overlay to optimize chart space. It calculates and plots the complete Ichimoku Cloud, 50 and 200 Simple Moving Averages, and standard Bollinger Bands. Furthermore, it t

Indicator v5 TrendMoving averages Repaints
Updated 3 years ago · None stated GitHub repository of Ichimoku + MAs + Bollinger + Liquidity Zone
5 stars

Moving Average Crossover Bot is a simple trend-following strategy that generates trading signals when a fast Simple Moving Average crosses a slow Simple Moving Average. It enters long positions on a bullish crossover and short positions on a bearish crossunder

Strategy v4 TrendMoving averages
Updated 3 years ago · MIT GitHub repository of Moving Average Crossover Bot

2 EMAs + RSI + Stochastic

by krosenfeld7
5 stars

This indicator overlays trend and momentum signals directly on the price chart. It calculates fifty-period and two-hundred-period exponential moving averages, a fourteen-period Stochastic oscillator smoothed with three-period simple moving averages, and a four

Indicator v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of 2 EMAs + RSI + Stochastic

This overlay indicator plots Central Pivot Range levels and bands across yearly, quarterly, monthly, weekly, daily, and six-hour periods. Each timeframe can be shown or hidden, and pivot and band colors are set separately. It also marks MACD momentum and EMA t

Indicator v5 Support & resistanceOscillators & momentum
Updated 3 years ago · None stated GitHub repository of Pivot Boss Multi Timeframe CPR with MACD and EMA
5 stars

Greeffer's Scalping Indicator overlays higher-timeframe exponential moving averages, Bollinger Bands, and Donchian channels on the price chart. It flags a long when price touches the lower Donchian and lower band while the faster averages are not stacked beari

Indicator v5 Moving averagesVolatility & bands
Updated 4 years ago · None stated GitHub repository of Greeffer's Scalping Indicator

RSI MACD

by sawantuday
5 stars

This strategy enters long positions based on momentum confirmation from RSI and MACD, operating directly on the main price chart. It buys when the 14-period RSI exceeds 60 while the MACD line trades above the signal line. Positions close when the price crosses

Strategy v4 Oscillators & momentumMoving averages
Updated 5 years ago · CC0-1.0 GitHub repository of RSI MACD

SMA/EMA/VWAP

by KenlyBerkowitz
5 stars

This indicator combines multiple moving averages and volume-weighted average price calculations into a single price chart overlay. It calculates up to two adjustable Simple Moving Averages (SMAs), one user-configurable Exponential Moving Average (EMA), fixed 2

Indicator v4 Moving averagesTrend
Updated 6 years ago · None stated GitHub repository of SMA/EMA/VWAP

This strategy plots five simple moving averages on the price chart and trades crosses of a 150-period signal average. It enters long when the close crosses above that average and enters short when the close crosses below it, from a user-set start year onward.

Strategy v4 Moving averagesTrend
Updated 6 years ago · LGPL-3.0 GitHub repository of 150MA Cross BuyAndSell Strategy [d3nv3r]

This indicator identifies trend reversal signals on the price chart by combining exponential moving average crossovers with momentum and volatility filters. It calculates fast, slow, and long-term filter EMAs, along with RSI and ATR. A bullish reversal trigger

Indicator v6 TrendOscillators & momentum
Updated yesterday · None stated GitHub repository of Advanced Trend Reversal Emoji Indicator
4 stars

This strategy enters a long position when a short RSI falls below a user threshold and price is above a simple moving average trend filter. It closes the long when RSI rises above a second threshold and does not set a stop loss. Position size defaults to full

Strategy v6 Oscillators & momentumMoving averages
Updated 2 weeks ago · MIT GitHub repository of RSI(2) pullback + TokIO check
4 stars

This strategy enters long when the fast EMA crosses above the slow EMA while ADX is at least the minimum and DI plus exceeds DI minus. It enters short on the opposite cross with DI minus above DI plus. Each entry sets an ATR-based stop and take profit using th

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of ADX Trend Strategy [trugurpala]

GemHunter v4

by Finland93
4 stars

GemHunter v4 classifies market conditions into bullish, bearish, or neutral regimes using a multi-indicator voting system. It combines exponential moving average alignment, MACD momentum, and RSI strength, optionally gated by ADX trend strength and higher-time

Indicator v6 TrendOscillators & momentum
Updated 4 months ago · MPL-2.0 GitHub repository of GemHunter v4
4 stars

This strategy overlays asymmetric Bollinger Bands built on a Weighted Moving Average of hlc3. It opens long positions on an upside breakout above the upper band, confirmed by positive momentum and candle structure filters. Positions exit only when the closing

Strategy v6 BreakoutMoving averages
Updated 5 months ago · None stated GitHub repository of Bollinger WMA (Long Only)
4 stars

Christian Qullamaggie Strategy is a trend-following and breakout strategy overlay designed to identify high-momentum trading opportunities directly on the price chart. It evaluates market conditions using fast, mid, and slow EMAs, average true range (ATR), and

Strategy v6 BreakoutTrend
Updated 7 months ago · None stated GitHub repository of Christian Qullamaggie Strategy
4 stars

This indicator recolors price candles from recent volume and range. It marks climax bars when current volume times range exceeds the prior ten-bar peak or volume is at least twice a ten-bar average, and rising bars at one and a half times that average. Bullish

Indicator v5 VolumeCandlestick patterns
Updated 9 months ago · None stated GitHub repository of Price-Volume Analysis
4 stars

This indicator computes the Watchtower Axis as a 257-period weighted moving average of closing prices to establish the main trend baseline. It defines volatility gates using the highest high and lowest low over 463 periods, along with a 377-period exponential

Indicator v6 TrendMoving averages
Updated 10 months ago · MIT GitHub repository of Miela Labs | John Dee's Watchtower
4 stars

This strategy executes trades based on simple moving average crossovers. It calculates a 10-period and a 30-period SMA, opening a long position and closing any short position when the fast SMA crosses above the slow SMA. Conversely, it opens a short position a

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Advanced Buy/Sell Strategy

Multi-Timeframe Moving Averages is an overlay indicator that calculates and plots moving averages across multiple timeframes directly on the main price chart. It supports various moving average types including SMA, EMA, WMA, HMA, RMA, and VWMA, with customizab

Indicator v6 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Multi-Timeframe Moving Averages
4 stars

This strategy plots three exponential moving averages on the price chart and uses RSI for exits. It opens a long when the fastest EMA crosses above the middle EMA while remaining above the slowest EMA and the bar closes above its open. Shorts use the opposite

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Tendency EMA + RSI [Alorse]

Trix Strategy V2

by CryptoRobotFr
4 stars

This strategy trades trend continuations using a triple moving average oscillator (TRIX) and a long-term moving average baseline. It opens long positions when price is above the long moving average and the TRIX histogram crosses above zero, and opens short pos

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Trix Strategy V2
4 stars

Davids Ichimoku Cloud Break is an overlay strategy that generates trade signals based on Ichimoku Cloud breakout conditions combined with an optional MACD entry filter. It calculates and plots the Conversion Line, Base Line, Lagging Span, and Leading Spans dir

Strategy v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Davids Ichimoku Cloud Break

ARANLAR

by Kalumur
4 stars

ARANLAR is an overlay indicator that combines a Tillson T3 moving average, WMA crossover signals, price channel boundaries, and dynamic Fibonacci retracement levels. It plots a color-coded T3 line to show short-term trend direction and triggers buy (AL) or sel

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

Imbalance + 3EMA

by linkcla
4 stars

This overlay indicator plots three exponential moving averages on the price chart and marks imbalance zones with boxes. Each EMA has its own length, color, and visibility toggle, with defaults of 10, 50, and 200. Fair value gaps are detected across three bars

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

Supertrend EMA Strategy

by mohammad95labbaf
4 stars

Supertrend EMA Strategy is a chart overlay indicator that combines Supertrend trailing levels with an Exponential Moving Average filter to identify entry signals. Buy signals occur when the Supertrend turns bullish while price trades above the specified EMA, w

Indicator v4 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Supertrend EMA Strategy
4 stars

This strategy executes trend-following trades based on Bollinger Band breakouts confirmed by a long-term moving average filter. A long position opens when the price crosses above the upper Bollinger Band, provided the band spread meets a minimum threshold and

Strategy v5 Volatility & bandsTrend
Updated 2 years ago · None stated GitHub repository of Bollinger Trend - Strategy V1

STPP20 + ADX

by rKv4dr4t
4 stars

This strategy combines a Pivot Point SuperTrend with an Average Directional Index (ADX) filter and a 21-period simple moving average. It enters long positions when the close crosses above the SuperTrend trailing band while remaining above the moving average an

Strategy v4 TrendMoving averages
Updated 2 years ago · MIT GitHub repository of STPP20 + ADX
4 stars

Calculates a 5-period Exponential Moving Average (EMA) to identify short and long trade setups based on price distance from the average. It triggers entries when price breaks the high or low of an alert candle that formed completely outside the 5 EMA. The stra

Strategy v5 Moving averagesBreakout
Updated 3 years ago · None stated GitHub repository of 5 EMA Strategy: Power of Stocks
4 stars

This strategy plots custom upper and lower bands on the price chart using configurable moving average types and deviation multipliers. It opens long or short positions when price crosses above or below these envelopes, with optional RSI oscillator filters for

Strategy v5 Volatility & bandsMoving averages
Updated 4 years ago · MIT GitHub repository of Bollinger Bands Strategy
4 stars

Leonidas Trend Following System is a trend following indicator that plots key, long-term, and short-term exponential moving averages directly on the price chart. It calculates trend signals through EMA crossovers and price changes relative to the center line,

Indicator v5 TrendOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Leonidas Trend Following System

EMA and ADX v1

by aofwittawat
4 stars

This indicator calculates an Exponential Moving Average (EMA) and an Average Directional Index (ADX) to signal trend entries and exits directly on the price chart. It triggers a long signal when the close is above the EMA and a short signal when below, optiona

Indicator v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of EMA and ADX v1

ESR-Bot (beta)

by Main-Michael-Sparks
4 stars

ESR-Bot is a Pine v4 strategy that plots in a separate pane. It combines a smoothed RSI, with adjustable overbought and oversold ranges, and two exponential moving averages. A long or short signal fires when RSI sits inside the matching range while a recent EM

Strategy v4 Oscillators & momentumMoving averages
Updated 4 years ago · MPL-2.0 GitHub repository of ESR-Bot (beta)

This strategy plots three EMAs (50, 100, 200) on the price chart for crossover signals. Long entries occur when fast EMA crosses above mid EMA and close exceeds slow EMA; short entries when fast crosses below mid and close is below slow. It uses ATR trailing s

Strategy v4 Moving averagesTrend
Updated 5 years ago · MIT GitHub repository of Algo Trading Simple 3-EMA Strategy + Trailstop
4 stars

This indicator overlays four simple moving averages and marks crosses between the short and basis averages on the price chart. It also plots Bollinger Bands around the basis average using a standard-deviation multiplier and fills the band. Separate resistance

Indicator v4 Moving averagesVolatility & bands
Updated 5 years ago · GPL-3.0 GitHub repository of Bollinger Bands/MA Cross

Adam's RSI

by adamhelton
4 stars

Adam's RSI calculates a standard Relative Strength Index alongside a fast RSI and an EMA of the standard RSI. It plots the main RSI line colored according to whether it is above or below the 50 baseline, along with overbought and oversold levels. The indicator

Indicator v4 Oscillators & momentumMoving averages
Updated 6 years ago · None stated GitHub repository of Adam's RSI

CMYK RMI SMA

by myn
4 stars

CMYK RMI SMA is a multi-period strategy combining three distinct Relative Momentum Index (RMI) oscillators—Alpha, Beta, and Gamma—with Simple Moving Average (SMA) trend filters. It evaluates short, medium, and long-term momentum alongside SMA trend phasing to

Strategy v4 Oscillators & momentumTrend
Updated 6 years ago · Apache-2.0 GitHub repository of CMYK RMI SMA

Bollinger Squeeze

by degenview
3 stars

This indicator calculates standard Bollinger Bands using a simple moving average basis along with upper and lower volatility bands. It measures normalized band width to detect squeeze conditions where the bands contract to their narrowest point over a specifie

Indicator v6 Volatility & bandsMoving averages
Updated yesterday · GPL-3.0 GitHub repository of Bollinger Squeeze

ALMA Tarama

by gocaman
3 stars

This indicator plots an Arnaud Legoux moving average on the price chart and colors it by slope. It marks an entry label when the average turns up and an exit label when it turns down, and it fires matching alerts. A separate exponential moving average is drawn

Indicator v5 Moving averagesTrend
Updated yesterday · None stated GitHub repository of ALMA Tarama

GBPUSD H1 QuadLayer

by GifariKemal
3 stars

An institutional order block and EMA pullback indicator designed for GBPUSD on the 1-hour timeframe. It filters trading signals based on specific London and New York session kill zones, ATR volatility thresholds, signal quality metrics, and day or hour multipl

Indicator v5 SMC / ICT / price actionMoving averages
Updated 4 days ago · MIT GitHub repository of GBPUSD H1 QuadLayer
3 stars

The strategy plots SuperTrend and ADX indicators directly on the price chart. It generates long signals on SuperTrend bullish flips combined with ADX above the set threshold and closes positions on SuperTrend bearish flips or when stop-loss or take-profit leve

Strategy v5 TrendOscillators & momentum
Updated 12 days ago · None stated GitHub repository of OctaStack SuperTrend + ADX

Adaptive Moving Average

by AkashSasikumar47
3 stars

Adaptive Moving Average (AMA) is a trend-following indicator that dynamically adjusts smoothing based on recent price volatility. It blends a fast EMA (default length 2) with a slow EMA (default length 30) using an adaptive multiplier derived from the highest

Indicator v6 TrendMoving averages
Updated 2 weeks ago · MIT GitHub repository of Adaptive Moving Average

Basic Strategy Scaffold

by jpantsjoha
3 stars

This strategy enters long when a fast EMA crosses above a slow EMA and short when it crosses below, only after the bar is confirmed. It sizes each order as a percentage of equity and exits with a percentage stop and a percentage target measured from the averag

Strategy v6 TrendMoving averages
Updated 3 weeks ago · Custom licence GitHub repository of Basic Strategy Scaffold

This indicator calculates a multi-timeframe MACD line alongside signal lines and volatility bands in a separate chart pane. It offers nine customizable moving average types, including SMA, EMA, DEMA, TEMA, Hull MA, Volume Weighted MA, and Least Squares MA. Use

Indicator v5 Oscillators & momentumMoving averages
Updated 4 weeks ago · None stated GitHub repository of MACD Bands - Multi Timeframe [TradeMaster Lite]

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