Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 36)

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

Cerebr Bloop

by jerryinyang
5 stars

Cerebr Bloop is a momentum oscillator calculated by applying Heikin-Ashi candle logic to a zero-centered Relative Strength Index (RSI). Displayed in a separate pane, it visualizes smoothed RSI momentum candles alongside customizable overbought and oversold thr

Indicator v4 Oscillators & momentumCandlestick patterns
Updated 2 years ago · None stated GitHub repository of Cerebr Bloop

This strategy tests a short-only trend-following system based on 50-period and 200-period exponential moving averages. It enters short when the fast EMA is below the slow EMA, the close crosses below the fast EMA within a defined lookback period, and a bearish

Strategy v4 Moving averagesTrend
Updated 3 years ago · Apache-2.0 GitHub repository of 50 EMA + 200 EMA Short Strategy (Not Good)
4 stars

This strategy overlays the price chart and switches among RSI-2 mean reversion, SuperTrend, MACD crossover, triple EMA, Bollinger Bands, or a combined multi-indicator mode. It enters from the selected signals and exits with percentage take-profit and stop-loss

Strategy v6 Oscillators & momentumMoving averages
Updated 2 days ago · None stated GitHub repository of Simpleton v0.01 KIMI - Enhanced
4 stars

This indicator calculates the Relative Strength Index alongside a smoothing moving average and multiple length tiers based on a fixed timeframe. It draws in a separate pane below the price chart, plotting tiered RSI levels and an optional multi-length average.

Indicator v6 Oscillators & momentumMoving averages
Updated 2 days ago · None stated GitHub repository of RSI multi-length fixed timeframe

Snagprofit WMA MA

by dearvn
4 stars

Snagprofit WMA MA is a multi-timeframe trend indicator overlaid on the price chart. It calculates a weighted moving average across 1-minute, 5-minute, 15-minute, and 1-hour timeframes alongside a simple moving average on the active chart. Momentum shapes signa

Indicator v5 Moving averagesTrend Repaints
Updated 4 years ago · None stated GitHub repository of Snagprofit WMA MA

Jash Test

by jash-git
3 stars

This indicator plots five exponential moving averages of lengths 3, 13, 34, 55 and 144 on the price chart. Fast lines are red and orange, slower lines are blue and purple, and a black 144-period average acts as a trend filter. It draws buy and sell labels when

Indicator v5 TrendMoving averages Repaints
Updated 4 weeks ago · None stated GitHub repository of Jash Test
3 stars

TradingView Debug Example is an overlay indicator that calculates RSI, a simple moving average, and MACD, then marks buy and sell shapes on the price chart. A buy appears when RSI is below 30 and price is above the SMA; a sell appears when RSI is above 70 and

Indicator v5 Oscillators & momentumMoving averages
Updated 7 months ago · None stated GitHub repository of TradingView Debug Example

Currency Strength Chart

by itmakesyousick
3 stars

This indicator calculates and plots the relative strength of major forex currencies and optional commodities in a separate pane. It fetches price data across configurable broker feeds to calculate relative performance over a selected resolution or lookback per

Indicator v5 Screeners & dashboardsOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Currency Strength Chart

Martingale Lab

by jayadevrana
1 stars

Martingale Lab is an educational indicator that tests position sizing models, including flat stake, martingale, and anti-martingale, on simulated trade results from an EMA crossover strategy. It logs trade returns in R-multiples using ATR-based stop losses and

Indicator v6 Moving averagesScreeners & dashboards
Updated 4 days ago · MPL-2.0 GitHub repository of Martingale Lab

Drawing Delete Halt

by pineforge-4pass
1 stars

This validation strategy monitors price crosses against a dynamic level derived from a 20-period simple moving average drawn as a line object. It enters a long position when the closing price crosses over the line level and exits when price crosses under it. A

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of Drawing Delete Halt

An overlay indicator that records the high and low of a configurable opening range, starting at a set market open hour and minute, and projects the average, sub-levels and second and third support and resistance lines from it. It also plots 9 and 21 EMAs with

Indicator v5 Sessions & timeSupport & resistance
Updated 2 weeks ago · None stated GitHub repository of OR Levels + EMA Cross Integrated

EMA-Flat

by riegodavid-git
1 stars

A separate-pane indicator that measures how flat an exponential moving average is. It takes the absolute one-bar change of the EMA and divides it by the ATR, then plots that ratio as a histogram. Bars are teal when the ratio is below a flat threshold and orang

Indicator v5 TrendVolatility & bands
Updated 4 months ago · None stated GitHub repository of EMA-Flat
1 stars

Corpus Array Stats Helpers is an experimental Pine Script strategy designed to test array manipulation and moving average functions. During the first 50 bars, the script collects close prices into an array to perform statistical calculations like sum, average,

Strategy v5 Moving averagesTrend
Updated 4 months ago · MIT GitHub repository of Corpus Array Stats Helpers

MA+SQZ+STO V1

by gabriel-klettur
1 stars

This strategy combines exponential moving averages, a Stochastic oscillator, and Squeeze Momentum calculations to identify long trade entries on the price chart. It enters long positions when the Stochastic K line crosses above D in oversold territory while pr

Strategy v5 TrendOscillators & momentum
Updated 7 months ago · None stated GitHub repository of MA+SQZ+STO V1

Double EMA Crossover

by Basant1Saini
1 stars

The Double EMA Crossover strategy plots a fast 9-period EMA and slow 21-period EMA on the price chart with a 200-period trend EMA filter. It generates long signals on golden crosses when price exceeds the trend EMA and MACD is bullish, and short signals on dea

Strategy v5 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of Double EMA Crossover
1 stars

This indicator identifies market trends and projects dynamic price targets directly on the price chart. It calculates high and low bands using simple moving averages offset by a smoothed Average True Range buffer. Bullish and bearish trend signals trigger when

Indicator v5 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of Target Trend [BigBeluga]

Kyle Algo v1

by turnupdigital
1 stars

An indicator on the price chart that draws a ribbon of fifteen EMAs of the high, from 9 to 51 bars, coloured by whether the close is above each one when the energy option is on. A Supertrend variant based on a Keltner-style channel range, scaled by a sensitivi

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Kyle Algo v1

VCopyWave

by rajatjpatel
1 stars

A smoothed moving average drawn on the price chart, a renamed copy of the SAMA script. Prices are clamped inside a narrow standard deviation channel around a short weighted average, then passed through two weighted moving averages, one with an adjustable lengt

Indicator v5 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of VCopyWave
1 stars

A Pine v4 strategy that plots a 28-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of ETHUSDT EMA Cross Strategy
947 stars

The Adaptive RSI Moving Average (ARSIMA) is an overlay indicator that dynamically adjusts its smoothing factor based on the Relative Strength Index (RSI). When the RSI moves toward extreme overbought or oversold conditions, the smoothing factor increases to ma

Indicator v4 Moving averagesOscillators & momentum
Updated 12 days ago · GPL-3.0 GitHub repository of Adaptive RSI Moving Average
257 stars

This overlay strategy is built for ES futures on the one-minute chart. It plots a volume-weighted moving average of price opens and standard-deviation bands at Fibonacci ratios, plus a second longer volume-weighted average from a higher-timeframe open. Call an

Strategy v5 Volatility & bandsMoving averages
Updated 7 weeks ago · None stated GitHub repository of ES Futures 1M No Repaint
106 stars

This strategy calculates momentum signals using MACD crossovers filtered by EMA trend filters and an optional RSI indicator. It enters long and short positions directly on the price chart using customizable percentage-based stop loss and take profit targets. T

Strategy v5 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of 5min MACD Scalp by Joel (3commas)
55 stars

Calculates swing points, dynamic support and resistance channels, and a baseline trend moving average directly on the price chart. It identifies structural highs and lows using 10-bar pivot logic, plotting colored triangles offset to confirmed swing bars. Dyna

Indicator v6 Support & resistanceTrend
Updated 6 months ago · Apache-2.0 GitHub repository of Structural Levels & Key Zones
47 stars

The Cubic Regression Moving Average calculates a fitted endpoint using a degree-three polynomial over a specified lookback period via normal equations solved by closed-form elimination. It plots the resulting trend line directly on the price chart. Users can a

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Cubic Regression Moving Average

Divergenced G003

by ruckard
13 stars

Divergenced G003 is a strategy that identifies momentum divergences based on Squeeze Momentum Indicator color transitions to trigger long and short entries. Trades are exited using Curie closing moving average lines or configurable percentage-based stop loss,

Strategy v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of Divergenced G003
8 stars

MA ATR ADX PP Strategy combines customizable moving averages with Average True Range (ATR) and Average Directional Index (ADX) filters to generate trade entries and exits on the main chart. The script supports eight moving average types, including SMA, EMA, Hu

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of MA+ATR+ADX+PP Strategy

EMA Cloud Dots

by lunarticktrading
7 stars

This indicator calculates fast and slow exponential moving averages of close prices and plots colored dots in a separate pane to show trend direction. Green dots appear when the fast EMA exceeds the slow EMA, while red dots signal the opposite. The script pull

Indicator v6 TrendMoving averages
Updated 2 weeks ago · None stated GitHub repository of EMA Cloud Dots
6 stars

This indicator classifies price action into four distinct market regimes: Trend, Expansion, Compression, or Mean Reversion. It determines states using a simplified Hurst exponent estimate, ADX slope thresholds, and realized volatility measurements. Based on th

Indicator v6 TrendVolatility & bands
Updated 2 months ago · MIT GitHub repository of Capital41 Regime Matrix v3

This indicator plots multi-timeframe Exponential Moving Averages alongside double Bollinger Bands directly on the price chart. It calculates three EMAs (short, medium, and long term) fetched from configurable higher timeframes, alongside two sets of Bollinger

Indicator v4 TrendVolatility & bands
Updated 3 years ago · Apache-2.0 GitHub repository of Bollinger Bands Squeeze / Trend + EMAs
4 stars

This strategy trades E-mini and Micro E-mini S&P 500 futures on the price chart. It enters long when a fast EMA crosses above a slow EMA during New York regular trading hours, and enters short on the opposite cross unless long-only mode is on. Each entry place

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of ES S&P500 Strategy [trugurpala]
4 stars

This strategy plots Bollinger Bands on the price chart using a simple moving average basis and a standard-deviation multiplier. Optional RSI, long-period Aroon, and EMA or SMA filters are present but stay disabled unless a password enables the PRO path. Long e

Strategy v4 Volatility & bandsOscillators & momentum

YORUKALIEFE

by Kalumur
4 stars

This indicator plots multiple exponential moving averages on weekly and monthly timeframes, including 14-period weekly EMA, 8-period monthly EMA, and 14-period monthly EMA. It also displays a Kijun line derived from the midpoint of high and low over 20 periods

Indicator v5 Moving averagesVolatility & bands
Updated 2 years ago · None stated GitHub repository of YORUKALIEFE

Snagprofit WMA MA

by dearvn
4 stars

Snagprofit WMA MA combines multi-timeframe Weighted Moving Averages (1M, 5M, 15M, and 1H) with a Simple Moving Average filter to assess trend momentum across different time horizons. It plots shape signals directly on the price chart when candle breakouts alig

Indicator v5 TrendMoving averages Repaints
Updated 4 years ago · None stated GitHub repository of Snagprofit WMA MA

P-EMA21

by gocaman
3 stars

P-EMA21 plots a 21-period exponential moving average and two smoothed moving averages, defaulting to lengths 21 and 55, on the price chart. It places long and short labels when the EMA crosses either smoothed average. Source, lengths, and a percentage threshol

Indicator v5 Moving averagesScreeners & dashboards
Updated 2 days ago · None stated GitHub repository of P-EMA21

Jash Test

by jash-git
3 stars

This indicator overlays five Fibonacci-based exponential moving averages (3, 13, 34, 55, and 144) directly on the price chart, drawing inspiration from Guppy Multiple Moving Averages and Granville rules. It triggers buy signals when the EMAs are stacked in com

Indicator v5 TrendMoving averages
Updated 4 weeks ago · None stated GitHub repository of Jash Test

Volume Price Analysis

by TamTH-Dev
2 stars

The Volume Price Analysis (VPA) indicator computes the Rate of Flow (RoF) from price and volume data using selected moving average types. It applies smoothing and signals for analysis, with normalization for subjective value levels. Plots appear in a separate

Indicator v6 VolumeMoving averages
Updated 6 weeks ago · None stated GitHub repository of Volume Price Analysis

Alpy

by avatar-lavventura
2 stars

This strategy calculates a Volume-Weighted Moving Average (VWMA) sourced from a 60-minute timeframe to generate upper and lower channel bands based on user-defined percentage offsets. It incorporates RSI and Williams Fractals logic to evaluate potential entry

Strategy v4 Moving averagesTrend Repaints
Updated 7 months ago · None stated GitHub repository of Alpy

Smart Money Breakouts strategy

by wynnforthework
2 stars

Smart Money Breakouts strategy is a price-chart overlay strategy that detects breakouts using volume-adjusted swing highs and lows. It calculates candle wicks or bodies, applies ATR-based adjustment for targets, and supports limit-order entries with coefficien

Strategy v5 SMC / ICT / price actionBreakout Repaints
Updated 1 year ago · None stated GitHub repository of Smart Money Breakouts strategy

Mini Screener

by jayadevrana
1 stars

Mini Screener is a multi-asset monitoring dashboard that displays price data and trend status for five user-selected symbols in an on-chart table. It calculates single-bar percentage price changes and checks whether each asset trades above or below an exponent

Indicator v6 Screeners & dashboardsTrend
Updated 4 days ago · MPL-2.0 GitHub repository of Mini Screener

Drawing Line Level Breakout

by pineforge-4pass
1 stars

A test strategy that draws a red horizontal line which follows a 20-period moving average by moving about a third of the distance each bar, and extends to the right. It goes long when the close crosses above that smoothed line and closes the long when the clos

Strategy v6 Moving averagesSupport & resistance
Updated 7 days ago · Apache-2.0 GitHub repository of Drawing Line Level Breakout

P Synthetic Conditional Calls

by GammaExpansion
1 stars

This indicator in Pine Script v6 calculates and plots three lines on a separate pane. It uses an input to choose between EMA or SMA of close over 10 periods for the main line. The second line applies RSI of close over 14 periods only when close exceeds open. T

Indicator v6 Moving averagesOscillators & momentum
Updated 7 days ago · MIT GitHub repository of P Synthetic Conditional Calls
1 stars

This strategy compares Bollinger Bands and Keltner Channel to detect volatility regimes. It plots the bands and their difference along with the RSI of the difference on the price chart. Entries and exits occur on transitions in the volatility state, controlled

Strategy v5 Volatility & bandsOscillators & momentum
Updated 8 days ago · None stated GitHub repository of Penguin Volatility State Strategy

An overlay indicator that captures the high and low of an opening range starting at a configurable hour and minute, then computes the range average and extension levels from it. A 9 and 21 EMA pair is plotted with triangle markers on crossovers. Toggles show o

Indicator v5 Sessions & timeSupport & resistance
Updated 2 weeks ago · None stated GitHub repository of OR Levels + EMA Cross Integrated
1 stars

This strategy plots on the price chart and stores recent closes in a float array during the first sixty bars. It enters a long position when the newest stored close is above the close ten slots earlier and the nine-period EMA crosses above the twenty-one-perio

Strategy v5 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Corpus Barstate Array Helpers

MA+STO+MA_V1

by gabriel-klettur
1 stars

This strategy combines Exponential Moving Averages (10, 55, and 200 EMAs) with a Stochastic Oscillator to execute trades. It enters long positions when the Stochastic K line crosses above D in oversold territory while price is above the 200 EMA. Short entries

Strategy v5 TrendOscillators & momentum
Updated 7 months ago · None stated GitHub repository of MA+STO+MA_V1

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