Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 21)

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

OTT + EMA20 分批出場策略

by skywalker0803r
42 stars

This strategy draws on the price chart and trades both directions. It enters long when a variable moving average crosses above the Optimized Trend Tracker while price is above a fast EMA, and short on the opposite cross below a slower EMA. Entries are blocked

Strategy v5 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of OTT + EMA20 分批出場策略

SMAOffsetProtectOptV1

by viktors1982
36 stars

SMAOffsetProtectOptV1 is a long-only price-chart strategy that buys when close falls below an offset SMA or EMA and either the Elliott Wave Oscillator is above its high threshold with RSI below a limit, or the oscillator is below its low threshold. It exits wh

Strategy v4 Moving averagesOscillators & momentum Repaints
Updated 2 years ago · None stated GitHub repository of SMAOffsetProtectOptV1

[Pirate] Triple EMA

by hiPirate
33 stars

The [Pirate] Triple EMA indicator plots up to three independent exponential moving averages directly on the main price chart to assist with trend identification. It calculates fast, mid, and slow EMAs using standard periods of 50, 100, and 200 by default. User

Indicator v4 Moving averagesTrend
Updated 5 years ago · Unlicense GitHub repository of [Pirate] Triple EMA
29 stars

The Supertrended RSI [AlgoAlpha] indicator plots the Relative Strength Index combined with a Supertrend overlay in a separate indicator pane. It first computes standard RSI, with an optional Hull Moving Average smoothing step, and computes a secondary moving a

Indicator v5 Oscillators & momentumTrend
Updated 11 months ago · Custom licence GitHub repository of Supertrended RSI [AlgoAlpha]

Pine v6 Feature Test

by jpantsjoha
23 stars

This indicator is a Pine Script v6 demonstration that overlays the price chart. It calculates moving averages, oscillators, Bollinger Bands, ATR, highest and lowest values, rate of change, and moving-average crossovers from a chosen price source. Inputs set SM

Indicator v6 Moving averagesOscillators & momentum
Updated 4 weeks ago · Custom licence GitHub repository of Pine v6 Feature Test

Market Monitor - 1m

by chris-c-thomas
14 stars

Market Monitor - 1m is an overlay indicator designed for multi-chart monitoring and directional bias assessment. It plots a fast, mid, and slow EMA ribbon with a fill cloud, session VWAP with standard deviation bands, and previous day key levels. It evaluates

Indicator v6 TrendMoving averages Repaints
Updated 6 months ago · MIT GitHub repository of Market Monitor - 1m

Relative Strength Index

by deepentropy
13 stars

This indicator plots the Relative Strength Index in a separate pane from smoothed up and down price changes. It draws the RSI line with horizontal bands at 70, 50 and 30, plus overbought and oversold gradient fills. Optional settings add a smoothing moving ave

Indicator v6 Oscillators & momentumMoving averages
Updated 6 months ago · MIT GitHub repository of Relative Strength Index

Crossing EMAs A

by ruckard
13 stars

Crossing EMAs A is an automated strategy that overlays directly on the price chart. Despite its title referencing exponential moving averages, the script calculates fourteen-period and twenty-eight-period simple moving averages. It enters a long position when

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Crossing EMAs A

NFI v7.2

by koradiyakaushal
12 stars

NFI v7.2 is a Pine Script adaptation of the popular NostalgiaForInfinity algorithmic trading strategy originally built for Freqtrade. It analyzes price action and exponential moving average metrics across both base and higher informative timeframes, incorporat

Strategy v4 TrendMoving averages Repaints
Updated 5 years ago · MIT GitHub repository of NFI v7.2

Nexural Fisher Pro

by JasonTeixeira
9 stars

Nexural Fisher Pro is an advanced Fisher Transform indicator that plots in a separate pane. It calculates the Fisher transform using a configurable source such as high-low average. It incorporates adaptive period based on dominant cycle, volume-weighted calcul

Indicator v6 Oscillators & momentumMoving averages
Updated 2 weeks ago · Custom licence GitHub repository of Nexural Fisher Pro

Chandelier Exit - Eterna

by EternaHybridExchange
9 stars

This strategy calculates volatility-based Chandelier Exit bands using the Average True Range and high/low extremes, paired with an optional exponential moving average trend filter. It enters long when the close crosses above the long Chandelier line while abov

Strategy v5 TrendVolatility & bands
Updated 7 months ago · MIT GitHub repository of Chandelier Exit - Eterna
8 stars

This overlay strategy combines three distinct SuperTrend levels with multiple moving averages and volume profile analytics on the main price chart. It calculates trend directions using three configurable ATR periods and multipliers alongside SMA, EMA, and HMA

Strategy v5 TrendVolatility & bands
Updated 4 years ago · None stated GitHub repository of ATR 3Lvls VP Strategy
7 stars

This strategy plots a daily VWAP, a 90-period simple moving average from the one-hour chart, and a 50-period EMA plus a 90-period SMA from the 15-minute chart on the price chart. It enters long when VWAP crosses above the one-hour average, or while VWAP remain

Strategy v5 TrendMoving averages Repaints
Updated 3 years ago · MIT GitHub repository of 1h Bullish Buy 15min Bearish Sell

Cerebr Centauri Demo

by jerryinyang
5 stars

Cerebr Centauri Demo is a multi-indicator trading strategy overlaying conditions directly on the price chart. It combines lower-timeframe and higher-timeframe inputs across moving averages, Stochastic oscillators, RSI, and MACD to generate trade signals. Trade

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Cerebr Centauri Demo

This long-only trend-following strategy plots a 20-period short EMA and a 50-period long EMA directly on the price chart. It triggers long entries when the short EMA is above the long EMA, price breaks above a recent pivot high, and specific price action condi

Strategy v4 TrendMoving averages
Updated 3 years ago · Apache-2.0 GitHub repository of 20 EMA + 50 EMA + Breakout Long Strategy (H)

Ultimate Combo v1

by DexWilder
4 stars

This overlay strategy is written for MES and ES five-minute charts. It calculates a fast and slow EMA, a 200-period trend EMA, session VWAP, RSI, ATR, and a volume moving average, and it can restrict trading to an exchange-time session. Inputs set RSI extremes

Strategy v6 TrendOscillators & momentum
Updated 3 days ago · None stated GitHub repository of Ultimate Combo v1

MACD Signal Cross

by latentwill
4 stars

This strategy evaluates EMA momentum crossovers filtered by an RSI oscillator. It enters a long position when a fast EMA crosses above a slow EMA while RSI remains above 40. Conversely, it enters a short position when the fast EMA crosses below the slow EMA wh

Strategy v5 Moving averagesOscillators & momentum
Updated 8 days ago · None stated GitHub repository of MACD Signal Cross
4 stars

Meridian Options Context plots a separate-pane directional context for liquid options underlyings. It normalizes trend from fast and slow EMAs, RTH VWAP and opening-range displacement, RSI and short-return momentum, relative volume participation, persistence,

Indicator v6 Oscillators & momentumMoving averages Repaints
Updated 7 weeks ago · MPL-2.0 GitHub repository of Meridian - Options Context
4 stars

This strategy identifies Bitcoin price trends using fast and slow EMA crossovers filtered by RSI and a 200 EMA. It plots the EMAs and entry signals on the price chart. Bullish crossovers open long positions with ATR-based stop loss and take profit. Bearish cro

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · MIT GitHub repository of Bitcoin BTC Strategy [trugurpala]
4 stars

This long-only strategy plots an asymmetric ATR channel around a rolling moving average on the price chart. It enters long when a confirmed close breaks above the upper band and exits when a confirmed close breaks below the lower band. An optional setting exit

Strategy v6 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of RMA ATR Bands (Long Only)
4 stars

This strategy demonstrates fixed-fraction position sizing based on a set percentage of account equity at risk. It calculates trade quantity dynamically using an Average True Range (ATR) stop distance. Long entries trigger when price crosses above a 50-period s

Strategy v5 Moving averagesVolatility & bands
Updated 11 months ago · Custom licence GitHub repository of Fixed-Fraction Sizing Example
4 stars

This indicator combines the Moving Average Convergence Divergence (MACD) and Stochastic RSI into a single separate pane display. It calculates the standard MACD line, signal line, and histogram alongside Stochastic RSI %K and %D oscillator curves. Extreme over

Indicator v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of Momentum Suite (MACD + StochRSI)

Improvisando [Alorse]

by Hugs-4-Bugs
4 stars

Improvisando [Alorse] is a price-chart strategy that plots three exponential moving averages and a TTM Squeeze-style oscillator. It opens a long when price is above all three averages and the oscillator is rising while still below zero. Shorts use the opposite

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Improvisando [Alorse]

EmaRainbowCandleMark

by fox-buddy
4 stars

EmaRainbowCandleMark is a price-chart overlay that calculates a stack of exponential moving averages with Fibonacci-style lengths and tests candles for hammers, shooting stars, and bullish or bearish engulfing patterns. Body-to-wick tolerances set how strict t

Indicator v4 Moving averagesCandlestick patterns
Updated 2 years ago · None stated GitHub repository of EmaRainbowCandleMark
4 stars

This indicator detects regular and hidden divergences across multiple technical oscillators, including MACD, RSI, Stochastic, CCI, Momentum, OBV, CMF, and MFI. Plotted directly on the price chart, it draws divergence connecting lines and visual labels when a m

Indicator v4 DivergenceOscillators & momentum
Updated 4 years ago · None stated GitHub repository of RSI/Stoch/BB/Divs (Brahim)

Snag - Swing Trade Long Term V3 is an overlay indicator designed to track long-term trends using three Weighted Moving Averages (13, 48, and 200 periods). It plots the WMAs directly on the price chart and evaluates crossovers between price and moving averages,

Indicator v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of Snag - Swing Trade Long Term V3

Regime HA on EMA strategy

by aofwittawat
4 stars

This overlay strategy classifies trend from a higher-timeframe Heikin Ashi close and an exponential moving average of that close. When the confirmed price is above the average it enters long and closes any short; when price is below it enters short and closes

Strategy v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of Regime HA on EMA strategy

Boll-Ort Tarama

by gocaman
3 stars

This overlay indicator plots a 200-period simple moving average labeled EMA-1, a narrow Bollinger band set with a 2.0 multiplier, and a wider band set with a 3.0 multiplier, filling the gaps between the two upper and lower lines on the price chart. It recolors

Indicator v5 Volatility & bandsMoving averages
Updated 2 days ago · None stated GitHub repository of Boll-Ort Tarama

Risk-Managed Scaffold

by jpantsjoha
3 stars

This strategy enters long when a 20-period EMA crosses above a 50-period EMA and price is above the previous closed daily close. It sizes the position from a percentage of equity and the ATR stop distance, then exits with an ATR stop and a reward-to-risk limit

Strategy v6 TrendMoving averages
Updated 4 weeks ago · Custom licence GitHub repository of Risk-Managed Scaffold

7 in 1

by g-moe
3 stars

The 7 in 1 indicator plots multiple customizable moving averages directly on the price chart to reduce indicator clutter. Traders can toggle each moving average on or off, selecting between Simple Moving Average (SMA) and Exponential Moving Average (EMA) types

Indicator v5 Moving averagesTrend
Updated 5 months ago · None stated GitHub repository of 7 in 1

This indicator calculates and plots a custom Exponential Moving Average (EMA) directly on the main price chart. It uses an initial Simple Moving Average over a user-defined period to seed the exponential calculation, applying standard alpha weighting to smooth

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Exponential Moving Average (Trend Following)
3 stars

This strategy plots long and short markers on the price chart. It builds a composite index from RSI change and a short RSI average, then requires that index, a one-minute cumulative volume delta, and a relative volatility index to agree. EMA, SMA, and VWAP rel

Strategy v5 Oscillators & momentumVolume Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Composite RVI CVD Strategy

Poison Rat v2.1 - DataCrypto Analytics

by datacrypto-analytics
3 stars

This indicator tracks multi-timeframe moving average crosses directly on the price chart. It evaluates three Running Moving Averages (RMA lengths 4, 9, and 16) fetched from a user-selected secondary timeframe alongside 100-period and 200-period Simple Moving A

Indicator v4 Moving averagesTrend Repaints
Updated 3 years ago · Apache-2.0 GitHub repository of Poison Rat v2.1 - DataCrypto Analytics

QQQ MA Accumulation v2

by yalili8521
2 stars

This intraday strategy calculates fast, mid, and slow Simple Moving Averages to confirm alignment alongside steady bar accumulation on short timeframes. It filters entries by rejecting large candle spikes and restricting execution to a defined morning session

Strategy v6 TrendMoving averages
Updated 9 days ago · None stated GitHub repository of QQQ MA Accumulation v2
2 stars

Calculates entry signals, stop loss levels, and five take-profit targets based on a 7-factor dual scoring engine. The system evaluates short-term market bias using EMA 9 and 21 crossovers, VWAP, RSI, MACD, ADX, relative volume, and multi-timeframe 5-minute RSI

Indicator v6 TrendOscillators & momentum Repaints
Updated 2 months ago · Custom licence GitHub repository of Sniper Entry/Exit with SL&TP

Custom Oscillator

by danielbodnar
2 stars

This reference script provides practical Pine Script v6 code examples for creating custom indicators. It includes a smoothed Relative Strength Index oscillator plotted with overbought and oversold background zones, a multi-timeframe moving average overlay with

Indicator v6 Oscillators & momentumMoving averages
Updated 2 months ago · MIT GitHub repository of Custom Oscillator

BOT A-SLP DEMATRON 2H

by danielvm-git
2 stars

This strategy calculates up to three Double Exponential Moving Averages (DEMA) to generate buy and sell signals based on crossover and crossunder conditions. It plots the moving average lines directly on the price chart. The indicator includes input controls f

Strategy v4 Moving averagesTrend
Updated 2 months ago · MIT GitHub repository of BOT A-SLP DEMATRON 2H

Volume

by mhs54
2 stars

This indicator displays normalized volume on a 0 to 100 relative scale within a separate indicator pane. It identifies the highest volume over a customizable lookback period and rescales volume values accordingly, maintaining visual consistency across differen

Indicator v6 VolumeMoving averages
Updated 6 months ago · None stated GitHub repository of Volume

This strategy plots a fast and a slow simple moving average on the price chart and enters long when the fast average crosses above the slow average, or short on a cross below. Longs also require ADX above a threshold, RSI below 65, ATR above a minimum, and a b

Strategy v5 TrendOscillators & momentum
Updated 8 months ago · MIT GitHub repository of Quantum Entanglement (Filtered MA Crossover)

QQE + AK Trend Combined

by realanthonyc
2 stars

This indicator combines a Qualitative Quantitative Estimation oscillator with an AK Trend line in a separate pane. It computes a smoothed Relative Strength Index and builds QQE bands using Wilder's smoothed average true range of the RSI. Additionally, it integ

Indicator v6 Oscillators & momentumTrend
Updated 11 months ago · MPL-2.0 GitHub repository of QQE + AK Trend Combined

Dual MA Crossover with Time Filter calculates a short simple moving average and a long simple moving average, plotting both on the main price chart. It identifies bullish crossovers and bearish crossunders to display Buy and Sell labels on the chart. A user-de

Indicator v5 TrendMoving averages Repaints

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