Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 41)

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

This indicator overlays four customizable moving averages alongside a Keltner Channel directly on the price chart. Users can individually configure the type (SMA, EMA, or WMA) and period length for each moving average, as well as the basis MA type for the Kelt

Indicator v5 Moving averagesVolatility & bands
Updated 4 months ago · None stated GitHub repository of Moving Average & Keltner Channel
5 stars

This indicator calculates central tendencies and intermediate channel bounds over a configurable lookback period and plots them directly on the price chart. Users can select the central basis measure from mid-range, simple moving average mean, or 50th percenti

Indicator v4 TrendSupport & resistance
Updated 8 months ago · None stated GitHub repository of Rolling Midpoints

EMA Breakout

by jerryinyang
5 stars

EMA Breakout is an indicator combining Exponential Moving Averages with higher-timeframe Keltner Channels to identify breakout market conditions. It calculates multi-timeframe EMAs and dynamic Keltner Channel boundaries using ATR, True Range, or bar width. The

Indicator v4 TrendMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of EMA Breakout

MACD_Crossover_STEPFUN

by eltonaguiar
4 stars

This strategy enters long when the MACD line crosses above its signal line and short when it crosses below. Optional filters require the histogram to exceed a threshold, price to sit on the matching side of a simple moving average, and a simplified three-bar d

Strategy v5 Oscillators & momentumMoving averages
Updated 2 days ago · None stated GitHub repository of MACD_Crossover_STEPFUN
4 stars

This strategy trades GBP/USD on the price chart. It enters long when a fast EMA crosses above a slow EMA while price stays above a trend EMA, and enters short on the opposite cross below that EMA. Signals are allowed only in the London session, 07:00 to 17:00

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

Volatility Band Indicator

by mitchell-917
4 stars

The Volatility Band Indicator calculates volatility bands around a customizable moving average basis line directly on the price chart. Users can select between SMA, EMA, RMA, or WMA basis types, alongside adjustable length and standard deviation multiplier set

Indicator v5 Volatility & bandsMoving averages
Updated 11 months ago · Custom licence GitHub repository of Volatility Band Indicator

TrendStop+boll

by gocaman
3 stars

The TrendStop+boll indicator combines a trend trailing level system with configurable Bollinger Bands directly on the price chart. It evaluates Directional Movement (+DI/-DI) and MACD, locking in an EMA or VWAP benchmark level whenever momentum and directional

Indicator v5 TrendVolatility & bands
Updated 2 days ago · None stated GitHub repository of TrendStop+boll

Jash_test

by jash-git
3 stars

This indicator plots five exponential moving averages with Fibonacci lengths on the price chart. Lengths 3 and 13 form a fast group, 34 and 55 a slow group, and 144 a trend filter. It counts how many of those averages the current and previous candle bodies cro

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

Criptom4N(r)

by IAMATOMIC001
3 stars

This indicator plots SuperTrend lines and SMA values on the price chart. It generates buy and sell signals from crossovers between close price and SuperTrend. Additional features include ATR-based stop loss and take profit levels, candlestick coloring, and swi

Indicator v5 TrendMoving averages Repaints
Updated 12 months ago · None stated GitHub repository of Criptom4N(r)

This strategy evaluates market conditions on the price chart by combining composite RSI STARC bands, an EMA and SMA crossover, VWAP standard deviation bands, and security-derived volume metrics. It enters long positions when cumulative delta, momentum breakout

Strategy v5 Oscillators & momentumMoving averages Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Version Alpha: Composite Momo + Volume + Price Strategy

Alpy Vix

by avatar-lavventura
2 stars

This strategy plots the Williams Vix Fix in a separate pane with Bollinger Bands and VWMA lines. It signals long entries when the Vix Fix color shifts from lime to gray, meets VWMA long conditions and close is lower. Short signals trigger on the opposite color

Strategy v4 Volatility & bandsOscillators & momentum Repaints
Updated 7 months ago · None stated GitHub repository of Alpy Vix

Dskyz Adaptive Futures Elite (DAFE)

by mushroom-men-Trading
2 stars

Dskyz Adaptive Futures Elite (DAFE) is an automated strategy designed for intraday trading. It generates long and short entries by pairing fast and slow moving average crossovers with candlestick pattern detection, filtered by RSI, volume, volatility, and a hi

Strategy v6 Moving averagesCandlestick patterns
Updated 9 months ago · None stated GitHub repository of Dskyz Adaptive Futures Elite (DAFE)

饥饿者~01

by wynnforthework
2 stars

This strategy overlays execution signals directly on the main price chart. It calculates entry points using a Kalman gain filter and dynamic approach percentages. Positions execute in both long and short directions, scaling out across three predefined take-pro

Strategy v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of 饥饿者~01

Yaroslav93rus

by DaniilOkrug
2 stars

This TradingView Pine Script strategy overlays two exponential moving averages (lengths 10 and 28) on the price chart along with markers for pivot highs and lows. It optionally displays support and resistance levels based on user settings. The script includes

Strategy v4 Moving averagesSupport & resistance Repaints
Updated 4 years ago · MIT GitHub repository of Yaroslav93rus

EMA Ribbon

by pineforge-4pass
1 stars

This strategy calculates three exponential moving averages with adjustable lengths for the fast, mid, and slow periods. It enters a long position when the moving averages form a bullish stack and a short position during a bearish stack, utilizing a transition

Strategy v6 TrendMoving averages
Updated 7 days ago · Apache-2.0 GitHub repository of EMA Ribbon
1 stars

The Mirror Oscillator Morindok calculates a bounded momentum oscillator in a separate chart pane. It computes dynamic price reflection levels using a moving average and high-low channels over a specified lookback window. The script normalizes the current closi

Indicator v6 Oscillators & momentumMoving averages
Updated 7 weeks ago · None stated GitHub repository of Mirror Oscillator Morindok

FUTURES-IWBADT Reference

by GreyssonEnterprises
1 stars

A reference copy of a Pine v4 indicator that reads trend from 9 and 18 period EMAs on three higher timeframes (1 hour, 4 hour and daily by default), with an option to include the chart timeframe. Colours on the price chart show when all or only some timeframes

Indicator v4 TrendMoving averages Repaints
Updated 3 months ago · MIT GitHub repository of FUTURES-IWBADT Reference
1 stars

This strategy draws on the price chart and uses a 21-period EMA of the current symbol close as a fast line and a 55-period SMA of the close price from a higher timeframe (default 60 minutes) as a slow line. Long conditions trigger on EMA crossover above the sl

Strategy v5 Moving averagesTrend
Updated 4 months ago · MIT GitHub repository of Corpus MTF Security Close
1 stars

This indicator overlays several optional trend tools on the price chart. It draws a ZigZag from a deviation setting and can plot a multi-timeframe Tillson T3, a Jurik moving average, an ALMA, and a Range Filter. Users switch each tool on or off and change leng

Indicator v6 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of Quad Trend Master & KalmanOSC

A Pine v4 overlay that plots three simple moving averages of 50, 100 and 200 periods on a chosen source. The 50 and 100 lines turn green when rising and red when falling, while the 200 line changes colour depending on whether the close is above it. An optional

Indicator v4 Moving averagesTrend
Updated 3 years ago · None stated GitHub repository of QS Institutional Moving Averages

MTM Metric EMA

by JohnsonHsiao
1 stars

This indicator plots momentum bias metrics using three exponential moving averages (EMAs) of periods 20, 60, and 180. It calculates short_bias as the difference between the fast and mid EMAs, and mid_bias as the difference between the mid and long EMAs. These

Indicator v5 Oscillators & momentumMoving averages
Updated 3 years ago · None stated GitHub repository of MTM Metric EMA
1 stars

A Pine v4 strategy that plots a 21-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of LINKBTC EMA Cross Strategy
330 stars

Improvising [Alorse] is a price-chart strategy that looks for a one-bar candle reversal filtered by a 10-period EMA, a 14-period RSI, and a rising or falling MACD. Longs require a bearish bar followed by a bullish close above the EMA, RSI below 65, and a risin

Strategy v5 Oscillators & momentumMoving averages
Updated 2 months ago · None stated GitHub repository of Improvising [Alorse]
257 stars

This is a futures trading strategy for instruments like ES. It plots an Ichimoku Cloud using Tenkan, Kijun, Senkou A, Senkou B and Chikou lines along with pivot highs and lows to mark resistance and support levels directly on the price chart. Inputs let users

Strategy v5 TrendSupport & resistance Repaints
Updated 7 weeks ago · None stated GitHub repository of Futures No Repain ES

AC- MY SCRIPT1

by hasnocool
106 stars

This strategy plots an Optimized Trend Tracker and a selectable moving-average support line on the price chart. It builds the average as SMA, EMA, WMA, TMA, VAR, WWMA, ZLEMA, or TSF, then offsets long and short stops by a percent of that average. Optional mark

Strategy v5 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of AC- MY SCRIPT1

Smoothed candles

by be-thomas
65 stars

This indicator draws smoothed candlesticks on the price chart. It applies a simple moving average of a user-set length, defaulting to nine, separately to open, high, low, and close, then plots those four values with plotcandle. Wick color is green when the raw

Indicator v5 Moving averagesCandlestick patterns
Updated 6 days ago · GPL-3.0 GitHub repository of Smoothed candles
16 stars

This strategy enters long or short when a fast exponential moving average crosses a slow one, then sizes each unit from a percentage of equity and an ATR-based initial stop. It can add positions as price moves by a multiple of ATR, up to a set unit limit, and

Strategy v6 TrendMoving averages
Updated 12 months ago · None stated GitHub repository of Seykota Alt 2: EMA Crossover

Diverlong C002

by ruckard
13 stars

Diverlong C002 is a trading strategy designed to identify entries using Squeeze Momentum Indicator divergences and execute exits based on Curie Closing Lines. Long and short signals trigger when price movements contradict Squeeze Momentum values across indicat

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Diverlong C002

Multi Timeframe MA

by suyons
7 stars

Calculates and overlays up to ten moving averages from custom timeframes directly onto the main price chart. Each moving average line allows individual configuration of its timeframe, period length, and average type, supporting Simple Moving Average (SMA), Exp

Indicator v5 Moving averagesTrend Repaints
Updated 4 months ago · None stated GitHub repository of Multi Timeframe MA

Kenny's Strategy

by jerryinyang
5 stars

Kenny's Strategy combines multiple exponential moving averages to identify trend changes and generate entry signals. It calculates short, medium, and long EMAs from a user-selected source and checks for alignment within specific zones. A long-term EMA filter r

Strategy v4 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Kenny's Strategy

RSI2 Optimized STEPFUN

by eltonaguiar
4 stars

This strategy draws on the price chart and trades a two-period RSI. It enters long when RSI crosses above the oversold level and short when RSI crosses below the overbought level. An optional SMA trend filter, volume confirmation, and cooldown can block entrie

Strategy v5 Oscillators & momentumMoving averages
Updated 2 days ago · None stated GitHub repository of RSI2 Optimized STEPFUN

Jash_test

by jash-git
3 stars

Jash_test is a price-chart overlay that plots five exponential moving averages using Fibonacci lengths: 3 and 13 as the fast pair, 34 and 55 as the slow pair, and 144 as a longer filter. It colors them red, orange, blue, purple, and black. On the current bar a

Indicator v5 TrendMoving averages
Updated 4 weeks ago · None stated GitHub repository of Jash_test
3 stars

CSW Breakout Signals plots breakout buy and sell labels on the price chart when price breaks support or resistance after a trend change. Each signal can show a numbered confirmation score built from a moving-average cross, momentum, opening-range alignment, re

Indicator v5 BreakoutTrend
Updated 5 months ago · None stated GitHub repository of CSW Breakout Signals

Version Kappa: Composite Momo + Volume + Price Strategy evaluates trend, momentum, and volume dynamics to generate trading signals on the price chart. It calculates a composite RSI wrapped in Starc Bands, tracking momentum across both current and higher timefr

Strategy v5 Oscillators & momentumVolume Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Version Kappa: Composite Momo + Volume + Price Strategy

SSL Oscillator

by TamTH-Dev
2 stars

The SSL Oscillator is a separate pane indicator that combines momentum channel calculations with Quantitative Qualitative Estimation (QQE) logic. It evaluates moving average differences, standard deviation channels, and smoothed RSI values across multiple conf

Indicator v5 Oscillators & momentumMoving averages
Updated 6 weeks ago · None stated GitHub repository of SSL Oscillator

Alpy Vix

by avatar-lavventura
2 stars

This strategy plots a Williams Vix Fix histogram in a separate pane and compares price with a volume-weighted moving average of HLC3. It buys when the histogram turns from lime to gray, price is below the VWMA by the long offset, and the close ticks down. It s

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

Simple Pullback Strategy

by Web3Degenerate
2 stars

This strategy executes long trades during pullbacks within an established uptrend, plotting moving averages, entry prices, and stop levels on the price chart. It buys when the close is above the long-term simple moving average and below the short-term moving a

Strategy v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Simple Pullback Strategy
1 stars

This mean-reversion strategy implements Larry Connors' 2-period RSI system. It enters long positions when price trades above a long-term simple moving average (default 200) and the 2-period RSI drops below 10. Optional short positions enter below the trend ave

Strategy v6 Mean reversionOscillators & momentum
Updated 4 days ago · MPL-2.0 GitHub repository of RSI-2 (Larry Connors) [JR]

ES point-value 9/21 SMA cross

by pineforge-4pass
1 stars

This strategy isolates ES futures point-value PnL scaling using a nine-period and twenty-one-period simple moving average cross. It enters one long contract when the fast average crosses above the slow average and closes that long when the fast average crosses

Strategy v6 TrendMoving averages
Updated 7 days ago · Apache-2.0 GitHub repository of ES point-value 9/21 SMA cross

FUTURES-IWBADT Trading Bot

by GreyssonEnterprises
1 stars

A Pine v4 indicator that judges trend by comparing a 9 and an 18 period EMA on three higher timeframes (1 hour, 4 hour and daily by default) and optionally the chart timeframe. Background colours show when all or most timeframes agree on direction. Settings in

Indicator v4 TrendMoving averages Repaints
Updated 3 months ago · MIT GitHub repository of FUTURES-IWBADT Trading Bot
1 stars

Corpus Switch And Strings is a multi-asset strategy that calculates the price spread between two configurable symbols on a set timeframe. It evaluates the spread using a string switch selection to compute either a 9-period Exponential Moving Average, a 9-perio

Strategy v5 Moving averagesOscillators & momentum
Updated 4 months ago · MIT GitHub repository of Corpus Switch And Strings

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