Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 22)

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

JBravo Swing

by scallywag41
2 stars

JBravo Swing plots a 9-period simple moving average, a 20-period exponential moving average, and a 200-period simple moving average directly on the price chart. It evaluates price position relative to these moving averages to generate Buy, Sell, Strong Buy, an

Indicator v4 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of JBravo Swing
2 stars

This strategy enters long positions when the fast SMA of 10 periods crosses above the slow SMA of 30 periods. It calculates the trailing stop price as the position average price multiplied by one minus the trailing stop percentage divided by 100. The strategy

Strategy v5 TrendMoving averages
Updated 2 years ago · Apache-2.0 GitHub repository of Trailing Stop Strategy
2 stars

Jens Rabe Academy - Indicator 1 combines multiple trend and market condition tools directly on the main price chart. It calculates exponential moving averages (10, 21) and simple moving averages (30, 40, 50, 150, 200), identifies distribution days (D-Days) bas

Indicator v5 Moving averagesTrend Repaints
Updated 2 years ago · MIT GitHub repository of Jens Rabe Academy - Indicator 1
2 stars

This indicator plots four classic moving averages directly onto the price chart to help track short-term momentum and long-term trend direction. It calculates 8-period and 21-period exponential moving averages alongside 50-period and 200-period simple moving a

Indicator v4 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of EMA 8/21, SMA 50/200

This strategy plots SuperTrend lines on the price chart using ATR period and multiplier settings to identify trend direction and generate buy and sell signals. It integrates with Algomojo automation to automatically execute trades via API calls to supported br

Strategy v5 TrendVolatility & bands
Updated 4 years ago · MIT GitHub repository of SuperTrend Algomojo Trading Strategy with Target/Stoploss

Sandwich

by kat3samsin
2 stars

This strategy identifies sandwich patterns using RSI, ALMA, and Stochastic indicators. It plots RSI, Choppiness Index (CI), Stochastic K, and D in a separate pane. Long entries trigger when RSI is above CI, both Stochastic lines fall between CI and RSI, and K

Strategy v4 Oscillators & momentumMoving averages
Updated 5 years ago · MIT GitHub repository of Sandwich

Ichimoku Cloud

by mydcc
1 stars

This indicator plots the standard Ichimoku Kinko Hyo components directly on the price chart. It calculates the Conversion Line, Base Line, Leading Span A, Leading Span B, and Lagging Span using Donchian midpoint logic over configurable periods. The script shad

Indicator v6 TrendMoving averages
Updated 2 days ago · Custom licence GitHub repository of Ichimoku Cloud
1 stars

An overlay that computes three simple moving averages, by default lengths 30, 50 and 100, but draws only the highest and the lowest of them on each bar. The two lines form a band that can be filled with a color, so the band stays clean even when the averages c

Indicator v5 Moving averagesTrend
Updated 5 days ago · None stated GitHub repository of Moving Average High-Low Range

EMA-Volume

by engtuncay
1 stars

The EMA-Volume indicator plots two Exponential Moving Averages (EMA 50 and EMA 200 by default) directly on the main price chart to track trend directions and crossover signals. It concurrently evaluates trading volume using 30-period and 120-period moving aver

Indicator v6 Moving averagesVolume
Updated 7 days ago · None stated GitHub repository of EMA-Volume

Hash Momentum Strategy

by kanylbullen
1 stars

Calculates normalized momentum against a threshold and combines it with an exponential moving average trend filter. It triggers trades in the direction of the EMA trend when momentum surges, subject to optional session, weekend, and cooldown filters. Exits are

Strategy v6 Oscillators & momentumTrend
Updated 8 days ago · None stated GitHub repository of Hash Momentum Strategy

J 8

by moonyroy
1 stars

This strategy detects pin bars within an EMA volatility channel using custom user-defined types. It determines market direction based on price action relative to a 21-period EMA and a body-based ATR range. When a qualifying bullish or bearish pin bar prints in

Strategy v6 Candlestick patternsMoving averages
Updated 3 weeks ago · None stated GitHub repository of J 8

Kernal Cipher Strategy

by kdricha0602
1 stars

Kernal Cipher Strategy is a price-chart overlay that backtests the Kernal Cipher confirmed-bar signal engine. It enters long or short at the next bar's open when trend, regime, and oscillator filters agree, then exits on an adaptive ATR stop or an opposite sig

Strategy v6 TrendOscillators & momentum
Updated 5 weeks ago · MIT GitHub repository of Kernal Cipher Strategy

Moving Average (SMA)

by DEVfancybear
1 stars

The Moving Average (SMA) indicator calculates the simple moving average of close prices and plots it directly on the price chart. The length input sets the number of periods averaged, defaulting to 50 and ranging from 1 to 500. The lineColor input allows custo

Indicator v6 Moving averagesTrend
Updated 7 weeks ago · MIT GitHub repository of Moving Average (SMA)

TRAMA Cloud SIGIL

by dwightspitz
1 stars

A long-only strategy built on two TRAMA adaptive averages, a short one of 20 bars and a long one of 50 bars, each with its own source and optional timeframe. It buys when price crosses above the short average while that average is below the long one, or when t

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of TRAMA Cloud SIGIL

Webby RSI

by peterdmv
1 stars

The Webby RSI indicator calculates a momentum oscillator by measuring price distance to a 21 EMA in 50 ATR units. The value smooths into a 10 SMA histogram MA. It plots the absolute value as colored columns and the MA as a line in a separate pane. Inputs adjus

Indicator v6 Oscillators & momentumMoving averages
Updated 2 months ago · MPL-2.0 GitHub repository of Webby RSI

GrimmHA Strategy

by GreyssonEnterprises
1 stars

This strategy combines Heikin Ashi candlestick pattern recognition with Smoothed Moving Average (SMMA) trend filtering to generate long and short entries. It detects doji candles, three-line strikes, and engulfing patterns aligned with SMMA trends. Risk manage

Strategy v5 TrendMoving averages
Updated 3 months ago · MIT GitHub repository of GrimmHA Strategy

Fusion Cipher Strategy

by shahzaib-574
1 stars

Fusion Cipher Strategy is an overlay strategy that scores wave momentum, money flow, VWAP, RSI, Stochastic RSI, ADX, and divergence conditions before opening trades. It enters long when the composite score meets a minimum and the wave is below a pullback thres

Strategy v6 Oscillators & momentumMoving averages
Updated 3 months ago · None stated GitHub repository of Fusion Cipher Strategy

Keltner Channels

by majohnst
1 stars

This indicator calculates and plots multi-band Keltner Channels directly on the price chart. It projects a central moving average alongside four upper and four lower channel bands spaced at incremental multipliers of the selected volatility range. Users can to

Indicator v6 Volatility & bandsMoving averages
Updated 4 months ago · None stated GitHub repository of Keltner Channels

Dynamic Support Line

by rubbermetal
1 stars

Dynamic Support Line plots a composite moving average built by averaging six moving average types, then smoothing the result, with upper and lower bands set by a standard deviation multiplier. The fill turns green when price is above the mid line and red below

Indicator v6 Moving averagesVolatility & bands
Updated 4 months ago · MPL-2.0 GitHub repository of Dynamic Support Line

Trend Pullback Indicator

by Chovy-King
1 stars

An overlay that looks for pullbacks within an established trend using three EMAs (20, 60 and 144) that must be stacked in order and spread apart by an ATR multiple, with a rising or falling fast EMA and no recent crossover between the fast and middle lines. A

Indicator v6 TrendMoving averages
Updated 6 months ago · None stated GitHub repository of Trend Pullback Indicator

EMA Indicator

by Sandesh30-cloud
1 stars

Plots 50-period and 200-period Exponential Moving Averages directly on the price chart. The fast 50 EMA is drawn in orange, while the slow 200 EMA is drawn in blue to provide a simple visual reference for baseline trend analysis. The indicator has no configura

Indicator v5 TrendMoving averages
Updated 6 months ago · None stated GitHub repository of EMA Indicator

Helion Trend Weave

by Focal-QuantAI
1 stars

An indicator on the price chart that draws a ribbon of moving averages, 8 by default, starting at a fast period and spaced by a fixed step. A volatility option compares a fast and slow ATR to stretch or shrink the periods between a floor and ceiling. It shades

Indicator v6 Moving averagesTrend
Updated 6 months ago · None stated GitHub repository of Helion Trend Weave

BTC ATH Golden Cycle

by ymlee1104
1 stars

This strategy overlays technical indicators and staged dip-buying logic designed for Bitcoin market cycles. It incorporates a geometric mean indicator, multi-timeframe EMA bands, a customizable range filter, and supply and demand zones directly onto the price

Strategy v6 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of BTC ATH Golden Cycle

ORB Pullback

by Prat617
1 stars

This strategy identifies an Opening Range based on user-defined Eastern Time session parameters and waits for a breakout. Rather than chasing the initial move, it enters positions when price pulls back to retest the Opening Range boundary with volume and EMA t

Strategy v6 BreakoutMoving averages
Updated 7 months ago · MIT GitHub repository of ORB Pullback

ARC VMAlgo

by Tradehook-org
1 stars

ARC VMAlgo is an indicator that plots a histogram in a separate pane. It calculates volatility bands using a Bollinger-style SMA and standard deviation. It computes a MACD-style momentum oscillator with fast and slow EMAs. It normalizes distance to bands using

Indicator v5 Oscillators & momentumMoving averages
Updated 8 months ago · None stated GitHub repository of ARC VMAlgo

This Pine Script is a strategy that performs tactical dollar cost averaging with periodic cash top-ups. It accumulates a fixed cash amount each bar and deploys the full pile at a bullish crossover above a simple moving average, provided the date is within the

Strategy v6 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of Tactical DCA with Cash Top-up (Date Filter)
1 stars

A chart-overlay trend filter that blends a slower smoothed moving average and a faster TEMA into one baseline, smooths it again with an EMA, and builds ATR bands around it. A close above the upper band sets a long regime, a close below the lower band sets a sh

Indicator v6 TrendVolatility & bands
Updated 9 months ago · None stated GitHub repository of TwinSmooth ATR Bands
1 stars

This strategy executes trades based on VuManChu-inspired WaveTrend signals combined with a 200 EMA trend filter and multi-timeframe confirmation from H1 and H4 charts. Entries are evaluated using WaveTrend oversold conditions, RSI, MFI, and an optional ADX fil

Strategy v6 Oscillators & momentumTrend
Updated 10 months ago · None stated GitHub repository of VMC Strat M15 Ultimate (ADX + Div)
1 stars

The Heikin Ashi Trend Follow Strategy calculates smoothed Heikin Ashi candle values from open, high, low and close prices and plots them on the price chart along with a trend EMA. It signals long entries when the Heikin Ashi close crosses above the trend EMA a

Strategy v5 TrendCandlestick patterns
Updated 11 months ago · None stated GitHub repository of Heikin Ashi Trend Follow Strategy
1 stars

This strategy looks for pullbacks to a 15-period EMA. A long needs price to touch or dip under the EMA, close back above it on a sufficiently large green candle, with the EMA above a 100-period EMA and a minimum pullback percentage. Shorts mirror this. Optiona

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of NakInvest EMA Pullback Strategy

Lab-Doi-03

by theteelek
1 stars

Lab-Doi-03 is a price-chart strategy that compares a 12-period and a 26-period exponential moving average requested from the daily timeframe. While the chart time is inside the start and end dates and the fast average is above the slow average, it records an i

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Lab-Doi-03
1 stars

A long-only strategy that enters when a fast simple moving average crosses a slow one, using the cross function so either direction of crossing can trigger the entry. This version uses shorter default lengths than its sibling script. Each open position gets a

Strategy v6 Moving averages
Updated 1 year ago · None stated GitHub repository of Profit and Stop Loss Strategy

SOLETH MTPI

by Mikelkulla
1 stars

This strategy detects relative performance between Solana and Ethereum using a liquidity-weighted supertrend (LWST) derived from fast and slow weighted moving averages of liquidity times close. It plots the Tsl2 trend line in a separate pane and issues buy sig

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of SOLETH MTPI
1 stars

This strategy uses 10, 50, and 200 period EMAs on the price chart to filter for bullish and bearish trend signals with a confirmation candle. It calculates position size based on a user-set risk percentage of equity divided by the distance to a stop price deri

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Reg T Margin Stock Strategy

蜡烛图形态

by fuyuanyuan
1 stars

This overlay indicator classifies candlestick shapes using body, wick, and range sizes, then filters them with volume, RSI, MACD, and exponential moving averages. A hammer needs a long lower wick, a small bearish body, RSI below 30, and elevated prior volume.

Indicator v6 Candlestick patternsOscillators & momentum
Updated 1 year ago · None stated GitHub repository of 蜡烛图形态
1 stars

The script overlays a VWAP line on the price chart and identifies divergences between price close movements and VWAP movements. It computes VWAP using a customizable anchor period such as session or earnings, then checks for divergence over a lookback period c

Indicator v5 Moving averagesSupport & resistance
Updated 1 year ago · None stated GitHub repository of VWAP Divergence dobofulop

Candle Strategy

by zhuzp98
1 stars

This Pine Script strategy identifies candlestick patterns such as engulfing, doji, hammer and star formations on the price chart. It applies SMA trend filters with fast and slow periods to confirm direction before plotting labels for bullish and bearish signal

Strategy v5 Candlestick patternsMoving averages
Updated 1 year ago · None stated GitHub repository of Candle Strategy

Bollinger Bands - 22MA

by techteam92
1 stars

Bollinger Bands - 22MA plots custom Bollinger Bands on the main price chart using a selectable center moving average from a choice of 22 different types, including Kalman filters, Jurik, Sine, and Hull moving averages. It generates buy and sell signals based o

Indicator v4 Volatility & bandsMoving averages
Updated 1 year ago · None stated GitHub repository of Bollinger Bands - 22MA

Moving Average Exponential

by Hurairahengg
1 stars

Calculates an Exponential Moving Average (EMA) and displays visual buy and sell trend signals directly on the price chart. The indicator calculates a 125-period EMA line by default and monitors crossover conditions between price and the EMA threshold. When pri

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Moving Average Exponential
1 stars

This strategy calculates the Supertrend using ATR period and factor inputs, then plots green lines for up direction and red lines for down direction on the price chart. It signals long entries when Supertrend changes to positive and short entries when changing

Strategy v5 TrendMoving averages
Updated 2 years ago · MPL-2.0 GitHub repository of Hello World, Supertrend
1 stars

A price chart overlay that combines an SSL channel system with ATR bands around the close. It offers a baseline, a first SSL line, a continuation line and an exit line, each with a selectable moving average type such as HMA, JMA, TEMA, Kijun or McGinley. Bars

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of SSL + QQE + RSI Indicator

EMA Crosses

by krosenfeld7
1 stars

This indicator calculates and plots three exponential moving averages across both the current chart timeframe and a user-selected higher timeframe, defaulting to the daily period. It identifies trend changes and momentum shifts using higher-timeframe crossover

Indicator v4 Moving averagesTrend
Updated 3 years ago · Apache-2.0 GitHub repository of EMA Crosses

Trend Meter

by jubayernil
1 stars

Trend Meter is a multi-indicator visual tool designed to confirm market directional bias across multiple technical filters in a separate pane. It tracks three customizable Trend Meters based on MACD crossovers or RSI threshold levels, alongside two Trend Bars

Indicator v4 TrendOscillators & momentum Repaints
Updated 3 years ago · None stated GitHub repository of Trend Meter

Weinstein MAs

by rosskevin
1 stars

Weinstein MAs plots adaptive simple and volume-weighted moving averages based on Stan Weinstein's Stage Analysis framework. On weekly charts, it calculates 10, 30, and 40-period MAs, whereas on non-weekly intervals it uses 50, 150, and 200-period MAs. Both sim

Indicator v4 TrendMoving averages
Updated 5 years ago · AGPL-3.0 GitHub repository of Weinstein MAs

This indicator combines three technical tools into a single price overlay: dual Exponential Moving Averages (EMA), Parabolic SAR (PSAR), and ATR-derived stop loss levels. It calculates fast and very fast EMAs (defaults 9 and 21) using a custom EMA function, pl

Indicator v4 TrendMoving averages
Updated 6 years ago · GPL-3.0 GitHub repository of EMA-PSAR-ATR Indicators [Numchuck]

The Inverse Distance Weighted Moving Average calculates a moving average where historical prices are weighted according to their pairwise absolute distances across a user-defined lookback window. Plotted directly on the price chart, the indicator tracks trend

Indicator v6 Moving averagesTrend
Updated 12 days ago · GPL-3.0 GitHub repository of Inverse Distance Weighted Moving Average

This strategy combines Linear Regression Candles with UT Bot trailing stop signals to generate trading setups. It calculates smoothed linear regression open, high, low, and close values alongside a signal line, while computing an ATR-based trailing stop. Long

Strategy v5 TrendMoving averages
Updated 3 years ago · MIT GitHub repository of Linear Regression Candles and UT Bot 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