Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 56)

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

3 stars

The Jerry Buy Zone Strategy calculates standard MACD line values and applies Bollinger Bands directly to the MACD line to identify momentum breakouts. Long entries trigger when the MACD line crosses above zero while remaining above the upper Bollinger Band, or

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Jerry Buy Zone Strategy
1 stars

This strategy executes trades based on MACD line crossovers filtered by trend direction and histogram slope. Long positions open on bullish MACD crossovers when price is above the trend EMA and histogram momentum is rising. Short positions open on bearish cros

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Tn Sovereign MACD v6
47 stars

This indicator calculates the Williams Gator Oscillator derived from Bill Williams Alligator lines and plots dual histograms in a separate pane. The upper histogram displays the absolute difference between the Jaw and Teeth moving averages, while the lower his

Indicator v6 Oscillators & momentumMoving averages
Updated 8 months ago · MIT GitHub repository of Williams Gator Oscillator

Jerry MACD

by g-moe
3 stars

Jerry MACD is a momentum oscillator indicator displayed in a separate pane. It calculates a standard Moving Average Convergence Divergence line, signal line, and histogram using fast, slow, and signal lengths. The indicator features symbol-specific entry thres

Indicator v5 Oscillators & momentumMoving averages
Updated 5 months ago · None stated GitHub repository of Jerry MACD
47 stars

This indicator plots a winsorized mean moving average of the close on the price chart. Over a lookback window it sorts values, replaces the lowest and highest percentage of samples with the values at the trim boundaries, and averages the full window so outlier

Indicator v6 Moving averages
Updated 8 months ago · MIT GitHub repository of WINS: Winsorized Mean Moving Average
13 stars

Ruckard Walcrypto DoubleDonchian is a trend-following breakout strategy built on two Donchian Channels with an optional exponential moving average filter. Position entries trigger when price achieves a new high or low on the primary channel, provided the optio

Strategy v5 TrendBreakout
Updated 1 year ago · None stated GitHub repository of Ruckard Walcrypto DoubleDonchian
3 stars

This trading strategy evaluates moving average slope and concavity changes to identify trend direction and entry signals. Traders can choose between Hull, EMA, SMA, WMA, or ALMA moving averages, filtered by secondary trend EMAs for long and short positions. Si

Strategy v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of Jerry Strategy / Dashboard
1 stars

This multi-timeframe strategy combines higher-timeframe trend context with lower-timeframe execution. It evaluates macro trend direction on a higher timeframe using Exponential Moving Average crosses and a Supertrend indicator. On the lower timeframe, entry si

Strategy v6 TrendMoving averages Repaints
Updated 2 months ago · None stated GitHub repository of TN Sovereign MTF Dual-Layer v6

Buy/Sell Strat

by hasnocool
106 stars

This strategy plots a fast and a slow exponential moving average on the price chart and trades their crossovers. It enters long when the fast average crosses above the slow average, volume is above 85 percent of the prior five-bar average, and price is above t

Strategy v5 TrendMoving averages Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Buy/Sell Strat

This indicator calculates John Ehlers' Ultimate Smoother Filter, a two-pole infinite impulse response filter designed to reduce market noise while minimizing lag. It computes filter coefficients using exponential decay and trigonometric functions, then applies

Indicator v6 Moving averagesTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Ultimate Smoother Filter (USF)
3 stars

The Krypton Indicator overlays trend analysis, buy and sell zones, and sentiment tracking directly onto the price chart. It calculates a dual moving average trend filter, renders supply and demand zones, and plots a sentiment line to identify market momentum.

Indicator v5 TrendSupport & resistance Repaints
Updated 5 months ago · None stated GitHub repository of Krypton Indicator

P&P Cloud Professional

by vedkanani123
1 stars

A price-chart indicator that plots a fast and slow EMA cloud, defaulting to 9 and 21 periods, in green when bullish and red when bearish. The cloud can be locked to a chosen timeframe, with a wait-for-close option that is off by default, so locked higher-timef

Indicator v6 Moving averagesTrend Repaints
Updated 2 months ago · None stated GitHub repository of P&P Cloud Professional
1 stars

This Pine Script v6 strategy uses multi-timeframe analysis to identify intraday trends and generate trading signals. It requests higher-timeframe data for trend context via EMAs and Supertrend direction. On the local timeframe it plots EMA cross signals for lo

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Tn Sovereign MTF Intraday v6
99 stars

The Ehlers Ultimate Strength Index (USI) calculates a symmetric RSI replacement using the UltimateSmoother filter instead of Wilder's exponential smoothing. It plots the USI value in a separate pane, bounded between -1 and +1, with bullish signals above 0 and

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ehlers Ultimate Strength Index USI
106 stars

This Pine Script strategy computes buying selling volume (BV/SV) and normalized pressure volumes (BPN/SPN) in a custom timeframe. It plots a column chart of the combined metric minus in a separate pane and draws Bollinger Bands on the source for volatility ana

Strategy v5 Volatility & bandsMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Buying Selling Volume Strategy

Sergapi A005

by ruckard
13 stars

Sergapi A005 is a trend-following strategy designed for crypto pairs on intraday timeframes. It enters long positions when both ATR and EMA multi-timeframe conditions align bullishly, and enters short positions when both turn bearish. The strategy draws on the

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Sergapi A005

This indicator tilts a simple moving average by the slope between two user-chosen price and time points and plots that average, its inverse, and a horizontal midpoint. It also mirrors the average around the midpoint and draws reconstructed candles reflected th

Indicator v5 Moving averagesSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Interactive Two Points MA Symmetry

Precision Sniper

by vedkanani123
1 stars

A signal indicator on the price chart built on a 9, 21 and 55 EMA ribbon. Buy and sell signals need a minimum confluence score drawn from trend, RSI, volume and other checks, and are graded A plus, A, B or C, with C hidden by default. It plots an ATR or struct

Indicator v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Precision Sniper
1 stars

A trend strategy on the price chart. It enters long when a fast EMA crosses above a slow EMA with RSI below 60 and short on the opposite cross with RSI above 40. An optional higher-timeframe EMA filter, set to four hours by default, requires price to agree wit

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign MTF Trend

CC-Trend strategy 2

by hasnocool
106 stars

This strategy draws exponential moving averages and automatic Fibonacci retracement levels on the price chart. It opens a short when the previous close is below the upper Fibonacci extreme and the 21-period average is below the 55-period average. It closes the

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of CC-Trend strategy 2

Sergapi B002

by ruckard
13 stars

Sergapi B002 is a price-chart strategy that opens long trades when both an ATR signal and an EMA signal indicate buying, and short trades when both indicate selling. A strategy-type setting controls direction. Optional percentage or ATR stop losses, take profi

Strategy v5 Volatility & bandsMoving averages
Updated 1 year ago · None stated GitHub repository of Sergapi B002
1 stars

This strategy overlays a multi-timeframe trend system on the price chart. It reads a higher timeframe, selected in minutes, for fast and slow EMA alignment and Supertrend direction, using the prior bar. It enters long or short only when flat, after an executio

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Tn Sovereign MTF VIOP v6

This strategy generates trend-following entries using double-smoothed exponential moving averages, two Commodity Channel Index (CCI) periods, VWAP, and volume filters. Long entries require price to trade above smoothed EMAs and VWAP alongside high volume and b

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of CCI & EMA strategy by Tradeswithashish

Price Oscillator

by TWODS-CAPITAL
37 stars

This indicator plots the percentage price oscillator in a separate pane. It divides the difference between a short moving average and a longer moving average by the longer average, then multiplies by 100. Users choose the source, both lengths, and whether the

Indicator v5 Oscillators & momentumMoving averages
Updated 3 years ago · MIT GitHub repository of Price Oscillator

Sergapium A004

by ruckard
13 stars

This strategy generates long and short signals using high and low closing moving average channels combined with ATR trend filtering. It plots directly on the price chart alongside an optional moving average ribbon. Positions enter when directional criteria ali

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Sergapium A004

Quantum Trend Fusion Pro

by vedkanani123
1 stars

A separate-pane indicator that fuses a selectable moving average type (EMA, SMA, HMA, KAMA and others) into a multi-state trend cloud and a smoothed oscillator with signal line. Buy and sell labels depend on a probability score against two thresholds and an op

Indicator v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Quantum Trend Fusion Pro
106 stars

This intraday strategy enters positions based on an alignment of trend, momentum, and oscillator indicators. It triggers long entries when the Commodity Channel Index is above a positive threshold, a fast Relative Strength Index crosses above a slow RSI, price

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of CCI + EMA with RSI Cross Strategy
99 stars

This indicator calculates a second-order Elliptic lowpass filter (IIR) with defined passband ripple and stopband attenuation. It applies digital signal processing techniques to smooth price data while attempting to maintain a sharp frequency cutoff. The result

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Elliptic 2nd Order Filter
3 stars

The Limitless Trading Indicator is an overlay tool that combines multi-timeframe Exponential Moving Averages (13 and 62 EMAs) with Relative Strength Index (RSI) crossovers. It evaluates trend direction on a user-selected higher timeframe and filters entry sign

Indicator v5 TrendOscillators & momentum Repaints
Updated 5 months ago · None stated GitHub repository of Limitless Trading Indicator

Extreme Trend Reversal Points identifies potential trend reversal zones directly on the price chart using moving averages and historical range percentiles. The indicator calculates price extremes relative to historical percentile history to detect overextended

Indicator v5 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of Extreme Trend Reversal Points [HeWhoMustNotBeNamed]

Quantum Trend Matrix Pro AI

by vedkanani123
1 stars

A price-chart indicator built on a triple EMA ribbon, defaulting to 8, 21 and 55 periods, with gradient fill and a trend background. It combines EMA alignment, slope, persistence, momentum, spread and squeeze detection into a weighted 0 to 100 trend score with

Indicator v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Quantum Trend Matrix Pro AI
1 stars

TN Sovereign Optimized Trend v6 is a Pine Script v6 strategy that plots fast, slow, and macro EMAs on the price chart. It generates buy signals on fast EMA crossover above the slow EMA when price exceeds the 200 EMA macro filter, RSI exceeds 50, and volume sur

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign Optimized Trend v6

WaveTrend Advanced Smoothing is a separate-pane momentum oscillator built on the classic WaveTrend algorithm with eight selectable smoothing techniques, including SuperSmoother, T3, KAMA, and JMA. It provides three normalization scale modes: Classic, Clamp, an

Indicator v6 Oscillators & momentumMoving averages
Updated 2 days ago · MIT GitHub repository of WaveTrend Advanced Smoothing [WavesUnchained]

Recursive Kernel Trend

by vedkanani123
1 stars

A trend line on the price chart from a recursive filter that corrects a fraction of its error against price on each bar. The correction rate is scheduled by efficiency and volatility weighting, can be biased by direction, and the filter structure can be Standa

Indicator v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Recursive Kernel Trend
1 stars

This strategy identifies breakouts from session highs and lows on the price chart. It tracks the current session high and low for the configured time window in the specified timezone. Price crosses above the prior session high with an upward EMA trend confirm

Strategy v6 Sessions & timeBreakout
Updated 2 months ago · None stated GitHub repository of Tn Sovereign Session Quant v6

Filtered Stoch

by hasnocool
106 stars

Filtered Stoch is a long-only strategy that combines a Stochastic RSI oscillator with a trend filter based on the highest EMA of price highs. A bullish trend state is identified when close prices trade above the EMA filter level. The strategy enters a long pos

Strategy v5 Oscillators & momentumTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Filtered Stoch

Tn Sovereign STC v6

by raybird
1 stars

Tn Sovereign STC v6 is an overlay strategy that combines the Schaff Trend Cycle oscillator with a 200-period Exponential Moving Average trend filter. It triggers long entries when the Schaff Trend Cycle crosses above the oversold boundary during a general uptr

Strategy v6 Oscillators & momentumTrend
Updated 2 months ago · None stated GitHub repository of Tn Sovereign STC v6

Mov Avg Speed Strategy

by hasnocool
106 stars

This strategy evaluates market trend and momentum by combining moving average rate of change, Stochastic Oscillator levels, and MACD signal line directions on the main chart overlay. It calculates a directional signal from each of the three indicators and requ

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Mov Avg Speed Strategy
3 stars

Linear Regression Slope is a momentum and trend strength indicator that calculates the mathematical slope of a linear regression line using weighted and simple moving averages. It plots the resulting slope oscillator alongside a reference zero line in a separa

Indicator v5 Oscillators & momentumTrend
Updated 5 months ago · None stated GitHub repository of Linear Regression Slope

My Strategy

by hasnocool
106 stars

This overlay strategy combines a Schaff Trend Cycle, an ATR trailing stop, and a fixed 200-period simple moving average. It enters long when the cycle turns upward, the ATR bias is bullish, and price is at or above the average, and short on the opposite alignm

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of My Strategy

My strategyP

by hasnocool
106 stars

This strategy draws on the price chart and opens a long when a five-period exponential moving average crosses above a ten-period exponential moving average. It opens a short when a six-period exponential moving average crosses below an eleven-period exponentia

Strategy v5 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of My strategyP

My Script

by be-thomas
65 stars

Calculates a simple moving average with a dynamic period based on the location of recent highs and lows. It measures the relative distance of the highest high and lowest low bars within a lookback period, uses that distance to adjust the smoothing length dynam

Indicator v4 Moving averagesTrend
Updated 5 days ago · GPL-3.0 GitHub repository of My Script

Shooting Star - Bearish

by TWODS-CAPITAL
37 stars

This indicator marks a bearish shooting star on the price chart. It looks for a small real body near the low, an upper shadow at least twice the body, and no meaningful lower shadow, and it only confirms the pattern while price is in an uptrend. The trend filt

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Shooting Star - Bearish

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