Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 2)

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

Bottom Level Finder

by chris-c-thomas
14 stars

Bottom Level Finder is a support identification indicator designed to locate correction and re-entry zones directly on the price chart. It calculates horizon-adaptive Fibonacci retracements, drawdown percentage levels, moving averages, and integrated VIX volat

Indicator v6 Support & resistanceMoving averages
Updated 6 months ago · MIT GitHub repository of Bottom Level Finder

CC Test

by saket3395
13 stars

This script calculates and plots a standard Exponential Moving Average on the main price chart. It evaluates the average closing price over a configurable lookback period, which defaults to 14 bars. The calculated moving average is rendered as a blue line dire

Indicator v6 Moving averagesTrend
Updated 7 weeks ago · MIT GitHub repository of CC Test
13 stars

BitLa Microtendencias A002 is a TradingView strategy that enters long when a 10-period EMA crosses above a 120-period EMA and enters short on the opposite cross. It draws on the price chart and can limit trading to a start and stop date. Risk controls include

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of BitLa Microtendencias A002
12 stars

This indicator calculates 12-period and 26-period Exponential Moving Averages (EMAs) and plots them directly on the main price chart. It identifies bullish crossovers and bearish crossunders between the two moving averages, displaying visual buy and sell marke

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of EMA Crossover with Area Fill

AwesomeADX

by koradiyakaushal
12 stars

AwesomeADX is a Pine Script v4 strategy that combines an Awesome Oscillator, ADX directional movement, and Bollinger percent B with an optional four-length moving-average trend filter. It sizes each position as a percentage of equity and can limit trades to a

Strategy v4 Oscillators & momentumMoving averages
Updated 5 years ago · MIT GitHub repository of AwesomeADX
11 stars

This indicator framework backtests trading strategies and generates execution alerts directly from an overlay chart study. It simulates trade entries, fills, stop losses, and take-profit targets across custom or built-in rules, including moving average filters

Indicator v5 TrendMoving averages
Updated 4 years ago · MPL-2.0 GitHub repository of Backtesting-Trading Engine [PineCoders]
10 stars

The Reverse RSI Strategy is a scalping system designed for forex pairs during specific trading sessions. It combines a smoothed RSI indicator with five Exponential Moving Averages to identify mean-reversion trade opportunities. Position sizing dynamically adju

Strategy v4 Oscillators & momentumMoving averages
Updated 3 years ago · GPL-3.0 GitHub repository of Strategy - Reverse RSI
10 stars

This indicator combines SuperGuppy exponential moving average ribbons with SuperTrend pivot points in a separate pane screener. It classifies up to twenty assets as neutral, long, strong long, short, or strong short. Fast and slow EMA stacks define trend align

Indicator v4 TrendMoving averages
Updated 4 years ago · MIT GitHub repository of SuperGuppySTPPScreener
10 stars

This indicator calculates three Simple Moving Averages (SMAs) sourced from a user-defined higher timeframe resolution, defaulting to Daily. Intended for 1-hour charts, it plots all three SMAs directly on the price chart and includes built-in alerts for moving

Indicator v4 Moving averagesTrend Repaints
Updated 5 years ago · GPL-3.0 GitHub repository of Alert SMAs 1h (@tradeprophet)

Calculates adaptive arithmetic candles by blending price data with Kaufman Efficiency Ratio smoothing and a linear regression anchor. It measures trend health using a zero-to-hundred Quality Score derived from market efficiency, regression slope, and normalize

Indicator v6 TrendCandlestick patterns
Updated 2 days ago · MIT GitHub repository of Adaptive Arithmetic Candles + Quality Score [WavesUnchained]

3D MACD Bar Plot [LuxAlgo]

by MeridianAlgo
9 stars

This indicator projects a three-dimensional surface plot of multiple MACD calculations in a separate indicator pane. It calculates exponential moving averages across ranges of fast and slow periods defined by user-selected minimum, maximum, and step parameters

Indicator v6 Oscillators & momentumMoving averages
Updated 4 months ago · MIT GitHub repository of 3D MACD Bar Plot [LuxAlgo]

ADX Trend Strength - Eterna

by EternaHybridExchange
9 stars

Calculates the Average Directional Index (ADX), Directional Movement Index (DMI), and an Exponential Moving Average to trade strong directional momentum. It enters long when the DI+ line crosses above DI- while ADX exceeds a threshold and price is above the EM

Strategy v5 TrendOscillators & momentum
Updated 7 months ago · MIT GitHub repository of ADX Trend Strength - Eterna

DC Hacendado A

by crissrocca
9 stars

DC Hacendado A is an overlay indicator inspired by Market Cipher A and VuManChu Cipher A. It calculates an eight-line exponential moving average ribbon alongside WaveTrend oscillator conditions, Relative Strength Index measurements, and a custom RSI plus Money

Indicator v4 TrendOscillators & momentum
Updated 3 years ago · MPL-2.0 GitHub repository of DC Hacendado A

Calculates the Stochastic Momentum Index (SMI) Ergodic oscillator in a separate pane. Users can choose from nine different moving average types for both the SMI line and signal line calculations, including SMA, EMA, DEMA, TEMA, WMA, SSMA, LSMA, Hull, and ALMA.

Indicator v5 Oscillators & momentumMoving averages
Updated 3 years ago · MIT GitHub repository of Stochastic Momentum Index (SMI) Ergodic [andre_007]

HiLo Activator

by rodrigo-brito
9 stars

This indicator plots a HiLo Activator on the price chart. It computes a simple moving average of highs and a simple moving average of lows, each shifted by a user-set number of bars. Direction starts from whether price is below the lower average, then flips do

Indicator v4 TrendMoving averages
Updated 5 years ago · MIT GitHub repository of HiLo Activator

RePaNoCHa V4

by wocclyl
9 stars

RePaNoCHa V4 is an overlay alert indicator that plots a Tillson T3 moving average on the price chart and colors it by whether the line is rising or falling. It combines that slope with a range filter, ADX, parabolic SAR, RSI, and MACD to mark long and short si

Indicator v4 TrendOscillators & momentum
Updated 7 years ago · MIT GitHub repository of RePaNoCHa V4

MattSuite V3

by mmarbmatt
8 stars

MattSuite V3 is an overlay indicator that combines market-structure and trend tools on the price chart. It identifies bullish and bearish fair value gaps and estimates their strength, flags break of structure and change of character, and marks order blocks. It

Indicator v5 SMC / ICT / price actionVolatility & bands
Updated 1 year ago · None stated GitHub repository of MattSuite V3

RSI Crossover

by cleanmind777
8 stars

This strategy evaluates market trends using triple exponential moving averages, a Stochastic RSI oscillator, MACD, Supertrend, and average true range. It plots two EMAs and Supertrend direction directly on the price chart alongside entry shape markers. Long en

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of RSI Crossover

Calculates a custom moving average (MaMA) by modifying the source price with price momentum, acceleration, and psychological win-rate probability before applying an EMA or SMA. Plots the adjusted moving average directly on the price chart alongside optional re

Strategy v5 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of Momentum Adjusted Moving Average by DGT

BB Squeeze Breakout

by muammeryldrm42
7 stars

BB Squeeze Breakout is a volatility breakout strategy that identifies consolidation squeezes using Bollinger Band width percentile ranking. When the band width drops below its 25th percentile and price crosses above or below the bands with optional volume conf

Strategy v5 Volatility & bandsBreakout
Updated 3 months ago · MIT GitHub repository of BB Squeeze Breakout
7 stars

This indicator calculates a simple moving average over a specified lookback period using a custom summation loop. It plots the moving average directly on the price chart as a blue line. An alert condition triggers whenever the chosen source price crosses above

Indicator v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Non-Compliant Indicator
7 stars

This strategy opens a long position when the bar hour matches the opening hour, the close is above a simple moving average, and the day is not Thursday or Saturday. It closes that long when the bar hour matches the closing hour. Default inputs set the open hou

Strategy v5 Moving averagesSessions & time Repaints
Updated 1 year ago · None stated GitHub repository of Strategia Buy 20:00 - Close 00:00

Our MACD Backtesting

by benniebendiksen
7 stars

This Pine Script strategy computes a MACD indicator with customizable fast, slow, and signal EMA lengths applied to close prices. Delta is calculated as the difference between the MACD line and signal line, plotted as an overlay on the price chart. Long entrie

Strategy v5 Oscillators & momentumMoving averages
Updated 1 year ago · MIT GitHub repository of Our MACD Backtesting

ForexAlgo

by Harshil427
7 stars

ForexAlgo generates trade signals directly on the price chart using a primary leading indicator, such as the Range Filter, combined with modular confirmation filters. Traders can toggle multiple technical filters, including exponential moving average crosses,

Indicator v5 TrendOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of ForexAlgo

Combined Strategy

by Dropio12
7 stars

This strategy plots buy and sell markers on the price chart by combining a fast and slow ALMA crossover with a simple close-to-close momentum check. A long marker appears when the fast ALMA crosses above the slow ALMA and momentum is positive. A short marker a

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Combined Strategy

Optimizer v1

by QuantGeekDev
7 stars

This strategy generates long signals on the price chart using multiple technical indicators. It computes EMA 70 and 100, SMA 70, ADX with DMI, CCI, and MACD values. A long entry occurs when EMA crossover condition, SMA condition, ADX above 15, CCI above 30, an

Strategy v5 TrendOscillators & momentum
Updated 3 years ago · None stated GitHub repository of Optimizer v1

SRI Indicator ft. MSB

by kingmalitha
7 stars

This indicator overlays an all-in-one technical analysis toolkit on the price chart. It plots multiple moving averages, including standard EMAs, SMAs, and a Trend Regularity Adaptive Moving Average, alongside Bollinger Bands, Supertrend, Nadaraya-Watson envelo

Indicator v5 Moving averagesTrend Repaints
Updated 3 years ago · None stated GitHub repository of SRI Indicator ft. MSB
7 stars

This strategy plots a simple moving average basis and upper and lower Bollinger bands on the price chart, with a fill between the bands. It also calculates RSI. It opens one long trade when RSI is above 25, price is at or below the lower band, and no position

Strategy v5 Volatility & bandsOscillators & momentum
Updated 4 years ago · GPL-3.0 GitHub repository of Bollinger Bands Strategy

Philosopher

by AzureKn1ght
7 stars

Philosopher is an overlay strategy that combines Stochastic momentum calculations, Waddah Attar Explosion volatility signals, and Hull Moving Average baselines to generate trade entries. It utilizes higher-timeframe Hull Moving Averages to evaluate market tren

Strategy v4 TrendOscillators & momentum
Updated 5 years ago · MPL-2.0 GitHub repository of Philosopher

MainScript

by Swastik2000
7 stars

This strategy calculates a Volume-Weighted Average Price (VWAP) with optional standard deviation bands alongside an Exponential Moving Average (EMA) on the main price chart. It is designed to generate buy and sell conditions based on crossovers between the EMA

Strategy v4 TrendMoving averages Repaints
Updated 5 years ago · None stated GitHub repository of MainScript

Bollinger Bands

by trsdn
6 stars

This indicator plots classic Bollinger Bands on the price chart. It calculates a simple moving average of the selected source as the basis, then places upper and lower bands a chosen number of standard deviations away from that average. A translucent fill mark

Indicator v5 Volatility & bandsMoving averages
Updated 6 days ago · MIT GitHub repository of Bollinger Bands

C41 Core Strategy v2

by damianpitt
6 stars

This strategy plots an EMA or SMA on the price chart and enters long when price is above the average and both RSI and Williams %R meet the long condition, or short when price is below the average and both oscillators meet the short condition. An optional turn

Strategy v6 TrendOscillators & momentum
Updated 8 weeks ago · MIT GitHub repository of C41 Core Strategy v2

MarketMerge

by mgnyc11
6 stars

MarketMerge generates an on-chart MarketSurge-style data panel featuring CANSLIM analysis, fundamental metrics, relative strength ratings, and key technical overlays. It calculates composite ratings based on multi-timeframe relative strength against a benchmar

Indicator v6 Screeners & dashboardsMoving averages
Updated 8 months ago · MIT GitHub repository of MarketMerge
6 stars

This indicator aggregates buy and sell signals from four technical tools: Exponential Moving Averages, Bollinger Bands, Fisher Transform, and MACD. It evaluates specific price conditions and crossovers to classify market states into Strong Buy, Weak Buy, Stron

Indicator v5 Moving averagesVolatility & bands
Updated 3 years ago · None stated GitHub repository of 4 Indicator Signal Strategy

VOIDRLM

by voidrlm
6 stars

The script VOIDRLM combines multiple technical analysis tools into a single overlay indicator on the price chart. It calculates multi-timeframe pivot points, volume-weighted average price (VWAP), customizable moving averages, moving average clouds, supply and

Indicator v5 TrendMoving averages Repaints
Updated 3 years ago · None stated GitHub repository of VOIDRLM
6 stars

This indicator plots multiple types of moving averages on the price chart including SMA, EMA, ALMA, EPMA, and others. Users select the MA type and can apply the same parameters to all or each individually. Key inputs include offset, gamma, smooth, sigma, and w

Indicator v5 Moving averages
Updated 3 years ago · MIT GitHub repository of Moving Averages Refurbished

Zeroline

by sharkpunch5
6 stars

Zeroline is a trend-following strategy designed around the No Nonsense Forex (NNFX) methodology. It combines a primary trigger and confirmation system (Didi index), a secondary confirmation (Kuskus), a volume filter, and a Kaufman Adaptive Moving Average (KAMA

Strategy v4 TrendMoving averages
Updated 4 years ago · MIT GitHub repository of Zeroline

This indicator calculates the relative strength of a chart symbol relative to a benchmark index and plots the resulting line directly over the price chart. It highlights new relative strength highs, new lows, and instances where relative strength reaches a new

Indicator v4 BreakoutMoving averages
Updated 5 years ago · None stated GitHub repository of Relative Strength Line by @iArpanK

NowoIchimokuV1

by seannowotny
6 stars

This strategy overlays Ichimoku lines and a cloud on the price chart, plus a stochastic RSI and an upper band from a Hull moving average and standard deviation. It opens one long inside a date window when the cloud is green and price is above the cloud and con

Strategy v4 TrendOscillators & momentum
Updated 5 years ago · None stated GitHub repository of NowoIchimokuV1

The Xsodus Supertrend Strategy is a long-only Pine Script strategy that overlays the Supertrend indicator on the price chart to generate buy signals for long positions when the trend is up. It calculates the Supertrend line using a configurable length and mult

Strategy v6 TrendVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Xsodus Supertrend Strategy (Long Only)
5 stars

This strategy calculates a Moving Average Convergence Divergence (MACD) and signal line using 12 and 26-period simple moving averages requested from a fixed 5-minute timeframe. It enters a long position when the MACD line crosses above the signal line while th

Strategy v5 Oscillators & momentumMoving averages Repaints
Updated 2 weeks ago · MIT GitHub repository of Broken MACD Strategy
5 stars

Combines trend-following moving average entries with an astronomical cycle filter. Entries trigger on a rising EMA filter and are gated by Vedic astronomical events like eclipse windows and Vishti karana. The strategy offers two distinct exit styles: a trend m

Strategy v6 TrendMoving averages
Updated 7 weeks ago · MIT GitHub repository of ChandraQuant - Kala-Chakra Strategy

HH-LL Buy/Sell + EMA

by vinitpatil519
5 stars

This overlay indicator classifies market structure with an ATR-based ZigZag that marks higher highs, higher lows, lower highs, and lower lows. A state machine plots buy and sell labels on the confirmation bar, not on the earlier pivot, and by default waits for

Indicator v5 TrendSupport & resistance
Updated 2 months ago · None stated GitHub repository of HH-LL Buy/Sell + EMA
5 stars

This script is a simple exponential moving average crossover strategy designed as an example test script. It calculates a 14-period fast EMA and a 28-period slow EMA, plotting both lines directly on the price chart. The strategy triggers a long position entry

Strategy v6 TrendMoving averages Repaints
Updated 5 months ago · MIT GitHub repository of [SA-TEST 02] EMA Crossover

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