Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 49)

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

1 stars

This strategy couples a moving average crossover with external macroeconomic data imported via request.seed. It calculates a 20-period SMA on the fetched macro metric to identify Risk-On, Risk-Off, or Neutral market regimes. Long entries trigger when the 12 EM

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Macro Modeling Sovereign
947 stars

Recursive Moving Trend Average (RMTA) is an overlay indicator that calculates a recursively smoothed moving average line to track market direction. It computes a secondary recursive variable using an exponential smoothing factor derived from the user-selected

Indicator v4 TrendMoving averages
Updated 12 days ago · GPL-3.0 GitHub repository of Recursive Moving Trend Average
330 stars

This script plots three moving averages on the price chart: a fast EMA or SMA with 10 periods, a slow EMA or SMA with 20 periods, and a trend EMA or SMA with 100 periods. It signals trend changes by drawing a white cross when the fast moving average crosses ab

Indicator v4 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of 3 EMA/SMA + Cross [Alorse]
106 stars

The Automatic Moving Average strategy computes an adaptive moving average by dynamically adjusting its length based on price touches against candle wicks and bodies. It applies Exponential Moving Average smoothing to define trend direction and plots a color-co

Strategy v5 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Automatic Moving Average

Game Theory EMA Strategy

by eddiebelaval
7 stars

The Game Theory EMA Strategy combines triple Exponential Moving Averages with game theory modeling to generate trade entries on price charts. It evaluates buyer and seller momentum alongside volume weighting to compute expected utility metrics and Nash equilib

Strategy v6 TrendMoving averages
Updated 3 months ago · None stated GitHub repository of Game Theory EMA Strategy

This strategy plots three exponential moving averages on the price chart and opens long trades when those averages stack upward, price closes above the shortest average, and a smoothed stochastic RSI has K above D. It also requires a rising bullish candle on a

Strategy v4 TrendMoving averages
Updated 3 years ago · Apache-2.0 GitHub repository of Triple EMA + Stochastic Long Strategy (D)
4 stars

This strategy trades USD/JPY on the price chart. It enters long when a fast EMA crosses above a slow EMA and short when the fast EMA crosses below, but only during the Tokyo or London sessions in GMT. Each entry places an ATR-based stop loss and take profit us

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of USD/JPY Forex Strategy [trugurpala]

EFI Normalized

by g-moe
3 stars

This indicator plots a normalized Elder Force Index in a separate pane. It calculates the Elder Force Index as an EMA of the prior close price change multiplied by volume, smoothed over the input length. The result is normalized to a 0-100 scale using the high

Indicator v5 Oscillators & momentumMoving averages
Updated 5 months ago · None stated GitHub repository of EFI Normalized

The Regularized Exponential Moving Average (REMA) is a technical indicator that applies a regularization factor to the standard EMA formula to reduce lag and filter out market noise. It calculates a smoothed line using a specified length, price source, and reg

Indicator v4 Moving averagesTrend
Updated 12 days ago · GPL-3.0 GitHub repository of Regularized Exponential Moving Average

Calculates three Exponential Moving Averages (short, intermediate, long) alongside Stochastic RSI to identify short trade entries. A short position opens when the EMAs align in a downward trend, Stochastic K crosses below D, and a bearish price bar closes belo

Strategy v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of Triple EMA + Stochastic Short Strategy

This strategy generates trading signals using a dual exponential moving average cross confirmed by the Relative Strength Index. It restricts entries to specific market session hours (09:30-18:15 UTC+3) designed for Turkish VIOP index futures. Long positions en

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · MIT GitHub repository of VİOP BIST30 Alert Strategy [trugurpala]
3 stars

This strategy generates long trade entries when a short exponential moving average crosses above a long exponential moving average. It features comprehensive position management tools including an ATR-based stop loss, a maximum percentage loss threshold, a pro

Strategy v5 TrendMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of EMA Crossover ATR Strategy
1 stars

This strategy stores a rolling matrix of RSI, ATR relative to price, and rate of change, together with each bar’s close direction. It averages outcomes from historical rows inside a fixed distance and treats that score as confidence. It enters long when confid

Strategy v6 AI / machine learningOscillators & momentum
Updated 2 months ago · None stated GitHub repository of TN Matrix kNN ML Sovereign
1 stars

This educational script demonstrates how to use the switch control statement in Pine Script to select between different moving average calculation types. It calculates a 10-period moving average based on user configuration, allowing selection between Exponenti

Indicator v6 Moving averages
Updated 1 year ago · None stated GitHub repository of Switch using an expression
228 stars

TradersPost Trading Checklist is an overlay indicator that evaluates a suite of popular technical conditions for long and short trade setups. It checks session-anchored VWAP, fast and slow EMA alignments and crosses, 200 SMA, RSI overbought or oversold conditi

Indicator v6 Screeners & dashboardsTrend
Updated 3 months ago · None stated GitHub repository of TradersPost Trading Checklist
99 stars

Calculates the Derivative Oscillator by applying double exponential moving average (EMA) smoothing to a Relative Strength Index (RSI) baseline and subtracting a simple moving average (SMA) signal line. Plotted in a separate pane alongside a zero reference line

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Derivative Oscillator (DOSC)
47 stars

This indicator calculates and plots a Kaiser Window Moving Average directly on the price chart. It applies a symmetric finite impulse response filter using the Kaiser-Bessel window function, powered by a 25-term power series approximation of the modified Besse

Indicator v6 Moving averagesTrend
Updated 8 months ago · MIT GitHub repository of Kaiser Window Moving Average

VİOP Session Strategy

by trugurpala
4 stars

This strategy trades Turkish VIOP BIST 30 futures on the price chart. It opens positions when a fast exponential moving average crosses a slow one, but only while chart time falls inside the 09:30 to 18:15 UTC+3 session. Stop loss and take profit distances are

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

This strategy executes long positions based on a fast and slow exponential moving average crossover. It manages open positions using an ATR-based stop loss, an optional maximum percentage loss floor, a percentage-based profit target, and a dedicated management

Strategy v5 TrendMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of EMA Crossover ATR Strategy v2

Price Action Trading 策略

by wynnforthework
2 stars

Calculates and plots a customizable moving average alongside trailing ATR bands, forming the Profit Maximizer trend-following framework. It supports multiple moving average algorithms including EMA, ZLEMA, VAR, and TSF, alongside configurable ATR multipliers.

Strategy v4 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Price Action Trading 策略

AVWAP Strategy

by hasnocool
106 stars

This overlay strategy builds a smoothed price source from expanded candle and Heikin-Ashi inputs using AMA, T3, or Kaufman's adaptive moving average. The Kaufman path can adapt with a Jurik fractal dimension, and a Garman-Klass-Yang-Zhang volatility filter can

Strategy v5 Moving averagesVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of AVWAP Strategy
99 stars

Calculates and plots the Detrended Price Oscillator in a separate pane to identify short-term price cycles. The indicator removes longer-term trends by subtracting a historical simple moving average, displaced back by half the period plus one bar, from the cur

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Detrended Price Oscillator (DPO)

Kalman Filter (KF)

by mihakralj
47 stars

The Kalman Filter (KF) calculates a recursive state estimation to smooth price data and reduce noise on the main chart. It continuously updates state and error covariance estimates by balancing process noise against measurement noise via the Kalman gain. Users

Indicator v6 Moving averagesTrend
Updated 8 months ago · MIT GitHub repository of Kalman Filter (KF)

Ruckard AndresAristizibal Joya D003 is an automated crypto trading strategy that evaluates entry and exit signals using a combination of Trend Indicator A-V2, Supertrend, and QQE Mod, alongside customizable Curie closing moving average filters. The script exec

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Ruckard AndresAristizibal Joya D003
7 stars

This indicator plots a zero-lag EMA center line with ATR bands on the price chart. It marks bullish or bearish mode after closes stay beyond a band for a set number of bars and the center line slopes that way. Confirmed buy and sell labels appear only after th

Indicator v6 TrendMoving averages Repaints
Updated 3 months ago · None stated GitHub repository of GK Trend Ribbon SWING + PREPARE HUD
4 stars

This indicator analyzes trading volume in a separate chart pane by plotting raw volume histogram bars alongside a simple moving average of volume and On-Balance Volume (OBV). It identifies unusually high volume bars where volume exceeds the moving average mult

Indicator v6 VolumeMoving averages
Updated 2 months ago · MIT GitHub repository of Volume Analysis [trugurpala]
3 stars

This strategy overlays three Simple Moving Averages, one Exponential Moving Average, and a dynamic trailing swing line directly on the price chart. It determines market direction by tracking recent highest highs and lowest lows over a customizable swing period

Strategy v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of EMA Crossover Scott Strategy
2 stars

This strategy plots period high and low breakout bands on the price chart and trades breaks of those bands. It goes long when price closes above the upper band while that band is above a simple moving average, and short on the opposite setup. Position size is

Strategy v4 TrendBreakout
Updated 1 year ago · None stated GitHub repository of Trend #1 - ATR+Breakout high/low

P_syn_enum

by GammaExpansion
1 stars

This indicator serves as a simple demonstration and test fixture for Pine Script v6 custom enum structures. It allows users to select a moving average type—Simple (SMA), Exponential (EMA), or Weighted (WMA)—from an enum drop-down menu alongside a configurable

Indicator v6 Moving averages
Updated 7 days ago · MIT GitHub repository of P_syn_enum
1 stars

This strategy calculates a composite rating from a TechnicalRating library using moving averages and oscillators. It plots signals directly on the price chart. The ratingSignal setting selects which components to base the signal on: MAs, Oscillators, or All. W

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Technical Ratings Strategy

This indicator plots trade entry and exit signals on the price chart by combining Bollinger Bands with optional filter conditions. It calculates standard Bollinger Bands along with RSI, Aroon, and moving average filters. Reversal signals trigger when price bre

Indicator v4 Volatility & bandsOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Bollinger Bands Winner IND [Alorse]

This long-only strategy trades intra-range mean reversion using standard or augmented Bollinger Bands overlayed on the main price chart. It triggers long entries when price dips below the lower band, provided the band spread stays within a defined threshold. E

Strategy v5 Volatility & bandsMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of B.Bands | Augmented | Intra-range | Long-Only

This strategy executes trades based on price crosses over dynamic swing breakout levels filtered by a baseline moving average. It plots three simple moving averages and an exponential moving average directly on the price chart alongside buy and sell arrows. Lo

Strategy v5 Moving averagesTrend
Updated 5 months ago · None stated GitHub repository of EMA Crossover Scott Strategy v2

Trend #4 - ATR+EMA channel

by wynnforthework
2 stars

Trend #4 - ATR+EMA channel is a strategy that plots ATR bands, a blue Keltner-style channel, and a red EMA on the price chart. It generates long entries when price crosses above the blue channel and red EMA with zero position, using position sizing based on st

Strategy v4 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Trend #4 - ATR+EMA channel

Multiple Moving Averages

by Web3Degenerate
2 stars

Plots up to five configurable moving averages directly on the price chart. Users can individually select the period and calculation type for each line from EMA, SMA, HMA, WMA, DEMA, VWMA, or VWAP. A master setting enables overriding all moving average types at

Indicator v5 Moving averagesTrend
Updated 2 years ago · None stated GitHub repository of Multiple Moving Averages

P_syn_functions

by GammaExpansion
1 stars

This Pine Script v6 indicator defines helper functions for value transformation and calculation. It includes double which multiplies by two, add which sums values with optional second argument, clamp which bounds a value between low and high, smooth which appl

Indicator v6 Moving averages
Updated 7 days ago · MIT GitHub repository of P_syn_functions
114 stars

This overlay indicator combines a Delta-RSI oscillator with three exponential moving averages on the price chart. It fits RSI with a polynomial over a rolling window, then marks buy and sell labels when the chosen condition occurs: zero crossing, signal-line c

Indicator v4 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of Delta-RSI & 3-EMA Strategy
47 stars

This indicator calculates and plots a standard Keltner Channel directly on the price chart. It generates an exponential moving average middle line alongside upper and lower bands spaced by an Average True Range multiplier. The implementation features warm-up c

Indicator v6 Volatility & bandsMoving averages
Updated 8 months ago · MIT GitHub repository of Keltner Channel (KCHANNEL)

GT EMA

by eddiebelaval
7 stars

This strategy uses two EMAs with a trend filter to generate crossover signals on the price chart. It applies game theory validation through Nash equilibrium detection and expected utility calculations based on RSI and volume. Trades enter on confirmed crossove

Strategy v6 TrendOscillators & momentum Repaints
Updated 3 months ago · None stated GitHub repository of GT EMA
3 stars

This indicator identifies price action reversal setups by combining candlestick patterns with Exponential Moving Average (EMA) trend filters. It calculates two customizable EMAs (default 10 and 20 periods) and fills the area between them to form an EMA cloud.

Indicator v5 Candlestick patternsMoving averages
Updated 5 months ago · None stated GitHub repository of Engulfing Patterns

USI Flip + REV-BUY

by skipp-dev
1 stars

This overlay indicator combines a six-line zero-lag RSI stack with EMA trend filters and smart-money structure checks. It marks USI flip long and short signals when the RSI lines stack, optional volume and bar-close filters pass, and optional stack or slow-tre

Indicator v6 Oscillators & momentumMoving averages Repaints
Updated 4 days ago · None stated GitHub repository of USI Flip + REV-BUY
947 stars

The Spencer 15-Point Moving Average is a technical indicator that applies Spencer's 15-point smoothing algorithm to financial price data. It calculates a weighted average across 15 historical periods using predefined symmetric weights designed to smooth noise

Indicator v4 Moving averagesTrend
Updated 12 days ago · GPL-3.0 GitHub repository of Spencer 15-Point Moving Average

Backtester v5

by hasnocool
106 stars

This strategy plots a 50-period and a 200-period simple moving average on the price chart and trades their crosses. It opens a long when the fast average crosses above the slow average and closes that long on the opposite cross; shorts use the reverse crosses.

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Backtester v5

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