Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 8)

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

A price-chart overlay built around a customised Ichimoku setup with Tenkan, Kijun, a coloured cloud, Chikou span, quality and direction lines, and Tenkan/Kijun cross markers. It adds an optional zero-lag EMA from a chosen timeframe, a T3 moving average system

Indicator v4 TrendMoving averages
Updated 6 months ago · None stated GitHub repository of ARPS Zenith Ichimoku Framework
1 stars

An indicator, despite the strategy name, that combines a 7-bar and 50-bar simple moving average cross with a crossover between a 102-bar RSI and its 204-bar average. Long and short labels grade signals by whether the MA and RSI crosses happen on the same bar o

Indicator v4 Moving averagesOscillators & momentum
Updated 6 months ago · None stated GitHub repository of ARPS RSI-MA Scalping Strategy

ARPS Long Term Strategy

by ali-rajabpour
1 stars

Despite its name, this is an indicator that stacks many studies on the price chart: an Ichimoku-style set of lines and cloud, a Hull moving average with a Tillson T3 line, a configurable moving average with several smoothing methods, WaveTrend signals, ATR-bas

Indicator v5 TrendMoving averages
Updated 6 months ago · None stated GitHub repository of ARPS Long Term Strategy

ARPS Info Table

by ali-rajabpour
1 stars

An overlay that gathers several studies into an on-chart table. It reads 200-period simple and exponential moving averages on 30 minute, 1 hour, 4 hour, 6 hour, 12 hour, daily and weekly timeframes, and calculates ATR-based long and short stop levels. It also

Indicator v5 Moving averagesScreeners & dashboards
Updated 6 months ago · None stated GitHub repository of ARPS Info Table

ADX Backtest

by AlanGuo
1 stars

A long-only strategy that uses the Average Directional Index to time entries, with a moving average trend filter. It buys when ADX crosses above a threshold, optionally requiring the plus DI to lead, while price is above a 60-period SMA, EMA or RMA, or when pr

Strategy v6 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of ADX Backtest

Novacron Test Dashboard

by TehbynDFRNT
1 stars

A small test overlay that plots a fast and a slow EMA on the price chart, marks bullish and bearish EMA crossovers with triangles, and flags volume spikes with small circles. A table in the top right corner shows the current trend, RSI, ATR, volume compared wi

Indicator v6 Moving averagesScreeners & dashboards
Updated 7 months ago · None stated GitHub repository of Novacron Test Dashboard

Blackflag FTS

by ymlee1104
1 stars

Blackflag FTS is an overlay trend-following indicator that calculates dynamic trailing stop levels using an ATR-based volatility filter and Wilder's moving average. It features both modified and standard true range calculations to limit extreme volatility spik

Indicator v6 TrendVolatility & bands
Updated 7 months ago · None stated GitHub repository of Blackflag FTS

This strategy detects low-volatility consolidation by identifying when Bollinger Bands contract inside Keltner Channels. When the squeeze releases, it evaluates linear regression momentum and optional volume spikes to confirm breakouts. Long signals occur on r

Strategy v5 Volatility & bandsBreakout
Updated 7 months ago · None stated GitHub repository of Bollinger Band Squeeze - Volatility Breakout

HalfTrend

by 0xRadicalEd
1 stars

The indicator overlays HalfTrend trend-following lines and ATR channel bands on the main price chart. It calculates trend reversals using high and low price channels over a user-defined amplitude, combined with Average True Range deviation channels. Directiona

Indicator v5 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of HalfTrend
1 stars

A template file of simple Pine strategy examples, led by an EMA crossover that goes long when a 10-bar EMA crosses above a 20-bar EMA and short on the reverse. Other templates in the file show ATR-based stop loss and take profit, an RSI overbought and oversold

Strategy v6 Moving averagesTrend Repaints
Updated 8 months ago · None stated GitHub repository of EMA Crossover Template
1 stars

This indicator measures trend strength with Bollinger Bands. It computes a simple moving average as basis and plots upper and lower bands using standard deviation. The region between bands fills with color. Bar color changes based on price position relative to

Indicator v5 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of Trend Strength Signals Enhanced

Mean Reversion Trading Bot

by BenjaminLettner
1 stars

This strategy executes mean-reversion trades by combining RSI momentum, Bollinger Bands volatility, dynamic ATR stops, and Exponential Moving Averages for trend filtering. It seeks entry opportunities when price reaches extreme Bollinger Band boundaries alongs

Strategy v5 Mean reversionOscillators & momentum
Updated 8 months ago · None stated GitHub repository of Mean Reversion Trading Bot
1 stars

A Pine v5 long-only strategy that switches behavior with an ADX trend reading. When ADX is above the threshold it buys on a fast EMA crossing above a slow EMA, and when ADX is below it buys on RSI under 30. It closes the long on the opposite EMA cross in trend

Strategy v5 TrendMean reversion
Updated 8 months ago · None stated GitHub repository of AU Adaptive Regime Switch
1 stars

0-DTE Momentum Continuation Pro is a Pine Script indicator that overlays labels on the price chart to mark A+ BUY, A+ SELL, B BUY and B SELL setups. It calculates EMA trend structure using fast and slow EMAs, checks momentum with close price position relative

Indicator v6 TrendOscillators & momentum
Updated 8 months ago · MIT GitHub repository of 0-DTE Momentum Continuation Pro

Backtest Example

by propuchon
1 stars

A course example strategy that buys when a fast EMA crosses above a slow EMA and then manages the trade with a percentage stop loss and take profit measured from the average entry price. Only long trades are opened; the short condition is calculated but not us

Strategy v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Backtest Example
1 stars

This indicator plots an anchored VWAP and a moving average on the price chart. The VWAP anchor can be chosen automatically or set to session, week, month, quarter, year, highest high, lowest low or highest volume bar within a lookback. Up to three standard dev

Indicator v6 Moving averagesVolume
Updated 9 months ago · MPL-2.0 GitHub repository of Anchored VWAP + Moving Average

SmaCross Strategy

by SimonLai-28198
1 stars

A long-only strategy that buys when a short simple moving average crosses above a long one and closes the position when it crosses back below. Defaults are 10 and 50 bars, both adjustable. It draws both averages and buy and sell triangles on the price chart, e

Strategy v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of SmaCross Strategy

Apex Trend & Liquidity Master (SMC)

by app-builder-sketch
1 stars

Apex Trend & Liquidity Master (SMC) is an overlay indicator that combines trend-following filters with Smart Money Concepts market structure and liquidity tools. It calculates baseline trend clouds using moving averages such as HMA, EMA, SMA, or RMA alongside

Indicator v6 SMC / ICT / price actionTrend
Updated 10 months ago · GPL-3.0 GitHub repository of Apex Trend & Liquidity Master (SMC)

This strategy automatically adapts its moving average lengths and types based on the chart's timeframe, covering scalping, intraday, and swing styles. It generates entry signals when a fast moving average crosses a slow moving average, provided price is on the

Strategy v6 TrendMoving averages
Updated 10 months ago · MIT GitHub repository of EMA / SMA Crossover + ADX + EMA100 Trend Filter
1 stars

This strategy uses a fast and a slow simple moving average with the bar's price range. In its default long-only mode it buys when price sits below the fast average, in the lower part of the bar range, while staying above the slow average, and exits when price

Strategy v6 Mean reversionMoving averages
Updated 10 months ago · None stated GitHub repository of Mean Reversion Pro Strategy

HTS NemoN Simple

by nemon82-web
1 stars

Draws two bands on the price chart, one from smoothed highs and lows over a fast length and one over a slow length, using Wilder-style moving averages. The fast length must be smaller than the slow one or the script stops with an error. Settings change the two

Indicator v6 Moving averagesTrend
Updated 10 months ago · None stated GitHub repository of HTS NemoN Simple

Combines three moving averages, MACD, RSI, a volatility length and Bollinger Bands on the price chart. Bollinger signals mark a buy when price crosses back above the lower band. Settings set the three average lengths, MACD fast, slow and signal values, RSI len

Indicator v5 Oscillators & momentumVolatility & bands
Updated 11 months ago · MIT GitHub repository of Adaptive Wave Interference Indicator with Bollinger Band Strategy
1 stars

A trend-following strategy that goes long when the fast EMA is above the slow EMA, RSI is above its threshold and the MACD histogram is positive, and goes short on the opposite conditions. An optional filter requires the close to sit beyond both EMAs. When ena

Strategy v6 TrendOscillators & momentum
Updated 11 months ago · None stated GitHub repository of Hybrid EMA+RSI+MACD Strategy
1 stars

ATR Volatility Trailing Stop plots an EMA trend moving average alongside dynamic ATR-based trailing stops on the price chart. The indicator determines trend direction from price relative to the EMA. Long trailing stop trails upward using ATR when uptrend, shor

Indicator v5 Volatility & bandsTrend
Updated 11 months ago · None stated GitHub repository of ATR Volatility Trailing Stop

SamK Indicator

by samkling
1 stars

A Pine v5 overlay that combines several chart aids for stock trading. It plots selectable moving averages on all timeframes, optional daily moving averages pulled from the daily series, 50, 100 and 200 SMAs, and pivots. Further switches add average daily range

Indicator v5 Moving averagesSupport & resistance Repaints
Updated 1 year ago · None stated GitHub repository of SamK Indicator

2 Supertrend

by ktg0413
1 stars

Calculates and plots two Supertrend lines with different sensitivity settings alongside a 200-period EMA baseline on the price chart. The fast Supertrend uses a smaller ATR multiplier to capture short-term price momentum, while the slow Supertrend uses a large

Indicator v6 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of 2 Supertrend

Strategy Version 1.2

by HypertextAssassin69
1 stars

A long strategy built on a 50-period Hull moving average crossing a 200-period EMA, with ADX strength, a short Hull slope and an optional RSI filter used to scale entry size in steps. It uses an ATR stop that tightens after a drawdown, staged profit-lock parti

Strategy v6 TrendMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of Strategy Version 1.2

Cuan Bungkus

by mamuncloud
1 stars

A long-only strategy for stocks that buys when the close is above a 5-period EMA, the short EMA is above a 20-period EMA, and volume exceeds a multiple of its 20-bar average. Position size is a set percent of initial capital. After entry it places a fixed perc

Strategy v6 Moving averagesVolume
Updated 1 year ago · None stated GitHub repository of Cuan Bungkus
1 stars

ATR Retracement EMA Signals identifies momentum setups by detecting large candle expansions relative to Average True Range, followed by brief price retracements and moving average crossovers. When price experiences a strong bar move, retracing within a configu

Indicator v5 Volatility & bandsMoving averages
Updated 1 year ago · MIT GitHub repository of ATR Retracement EMA Signals
1 stars

This strategy combines Exponential Moving Averages, the Relative Strength Index, and Average True Range with optional multi-timeframe confirmation to generate trade signals. Long trades trigger on fast EMA bullish crossovers when RSI is low, while short trades

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Demo Advanced Strategy v6

Buy 8/13/25E

by dsjrego
1 stars

A price chart overlay that plots a 9-period EMA and a Bollinger upper band and prints buy markers. A standard buy triangle appears on a confirmed green bar that closes above the EMA and above the close two bars back, provided the previous bar was not red. An e

Indicator v5 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of Buy 8/13/25E

Neural Network Buy and Sell Signals

by solskjaeralesithio
1 stars

This indicator combines a neural network signal grading engine with moving average and trading session filters directly on the price chart. It plots buy and sell signal labels based on momentum, volatility, and trend conditions evaluated across selectable cand

Indicator v6 AI / machine learningMoving averages

Reversal Signals

by turnupdigital
1 stars

An indicator on the price chart that looks for candle reversal setups over a lookback of 12 candles and requires confirmation within a few further candles, optionally backed by volume above its 20 bar average. A trend moving average, selectable as SMA, EMA, WM

Indicator v6 Candlestick patternsMoving averages
Updated 1 year ago · None stated GitHub repository of Reversal Signals

IVY Indicator

by vinodliyanage
1 stars

A chart-overlay indicator that plots a 9-period EMA and converts the absolute distance between the close and the EMA into a confidence value using a sigmoid curve with fixed fitted constants. A buy triangle appears when price is above the EMA and the value mee

Indicator v6 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of IVY Indicator

My BTC Investment Strategy

by CodingExplored
1 stars

A long-biased strategy that compares two selectable trend lines (TEMA, LSMA, EMA or SMA) and enters when the fast line crosses above the slow one while an ATR trailing level sits below price. It exits when price drops under the trailing high, when the lines cr

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of My BTC Investment Strategy

Ultimate Crypto Bot

by dextergocode
1 stars

This Pine Script strategy is designed for cryptocurrency trading on TradingView. It combines moving averages, RSI, MACD, Bollinger Bands, Stochastic oscillator and volume analysis to generate buy and sell signals. Higher time frame trend confirmation and marke

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · MPL-2.0 GitHub repository of Ultimate Crypto Bot

Trend Detector

by MarcosACH
1 stars

Trend Detector can plot up to three moving averages, each with its own type (SMA, EMA, RMA, WMA or VWMA), length, source and timeframe, defaulting to 15, 60 and 240 minutes. A table lists whether each selected average is trending up or down. An option waits fo

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

Triple SMA

by ceteongvanness
1 stars

This Pine Script v6 indicator calculates and plots three simple moving averages directly on the main price chart. It displays a 20-period short-term SMA, a 50-period medium-term SMA, and a 200-period long-term SMA using distinct line colors. The script offers

Indicator v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Triple SMA

Buy and Sell Signal Combo

by Mr-Madhuranga
1 stars

An indicator on the price chart that merges three signal sources into one buy and one sell marker. A buy appears when RSI is below 30 and MACD crosses above its signal line, when the 50 EMA crosses above the 200 EMA, or when price closes above the highest high

Indicator v5 Oscillators & momentumBreakout
Updated 1 year ago · None stated GitHub repository of Buy and Sell Signal Combo

Options MA Bollinger

by ShadowBrokersDevs
1 stars

An indicator on the price chart that draws a 20 period and a 50 period EMA together with Bollinger Bands, 20 period and 2 standard deviations by default, and fills the band area. It marks a buy triangle when the fast EMA crosses above the slow EMA or price clo

Indicator v6 Moving averagesVolatility & bands
Updated 1 year ago · MIT GitHub repository of Options MA Bollinger

Adaptive SuperTrend Strategy

by yagyesh-bobde
1 stars

The Adaptive SuperTrend Strategy is a custom trading strategy that calculates an adaptive SuperTrend value using volatility-adjusted factors. It determines high or low volatility by comparing ATR to its 100-period SMA and adjusts the SuperTrend factor accordin

Strategy v6 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Adaptive SuperTrend Strategy

FusionBell Pro

by saleh-ato
1 stars

This indicator combines four technical tools into a unified scoring system directly on the price chart. It evaluates an exponential moving average trend crossover, relative strength index levels, MACD line positioning against its signal line, and Bollinger Ban

Indicator v6 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of FusionBell Pro

Crown Club Strategy

by GigantePT
1 stars

Crown Club Strategy is an overlay indicator that plots two simple moving averages, 50 and 200 by default, together with the previous week's and yesterday's high and low. For each period it adds Fibonacci levels and a golden zone, oriented by a long or short bi

Indicator v6 Support & resistanceMoving averages Repaints
Updated 1 year ago · Custom licence GitHub repository of Crown Club Strategy
1 stars

This Pine Script indicator identifies potential trade entries for the USDJPY pair exclusively on 5-minute and 15-minute charts. It plots three Exponential Moving Averages: 9-period fast, 20-period slow, and 200-period trend filter. Signals trigger on EMA 9 cro

Indicator v6 Moving averagesVolatility & bands

MOST on RSI

by CihadCengiz
1 stars

An oscillator that applies the MOST (moving stop) trailing line to an RSI-based moving average. It plots RSI with a smoothed average and the stop line in a separate pane, with fixed 30, 50 and 70 levels. The average type can be SMA, EMA, RMA, WMA, VWMA, Bollin

Indicator v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of MOST on RSI

Adaptive Strategy

by Studentcodee
1 stars

This adaptive strategy combines multiple classic technical indicators into a unified framework to generate trading signals on the price chart. It evaluates conditions across Moving Average crossovers, Donchian channel breakouts, MACD, RSI, Bollinger Bands, Par

Strategy v6 TrendOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of Adaptive Strategy

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