Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 43)

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

Banmuxia MACD Divergence

by wynnforthework
2 stars

This strategy calculates a customizable MACD oscillator and histogram using either simple or exponential moving averages. It identifies pivot highs and pivot lows on the MACD histogram to detect momentum divergences against price action. Historical pivot point

Strategy v5 Oscillators & momentumDivergence
Updated 1 year ago · None stated GitHub repository of Banmuxia MACD Divergence

Signal Forge

by jayadevrana
1 stars

Signal Forge is a trend-following overlay indicator that combines an ATR trailing stop with a customizable Exponential Moving Average trend filter. It plots dynamic trailing stop lines and colors bars based on whether price action aligns with the EMA baseline.

Indicator v6 TrendVolatility & bands
Updated 4 days ago · MPL-2.0 GitHub repository of Signal Forge

HMA Crossover

by pineforge-4pass
1 stars

A moving average crossover strategy using two Hull Moving Averages. It enters long when the fast HMA crosses above the slow HMA and short when it crosses below, reversing the position each time. Both lengths are adjustable, and both lines are drawn on the pric

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of HMA Crossover

Volatility Adjusted Cloud

by vedkanani123
1 stars

An overlay indicator that draws a cloud around a VIDYA, a volatility-adaptive moving average. Cloud width comes from the standard deviation of price over a history window, with separate positive and negative multipliers for the upper and lower edges. The cloud

Indicator v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Volatility Adjusted Cloud
1 stars

A strategy that trades a 10 and 21 period EMA crossover, going long on a cross up and short on a cross down. Each entry has an ATR-based stop, 2.5 times ATR by default, and a profit target at 2.5 times the stop distance. Position size comes from a chosen risk

Strategy v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of TN Adaptive Risk Matrix

Trade Worthy

by rubbermetal
1 stars

Trade Worthy is a large multi-tool overlay indicator written in Pine v5. It shows a configurable dashboard of indicator readings, volume information and stats, with Pi moving averages on by default. Many other layers are off by default and can be switched on,

Indicator v5 Screeners & dashboardsMoving averages
Updated 4 months ago · MPL-2.0 GitHub repository of Trade Worthy

Pivot Trend RMA

by Snappni
1 stars

This strategy calculates a 10-period rolling moving average (RMA) alongside short-term pivot highs and pivot lows to identify trend alignment. It plots the RMA line directly on the price chart. Long entries trigger when price crosses the RMA while the RMA is r

Strategy v5 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Pivot Trend RMA
1 stars

This overlay strategy combines SuperTrend, ADX, OBV, MACD, directional movement, EMA, and a volatility filter to open long or short trades sized as a percent of equity. Each filter and each side can be switched off. Users set EMA lengths, DI length, volatility

Strategy v5 TrendOscillators & momentum
Updated 7 months ago · None stated GitHub repository of Percentile_SuperTrend_OBV&DI&EMA

V5 Combination by YZZ

by webcrack4
1 stars

This indicator combines multiple technical tools into a single price chart overlay, designed to optimize space and indicator limits. It features an overlay MACD visualizer with selectable calculation methods (Traditional, AS Histogram, Leader, or Source), cust

Indicator v5 TrendOscillators & momentum
Updated 9 months ago · None stated GitHub repository of V5 Combination by YZZ
1 stars

A strategy that trades from a linear regression channel combined with three moving averages (base, slow and fast). It can take long and short deals, requires a minimum channel width, and sizes orders either as a share of equity or a fixed quantity. Exits scale

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of LinReg Quick Strategy

Calculates an Elastic Volume Weighted Moving Average (EVWMA), incorporating trading volume to dynamically adjust moving average responsiveness over a specified lookback length. It plots directly on the price chart as a single moving average line. Optional colo

Indicator v4 Moving averagesVolume
Updated 12 days ago · GPL-3.0 GitHub repository of Elastic Volume Weighted Moving Average

FunctionArrayMovingAverage

by ricardosantos79
261 stars

This Pine Script v5 library provides an exported function to calculate moving averages directly over float arrays. Users can supply a sample array, set the smoothing length, choose whether to omit initial values prior to reaching the lookback window, and speci

Library v5 Moving averages
Updated 4 years ago · None stated GitHub repository of FunctionArrayMovingAverage

NQU2023-10M V1

by dearvn
257 stars

The NQU2023-10M V1 strategy calculates 3-period simple moving averages of high and low prices alongside 3-bar price action patterns to detect short-term swings and trend reversals. It enters long or short trades when price action confirms a trend change condit

Strategy v5 TrendMoving averages
Updated 7 weeks ago · None stated GitHub repository of NQU2023-10M V1
47 stars

This indicator plots an Endpoint Moving Average on the price chart. It calculates a linearly weighted average of the selected source over a lookback window, assigning the largest weight to the newest bar and smaller weights to older bars. The period input sets

Indicator v6 TrendMoving averages
Updated 8 months ago · MIT GitHub repository of Endpoint Moving Average (EPMA)

EnlargedBodies A002

by ruckard
13 stars

This strategy executes trend-following trades directly on the price chart based on consecutive expanding candle bodies filtered by the 13-period exponential moving average. When price is above the EMA13, it enters long positions after three consecutive bullish

Strategy v5 Candlestick patternsTrend
Updated 1 year ago · None stated GitHub repository of EnlargedBodies A002

MACD Breakout Strategy

by jerryinyang
5 stars

This strategy evaluates breakout and trend-continuation signals using a higher-timeframe MACD and Stochastic RSI filter. It calculates MACD fast and slow exponential moving averages alongside Stochastic RSI overbought and oversold thresholds to identify histog

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of MACD Breakout Strategy

Kijun-Sen + SSL + WAE

by krosenfeld7
5 stars

This strategy combines Kijun-Sen baseline logic, the SSL Channel indicator, and the Waddah Attar Explosion (WAE) oscillator into an integrated entry framework plotted directly on the main price chart. It triggers long entries when price is above the Kijun-Sen

Strategy v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of Kijun-Sen + SSL + WAE
4 stars

This indicator calculates the Moving Average Convergence Divergence (MACD) line, signal line, and histogram in a separate pane. It uses configurable fast, slow, and signal lengths to compute standard momentum values. The histogram is dynamically shaded with di

Indicator v6 Oscillators & momentumMoving averages
Updated 2 months ago · MIT GitHub repository of MACD Histogram [trugurpala]

Signal Forge

by jayadevrana
1 stars

Signal Forge is a multi-filtered trend-following indicator displayed on the main price chart. It calculates an ATR trailing stop line alongside a long-term EMA baseline to identify market direction. Raw signal flips are filtered through ADX chop detection, a v

Indicator v6 TrendVolatility & bands
Updated 4 days ago · MPL-2.0 GitHub repository of Signal Forge

VAMA Bands(BreakOut)+!

by ymlee1104
1 stars

This strategy trades breakouts using VAMA Bands on the price chart. It supports long and short entries with filters from VAMA, MACD, DI, ADX, OBV and optional entry limits. Positions exit on opposite trend, force close periods or flip signals. Main settings ad

Strategy v5 BreakoutMoving averages
Updated 7 months ago · None stated GitHub repository of VAMA Bands(BreakOut)+!
330 stars

This mean-reversion strategy combines multi-timeframe exponential moving averages, Bollinger Bands, and the Relative Strength Index. It generates long and optional short trade signals when price interacts with the Bollinger Bands alongside RSI threshold confir

Strategy v5 Mean reversionMoving averages
Updated 2 months ago · None stated GitHub repository of MEMA + BB + RSI [Alorse]

Snag - 100 Win

by dearvn
257 stars

This indicator plots smoothed adaptive moving averages on the price chart using T3, AMA, or Kaufman methods. It accepts various sources including standard and Heikin-Ashi versions. Main settings select the calculation type, input source, period length, and smo

Indicator v5 Moving averagesTrend
Updated 7 weeks ago · None stated GitHub repository of Snag - 100 Win

Ersinator A002

by ruckard
13 stars

Ersinator A002 is a strategy that combines moving average and KDJ momentum calculations to generate trade signals directly on the price chart. It features built-in alert formatting designed for integration with the Zignaly crypto trading platform. Position ris

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Ersinator A002

MACD x RSI Study

by jerryinyang
5 stars

This indicator combines MACD and RSI to generate pullback signals on forex pairs. It plots MACD line, signal line and histogram alongside RSI and Wave Trend oscillator. Higher-timeframe MACD provides trend bias while RSI identifies overbought and oversold zone

Indicator v4 Oscillators & momentumMoving averages
Updated 2 years ago · None stated GitHub repository of MACD x RSI Study

Kijun-Sen + SSL + WAE

by krosenfeld7
5 stars

Combines the Kijun-Sen baseline, SSL channel crossovers, and Waddah Attar Explosion momentum calculations to generate directional trade signals. The indicator plots the Kijun-Sen and SSL lines directly on the price chart. When price aligns relative to the Kiju

Indicator v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of Kijun-Sen + SSL + WAE

Super Alligator Strategy

by eltonaguiar
4 stars

This strategy plots the Alligator indicator with customizable Jaw, Teeth, and Lips lines on the price chart. It generates buy and sell signals when the close price moves beyond the Lips line by a minimum gap percentage. The strategy includes optional SMA and V

Strategy v5 TrendMoving averages
Updated 2 days ago · None stated GitHub repository of Super Alligator Strategy
4 stars

This strategy combines a standard Moving Average Convergence Divergence (MACD) crossover signal with an exponential moving average (EMA) trend filter. Long positions are entered when the MACD crosses above its signal line while price is above the trend EMA. Sh

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · MIT GitHub repository of MACD Strategy [trugurpala]

v2

by jash-git
3 stars

This indicator plots five Exponential Moving Averages (EMA 3, 13, 34, 55, and 144) on the price chart to determine market trend structure. It identifies entry confluence signals by detecting when an EMA 3 and 13 crossover coincides with a MACD crossover within

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

Alpy VIX

by avatar-lavventura
2 stars

This strategy combines the Williams Vix Fix oscillator with volume-weighted moving average (VWMA) bands to identify reversal entries. It plots the VIX Fix histogram and optional Bollinger and percentile bands in a separate pane. Long entries trigger when the o

Strategy v4 Volatility & bandsMoving averages Repaints
Updated 7 months ago · None stated GitHub repository of Alpy VIX

Signal Forge

by jayadevrana
1 stars

This indicator calculates an ATR-based trailing stop and combines it with a 200-period baseline EMA to identify trend reversals on closed candles. To eliminate false breakouts, it filters signals through an ADX chop detector, a relative volume threshold, and a

Indicator v6 TrendMoving averages
Updated 4 days ago · MPL-2.0 GitHub repository of Signal Forge

Input Source Runtime Override

by pineforge-4pass
1 stars

This strategy computes two simple moving averages on a selectable price source and plots them on the price chart. The source defaults to close but can be overridden at runtime via the input panel, for example to high. It signals long entries on fast SMA crossi

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of Input Source Runtime Override
1 stars

The strategy plots fast and slow exponential moving averages with their difference as spread on the price chart. It enters long when the spread line crosses from negative to positive and short when crossing from positive to negative. Positions stay open until

Strategy v5 Moving averagesOscillators & momentum
Updated 4 months ago · MIT GitHub repository of Tuple Return Custom Function

The Farey Sequence Weighted Moving Average calculates a smoothed trend line by weighting historical price values according to terms from a Farey sequence of a selected mathematical order. The line plots directly on the price chart and updates dynamically based

Indicator v4 Moving averagesTrend
Updated 12 days ago · GPL-3.0 GitHub repository of Farey Sequence Weighted Moving Average
330 stars

This separate-pane indicator plots a MACD line, a signal line, and a histogram whose colors show whether the histogram is rising or falling above or below zero. The oscillator and signal can each use an SMA or an EMA, and an optional marker highlights MACD and

Indicator v5 Oscillators & momentumDivergence
Updated 2 months ago · None stated GitHub repository of MTF + MACD [Alorse]
257 stars

Snag - Auto Trade Futures is an overlay indicator designed for trend tracking using weighted moving averages (WMAs). It plots 13-period, 48-period, and 200-period WMAs directly on the price chart and identifies momentum shifts when these averages cross. When f

Indicator v5 TrendMoving averages Repaints
Updated 7 weeks ago · None stated GitHub repository of Snag - Auto Trade Futures
228 stars

The Mean Reversion Strategy Template calculates a baseline mean using SMA, EMA, or VWAP alongside upper and lower deviation bands based on standard deviation, ATR, or percentage offsets. It generates long and short entries when price touches, bounces from, or

Strategy v6 Mean reversionMoving averages
Updated 3 months ago · None stated GitHub repository of Mean Reversion Strategy Template

This strategy overlays the price chart and looks for VWAP pullbacks. It goes long when a short SMA crosses above VWAP after RSI has been oversold within ten bars, and short on the opposite cross after RSI has been overbought. Optional Minervini-style moving-av

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Advanced VWAP-Momentum Pullback Trend Qualifier

FairValueGap A008

by ruckard
13 stars

FairValueGap A008 is an automated strategy template designed for integration with the Zignaly trading platform. It uses customizable moving average filters (Curie closing lines) to generate buy and sell signals directly on the main price chart. The strategy fe

Strategy v5 SMC / ICT / price actionMoving averages
Updated 1 year ago · None stated GitHub repository of FairValueGap A008

MACD x RSI Study

by jerryinyang
5 stars

This indicator calculates a multi-timeframe MACD, higher-timeframe RSI, and WaveTrend oscillator to generate trading signals. It triggers long entry shapes when higher-timeframe MACD momentum aligns with oversold RSI readings, and short entry shapes during ove

Indicator v4 Oscillators & momentumMoving averages
Updated 2 years ago · None stated GitHub repository of MACD x RSI Study
5 stars

A short-only trading strategy combining three technical indicators: Kijun-Sen, SSL Channel, and Waddah Attar Explosion (WAE). It opens short positions when price is below the Kijun-Sen baseline, the SSL Channel crosses down, and WAE signals downside momentum e

Strategy v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of Kijun-Sen + SSL + WAE Short 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