Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 44)

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

Triple_EMA_STEPFUN

by eltonaguiar
4 stars

This trend-following strategy generates long and short entries based on the alignment of three exponential moving averages and price position relative to the fastest EMA. An optional RSI momentum filter can confirm directional bias. By default, exits occur on

Strategy v5 TrendMoving averages
Updated 2 days ago · None stated GitHub repository of Triple_EMA_STEPFUN

MTF EMA [trugurpala]

by trugurpala
4 stars

This indicator plots exponential moving averages of close from the daily, weekly, and monthly timeframes on the price chart. Each series uses the same user-set length and is requested with a one-bar historical offset. Toggles show or hide the daily, weekly, an

Indicator v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of MTF EMA [trugurpala]

CSW Pro Panel

by g-moe
3 stars

CSW Pro Panel is a lower-pane momentum and trend-confirmation indicator. It builds a momentum oscillator from smoothed Heikin Ashi open, high, low, and close values and colors gradient columns by the open-close range relative to the high-low range. Optional pl

Indicator v5 Oscillators & momentumScreeners & dashboards Repaints
Updated 5 months ago · None stated GitHub repository of CSW Pro Panel

Custom Strategy with DSMA

by wynnforthework
2 stars

This strategy calculates short and long-period Deviation Scaled Moving Averages (DSMA) powered by a SuperSmoother filter to adapt to price volatility. It combines breakout bands, RSI momentum levels, and long-term EMA trend filters to signal entries. Position

Strategy v5 Moving averagesBreakout
Updated 1 year ago · None stated GitHub repository of Custom Strategy with DSMA

Simple Trend Painter

by jayadevrana
1 stars

Simple Trend Painter is an overlay indicator that colors chart candles based on their position relative to a simple moving average. Candles are painted green when closing above the moving average and red when closing below it. The script plots the SMA line on

Indicator v6 TrendMoving averages
Updated 4 days ago · MPL-2.0 GitHub repository of Simple Trend Painter
1 stars

Plots seven mirrored price lines on the price chart. Each is twice a moving average minus the close, using Fibonacci lengths from 8 to 144 and a selectable EMA, SMA or WMA type, with coloured fills between neighbouring lines that can be switched off. It also m

Indicator v6 Moving averagesVolume
Updated 7 weeks ago · None stated GitHub repository of Symmetric Fib Volume Dashboard

Volume MAs Cloud Trend

by vedkanani123
1 stars

An overlay indicator that draws a cloud around a selectable volume-based moving average, with positive and negative band multipliers setting the upper and lower edges. The signal type setting chooses how the trend is read, with the cloud as the default, and th

Indicator v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Volume MAs Cloud Trend
1 stars

This strategy draws on the price chart and combines optional long and short signals from a 9/21 EMA crossover, a breakout of the prior 20-bar high or low, RSI momentum, and a MACD histogram flip. A toggleable 200-period simple moving average allows longs only

Strategy v6 TrendOscillators & momentum Repaints
Updated 2 months ago · None stated GitHub repository of TN Asymmetric Swing Sovereign

GrimmArty

by GreyssonEnterprises
1 stars

A Pine v4 indicator that draws four smoothed moving averages (21, 50, 100 and 200) with a trend fill, marks bullish and bearish three line strike patterns with triangles, and adds large engulfing-style candle markers. It can also shade a time-zone trading sess

Indicator v4 Moving averagesCandlestick patterns
Updated 3 months ago · MIT GitHub repository of GrimmArty
1 stars

The strategy combines the Moving Average Convergence Divergence (MACD) oscillator with Bollinger Bands to generate trading signals on the main price chart. A long signal occurs when the MACD line crosses above its signal line while the closing price is above t

Strategy v5 TrendOscillators & momentum
Updated 4 months ago · MIT GitHub repository of Tuple Visual MACD BB
1 stars

The MACD Fast W Shorts Add Long strategy generates trading signals using a standard Moving Average Convergence Divergence (12, 26, 9) calculation and VWAP filtering. It enters long trades when MACD is below zero, rising, and under the signal line, or reopens a

Strategy v4 TrendOscillators & momentum
Updated 4 years ago · None stated GitHub repository of MACD Fast W Shorts Add Long

The Finite Impulse Response (FIR) Filter is a smoothed technical indicator plotted directly on the main price chart. It calculates a weighted moving average using seven configurable coefficient inputs applied to current and historical price values. The filter

Indicator v4 Moving averagesTrend
Updated 12 days ago · GPL-3.0 GitHub repository of Finite Impulse Response (FIR) Filter

Midnight VWAP

by TradersPost
228 stars

The Midnight VWAP indicator calculates and overlays two distinct Volume Weighted Average Price (VWAP) lines on the price chart based on customizable session timeframes. It tracks an overnight or pre-market session alongside regular trading hours, resetting cal

Indicator v6 Moving averagesSessions & time
Updated 3 months ago · None stated GitHub repository of Midnight VWAP

This indicator calculates and plots a Fibonacci-weighted moving average directly on the main price chart. It assigns weights based on the Fibonacci sequence, giving greater importance to recent bars while factoring in historical price points. Users can adjust

Indicator v6 Moving averagesTrend
Updated 8 months ago · MIT GitHub repository of Fibonacci Weighted Moving Average (FWMA)
5 stars

This indicator combines pivot-based support and resistance levels with multi-timeframe MACD crossovers and a higher-timeframe exponential moving average trend filter. It identifies support and resistance touches using pivot highs and lows within a user-defined

Indicator v4 Oscillators & momentumSupport & resistance Repaints
Updated 3 years ago · Apache-2.0 GitHub repository of MACD + Support / Resistance

MTF Trend Strategy

by trugurpala
4 stars

This strategy trades a chart-timeframe exponential moving average crossover only when a higher-timeframe close agrees with a higher-timeframe exponential moving average. A bullish cross opens a long and a bearish cross opens a short. Each entry places an avera

Strategy v6 TrendMoving averages Repaints
Updated 2 months ago · MIT GitHub repository of MTF Trend Strategy
2 stars

This indicator tracks macroeconomic and financial conditions to estimate recession risk across multiple market dimensions. It requests external data for the S&P 500 moving average growth rate, US 10-year minus 3-month yield curve inversion, M2 money supply tre

Indicator v6 Screeners & dashboardsMoving averages
Updated 8 months ago · None stated GitHub repository of Recession Warning Traffic Light

This price-chart strategy runs a confirmed-bar state machine that watches MACD line crosses filtered by a 200-period EMA. A lookback audit scores recent candle direction and RSI alignment against the MACD lines, and it enters long or short only when that densi

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of TN Causal Backtracking Sovereign

Grimmarty Backtest

by GreyssonEnterprises
1 stars

A Pine v4 indicator that draws four smoothed moving averages (21, 50, 100 and 200), a trend fill between a short EMA and the 200 average, and three line strike candle markers for bullish and bearish cases. It also shades a time-zone trading session and holds i

Indicator v4 Moving averagesCandlestick patterns
Updated 3 months ago · MIT GitHub repository of Grimmarty Backtest
1 stars

This strategy calculates 12-period and 26-period Exponential Moving Averages (EMA) to identify trend reversals. A custom user-defined function converts the EMA relationship into a numeric signal, outputting positive or negative values based on line positioning

Strategy v5 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Typed State Function
1 stars

Calculates a reversal confidence score combining Bollinger Band overextension, RSI exhaustion, and price distance from a exponential moving average. The strategy overlays VWAP, EMA, and Bollinger Bands directly on the price chart. Long signals trigger when pri

Strategy v5 Mean reversionOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Reversal Confidence Strategy

Multiple MA

by zhuzp98
1 stars

An indicator that draws three moving averages on the price chart: a base, a slow and a fast line, each selectable as EMA, SMA or Hull type with its own length. The slow line changes colour depending on whether price is above or below it. Labels mark when price

Indicator v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Multiple MA
1 stars

The triple exponentially average indicator computes a triple exponential moving average of the closing price to generate the Trix oscillator. It calculates the successive EMAs and derives the trix as the percentage change of ema3. The script plots the trix val

Indicator v5 Oscillators & momentumMoving averages
Updated 3 years ago · None stated GitHub repository of Triple Exponentially Average
257 stars

Plots three weighted moving averages (periods 13, 48, and 200) directly on the price chart to classify trend transitions and strength. The indicator detects early trend beginnings when the close crosses any of the moving averages, then tracks subsequent moving

Indicator v5 TrendMoving averages
Updated 7 weeks ago · None stated GitHub repository of Snag - Confirm Trend
228 stars

This strategy generates trading signals based on a selectable momentum engine, supporting MACD, RSI, Stochastic, or Rate of Change. Entries trigger on signal crosses, zero-line crosses, or threshold crosses, with an optional moving average trend filter. Risk m

Strategy v6 Oscillators & momentumTrend
Updated 3 months ago · None stated GitHub repository of Momentum Strategy Template

SMA Dynamic

by capissimo
114 stars

This indicator plots two weighted moving averages in a separate pane to track price trends with volatility-based adaptation. One moving average uses a fixed user-defined lookback period, while the second adjusts its length dynamically by comparing a 10-period

Indicator v4 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of SMA Dynamic

AI Trend Navigator

by hasnocool
106 stars

This indicator calculates a trend direction and smoothed moving average using a k-nearest neighbours (k-NN) classification algorithm directly on the main price chart. Users can select input price types, target values, neighborhood size, and smoothing periods.

Indicator v5 AI / machine learningTrend
Updated 2 years ago · GPL-3.0 GitHub repository of AI Trend Navigator

V5 Concepts Colors 00

by be-thomas
65 stars

Calculates and plots five Simple Moving Averages (SMAs) with lengths of 10, 30, 50, 70, and 90 on the main price chart. The script serves as an educational example demonstrating various syntax methods for defining color transparency in Pine Script v5, includin

Indicator v5 Moving averagesTrend
Updated 6 days ago · GPL-3.0 GitHub repository of V5 Concepts Colors 00

Coppock Curve

by TWODS-CAPITAL
37 stars

This indicator plots the Coppock Curve in a separate pane. It adds the rate of change of close over a long lookback to the rate of change over a shorter lookback, then smooths that sum with a weighted moving average. The WMA length and the long and short rate-

Indicator v5 Oscillators & momentumMoving averages
Updated 3 years ago · MIT GitHub repository of Coppock Curve

This strategy combines MACD momentum signals with support and resistance levels from pivot points and an EMA100 trend filter for long positions. It plots the 100-period EMA on the price chart and signals when price breaks above the EMA or forms bullish pivot p

Strategy v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of MACD + Support / Resistance Long Strategy

MTF VİOP Strategy

by trugurpala
4 stars

This overlay strategy combines a higher-timeframe trend filter with chart-timeframe entries. The trend timeframe, default five minutes, uses a fast and slow EMA together with Supertrend. On the chart, recommended at one minute, it looks for an entry EMA cross,

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of MTF VİOP Strategy
3 stars

CSW Sequence Candles Pro calculates 5-period EMA-smoothed Open, High, Low, and Close values to render custom sequence candlesticks directly on the main price chart. It determines trend direction by comparing the smoothed close to a 20-period EMA, dynamically c

Indicator v5 Candlestick patternsTrend
Updated 5 months ago · None stated GitHub repository of CSW Sequence Candles Pro

Premium Lux Algo

by IAMATOMIC001
3 stars

Premium Lux Algo is a multi-indicator overlay designed for price charts. It combines components including Supertrend, Parabolic SAR, pivot-based support and resistance levels, moving average bands, and range filters into a single tool. Traders can toggle speci

Indicator v5 TrendSupport & resistance
Updated 12 months ago · None stated GitHub repository of Premium Lux Algo

Market Cipher A

by TamTH-Dev
2 stars

Market Cipher A plots an exponential moving average ribbon on the price chart alongside visual trend signals. It computes eight EMAs of varying lengths to construct the ribbon, tracks daily pivot high and low levels, and calculates momentum using internal wave

Indicator v5 TrendMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of Market Cipher A

ETH 1HR

by wynnforthework
2 stars

This multi-indicator strategy generates trade signals by combining a T3 moving average, Parabolic SAR, ADX trend filter, RSI, and MACD. It executes long or short entries overlaying the price chart based on trend and momentum alignment. Exit logic features a mu

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of ETH 1HR

Candle Filters

by Web3Degenerate
2 stars

Candle Filters is an overlay indicator that marks bullish and bearish engulfing candles on the price chart. A bullish signal requires a prior down candle whose body is engulfed by the current candle near a swing low, while a bearish signal does the reverse nea

Indicator v5 Candlestick patternsMoving averages
Updated 2 years ago · None stated GitHub repository of Candle Filters

Trend Dashboard

by jayadevrana
1 stars

This indicator plots an EMA line with length 50 on the price chart to show the trend direction. It evaluates whether price sits above the EMA for three custom timeframes and displays the results as UP or DOWN labels in a table at the top right. The table color

Indicator v6 TrendMoving averages
Updated 4 days ago · MPL-2.0 GitHub repository of Trend Dashboard

LTF_p02_BOOL

by pineforge-4pass
1 stars

This strategy computes bullish flags for 1-minute bars using request.security_lower_tf on a 15-minute chart. It tallies the number of bullish sub-bars and enters a long position when the count reaches at least 9 and the 9-period EMA crosses above the 21-period

Strategy v6 TrendMoving averages
Updated 7 days ago · Apache-2.0 GitHub repository of LTF_p02_BOOL

GrimmHAbacktest

by GreyssonEnterprises
1 stars

This indicator plots four smoothed moving averages of lengths 21, 50, 100 and 200 on the price chart. It fills the area between a two-period EMA and the 200-period SMMA to highlight trend direction. It marks bullish and bearish 3-line strike patterns with arro

Indicator v4 Moving averagesCandlestick patterns
Updated 3 months ago · MIT GitHub repository of GrimmHAbacktest
1 stars

Utility State Series is an EMA crossover strategy that tracks state variables and past event prices. It calculates 12-period and 26-period exponential moving averages, plotting the close price at the most recent crossover with a color reflecting whether a bull

Strategy v5 Moving averagesTrend
Updated 4 months ago · MIT GitHub repository of Utility State Series

Gaussian Filter

by everget
947 stars

Gaussian Filter is a trend-following indicator that overlays a smoothed moving average line on the main price chart. It uses a multi-pole Gaussian filter equation derived from a specified cycle period to reduce noise with minimal lag. Users can set the filter

Indicator v4 TrendMoving averages
Updated 12 days ago · GPL-3.0 GitHub repository of Gaussian Filter
257 stars

Snag - ES 1m Strategy Candle Bar is an overlay strategy designed for 1-minute index futures charts like the S&P 500 E-mini. It plots dynamic support and resistance levels derived from pivot highs and lows alongside a custom smoothed filter line and a 3-period

Strategy v5 TrendSupport & resistance Repaints
Updated 7 weeks ago · None stated GitHub repository of Snag - ES 1m Strategy Candle Bar
228 stars

Multi-Timeframe Analysis Suite calculates trend direction and momentum conditions across five user-selected timeframes using moving averages, RSI, and Stochastic oscillators. It evaluates moving average slope and oscillator levels to compute trend alignment, m

Indicator v6 Screeners & dashboardsTrend
Updated 3 months ago · None stated GitHub repository of Multi-Timeframe Analysis Suite

ALMA/EMA Strategy

by hasnocool
106 stars

This strategy executes trades based on Exponential Moving Average (EMA) crossovers filtered by an Arnaud Legoux Moving Average (ALMA) baseline. It enters long positions when the moving averages cross while price remains above the ALMA, and enters short positio

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of ALMA/EMA Strategy
99 stars

The Bulls Bears Index (BBI) calculates a composite moving average by taking the arithmetic mean of four separate Simple Moving Averages (SMAs) with distinct lookback periods: ultra-short, short, medium, and long. Optimized for streaming efficiency using circul

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Bulls Bears Index (BBI)

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