Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 18)

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

Jinni v1

by Hurairahengg
1 stars

Jinni v1 is an overlay indicator that highlights the Sydney trading session and plots buy or sell signals based on dual exponential moving average trends. It draws a dynamic box around the Sydney session price range and applies time filters to exclude Fridays

Indicator v5 Sessions & timeMoving averages
Updated 2 years ago · None stated GitHub repository of Jinni v1

algo-trade-forex

by akash-yellgetti
1 stars

A strategy-type script that draws on the price chart and combines two ideas. Pivot-based support and resistance lines are plotted from left and right bar counts, with breakout labels when price crosses a level on rising volume, and alerts for broken support or

Strategy v5 Support & resistanceBreakout
Updated 2 years ago · None stated GitHub repository of algo-trade-forex

ARI-DPO 2.0

by alessioricco
1 stars

This indicator calculates the Detrended Price Oscillator (DPO) and applies Hull Moving Average (HMA) and Exponential Moving Average (EMA) smoothing to it. It also evaluates Relative Strength Index (RSI) levels. The script determines market state by comparing t

Indicator v4 Oscillators & momentumMoving averages
Updated 2 years ago · Apache-2.0 GitHub repository of ARI-DPO 2.0

Stx Ma-Trend Finder

by arrabyte
1 stars

Plots one moving average on the price chart and colours it by slope strength. The average type can be SMA, EMA, HMA, RMA, WMA, SWMA, VWMA or TEMA, with adjustable length and source. The slope of each bar is compared with the largest slope seen so far; when it

Indicator v5 TrendMoving averages
Updated 3 years ago · None stated GitHub repository of Stx Ma-Trend Finder

Bull Market Support Band

by krosenfeld7
1 stars

The Bull Market Support Band indicator overlays a higher-timeframe exponential moving average and simple moving average onto the price chart to visualize dynamic support or resistance zones. It calculates both moving averages using a user-defined timeframe res

Indicator v4 TrendMoving averages
Updated 3 years ago · Apache-2.0 GitHub repository of Bull Market Support Band

BTC Futures Daily Bias

by 0xfffangel
1 stars

An overlay meant for the daily chart that gives a long, short or neutral bias for Bitcoin. It takes daily prices from a chosen source such as CME futures, an index feed or Binance, then compares two EMAs (8 and 21 by default) with an 80-period Hull moving aver

Indicator v4 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of BTC Futures Daily Bias

micayael EMAs

by micayael
1 stars

An overlay that plots a selection of exponential moving averages: a main pair at 10 and 55 drawn as circles, and an optional set at 7, 21, 30, 50, 100 and 200. Optional extras are an ADX-based movement strength display with a key level, a pullback display, and

Indicator v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of micayael EMAs

EMA Crossover Strategy

by rocketbrainsurgeon
1 stars

This strategy trades the crossover of two exponential moving averages of the bar midpoint, where the slow length is a chosen multiple of the fast length. It goes long when the fast line crosses above the slow line and short on the opposite cross, or only long

Strategy v4 Moving averagesTrend
Updated 5 years ago · GPL-3.0 GitHub repository of EMA Crossover Strategy

Nasdaq

by rosskevin
1 stars

This indicator plots market breadth metrics for the Nasdaq exchange in a separate pane. It calculates a simple moving average of the Nasdaq Advance-Decline line, switching between a 10-period average on weekly charts and a 50-period average on daily charts, co

Indicator v4 TrendMoving averages
Updated 5 years ago · AGPL-3.0 GitHub repository of Nasdaq
318 stars

Calculates and plots moving averages on selected VIX volatility terms (VIX9D, VIX, VIX3M, or VIX6M) in a separate pane. The script computes user-defined short and long moving averages using EMA or SMA. It shades the background red when the short-term moving av

Indicator v5 Volatility & bandsMoving averages
Updated 2 months ago · MIT GitHub repository of [TVT] VIX Short Term Danger

LiqSpikeBounceLong Feb2026

by agutinbaigo28
147 stars

LiqSpikeBounceLong Feb2026 is an indicator designed to identify long bounce entries following high-volume liquidation cascades in bearish market contexts. It checks if price is below an exponential moving average, then detects large single-bar drops exceeding

Indicator v5 Volatility & bandsVolume
Updated 6 weeks ago · MIT GitHub repository of LiqSpikeBounceLong Feb2026

Bollinger Bands Strategy

by cklose2000
105 stars

This strategy generates buy and sell signals based on Bollinger Band crossovers combined with a simple moving average trend filter. It enters a long position when price crosses above the lower band while trading above the SMA filter line, and enters a short po

Strategy v5 Volatility & bandsMoving averages
Updated 1 year ago · None stated GitHub repository of Bollinger Bands Strategy
104 stars

This overlay strategy combines a Chandelier Exit with a zero-lag least squares moving average. Although the header mentions Heikin Ashi candles, the calculations use ordinary closes. An ATR trailing stop sets long and short levels, and direction flips when pri

Strategy v5 TrendMoving averages
Updated 3 years ago · MIT GitHub repository of Chandelier Exit & ZLSMA Strategy

PPO ATR Bands

by cryptorife
75 stars

PPO ATR Bands plots a percentage price oscillator in a separate pane. It compares a Hull average of typical price with a volume-weighted exponential average of Parabolic SAR, then scales three true-range bands around the slow average into matching oscillator l

Indicator v4 Oscillators & momentumMoving averages
Updated 3 years ago · GPL-3.0 GitHub repository of PPO ATR Bands

BTC Onchain Indicator

by readysetcryptocodes
43 stars

The indicator overlays Bitcoin pricing models built from daily on-chain series, including difficulty, supply, and market capitalization. It plots a difficulty ribbon from a power-law regression and several moving averages, a stock-to-flow price, a cumulative a

Indicator v4 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of BTC Onchain Indicator

Binance USDT 2H

by dearvn
43 stars

Binance USDT 2H is a trading strategy designed for Binance futures contracts. It calculates custom smoothed price averages and evaluates Stochastic oscillator lines fetched across multiple timeframes using security requests. Signals generate long and short ent

Strategy v5 Oscillators & momentumMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of Binance USDT 2H

MACD NN Weighted Strategy

by skywalker0803r
42 stars

Calculates MACD line and signal line differences, passing current and previous deltas through a two-layer neural network model with ReLU activation functions. User-configurable weights, biases, and threshold values determine output classification signals. The

Strategy v5 AI / machine learningOscillators & momentum
Updated 2 months ago · None stated GitHub repository of MACD NN Weighted Strategy

SMAOffsetProtectOptV0

by viktors1982
36 stars

This strategy generates buy and sell signals based on moving averages with price percentage offsets, combined with an Elliott Wave Oscillator (EWO) and RSI filter. Long entries occur when price falls below the offset moving average under specific EWO and RSI c

Strategy v4 Moving averagesOscillators & momentum Repaints
Updated 2 years ago · None stated GitHub repository of SMAOffsetProtectOptV0
33 stars

This indicator plots a T3 moving average on the price chart. It builds the line by applying a generalized double-exponential smoother three times to the chosen source, so the result is a weighted blend of nested exponential moving averages. Length sets the EMA

Indicator v4 Moving averagesTrend
Updated 5 years ago · Unlicense GitHub repository of [Pirate] T3 Moving Average

Zen ABR Range Bands

by Zen-Tim
29 stars

Calculates an Exponential Moving Average baseline surrounded by Average Bar Range bands based on an 8-period bar range calculation. Plots upper and lower channels at 1x, 2x, 3x, and 4x ABR multiples directly on the main price chart. Includes configurable bar h

Indicator v6 TrendVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Zen ABR Range Bands

BB Swing

by benso87
24 stars

This strategy calculates Bollinger Bands, a configurable moving average slope, Stochastic RSI, ATR, and ADX directly on the price chart. It evaluates trend bias and momentum conditions to generate long and short swing entries using percent-of-equity sizing. Th

Strategy v5 Volatility & bandsOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of BB Swing
16 stars

2XTMA Centered Bands Indicator plots two centered triangular moving averages with ATR-scaled upper and lower bands on the price chart. It colors each average bull or bear and can show an angle caution label. Optional alerts fire on band crosses, a return towar

Indicator v5 TrendMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of 2XTMA Centered Bands Indicator

Market Monitor - 15m

by chris-c-thomas
14 stars

Market Monitor - 15m is a directional bias chart overlay designed for 15-minute intraday chart analysis. It calculates a triple exponential moving average ribbon with EMA cloud shading, session VWAP with multiplier bands, prior day levels, a 30-minute opening

Indicator v6 TrendMoving averages
Updated 6 months ago · MIT GitHub repository of Market Monitor - 15m

Relative Strength Index

by deepentropy
13 stars

The Relative Strength Index indicator calculates momentum based on price changes over a specified length and plots the curve in a separate pane. It includes adjustable upper and lower bands, background color fills, and an optional smoothing moving average or B

Indicator v6 Oscillators & momentumMoving averages
Updated 6 months ago · MIT GitHub repository of Relative Strength Index

我的腳本

by blockplusim
12 stars

This indicator plots a seven-period simple moving average of the close on the price chart. It colors the line green when the average is higher than its value one bar earlier and red when it is lower or equal. There are no user inputs, so the length, source, an

Indicator v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of 我的腳本

NFI v7.2

by koradiyakaushal
12 stars

NFI v7.2 is an overlay study adapted from NostalgiaForInfinity V7 for Freqtrade. The strategy declaration is commented out, so this file does not place orders or define exits. Visible settings choose an informative timeframe, a master symbol that defaults to B

Indicator v4 Moving averages
Updated 5 years ago · MIT GitHub repository of NFI v7.2

5 EMAs

by hirawatt
11 stars

5 EMAs calculates and plots five Exponential Moving Averages derived from five configurable timeframes directly onto the main price chart. It also plots the high and low lines fetched from an additional custom timeframe, accompanied by a small on-screen table

Indicator v4 Moving averagesTrend Repaints
Updated 2 years ago · MIT GitHub repository of 5 EMAs

BTE Acc AO SMIO

by f-cksociety
11 stars

This script provides an indicator-based backtesting engine framework that simulates trade entries, exits, and filtering directly on the price chart. It evaluates selected entry rules and multi-layered filters, including moving average trends, volume increases,

Indicator v5 TrendOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of BTE Acc AO SMIO
10 stars

My Macro Cycle Indicator plots daily and weekly simple and exponential moving averages on the price chart, plus Pi Cycle and Mayer Multiple levels derived from the 200-day average. Optional toggles add support-band fills, a Keltner channel, CME futures gaps, a

Indicator v4 Moving averagesVolatility & bands
Updated 5 years ago · None stated GitHub repository of My Macro Cycle Indicator
9 stars

This indicator functions as a multi-pair forex screener, drawing output in a separate pane. It fetches price data across major currency pairs using security functions based on a user-selected resolution timeframe. It processes these market feeds with short, me

Indicator v4 Screeners & dashboardsTrend Repaints
Updated 5 years ago · None stated GitHub repository of AG Screener (Phill_I Request)
8 stars

This strategy calculates dual Average True Range (ATR) trailing stops using two distinct multiplier levels alongside an optional Hull Moving Average (HMA) channel. It identifies market structure shifts and triggers positions when price crosses the primary ATR

Strategy v5 TrendVolatility & bands
Updated 4 years ago · None stated GitHub repository of ATR 2STP Strategy
7 stars

This indicator overlays Bollinger Bands on the price chart and fills the area between upper and lower bands using a color based on Cumulative Volume Delta trend. It plots an EMA 9 line and fills between the EMA 9 and Bollinger basis in green or red depending o

Indicator v6 Volatility & bandsVolume
Updated 5 months ago · None stated GitHub repository of Deep Chart + BB (CVD Internal)

This strategy calculates trade signals by evaluating a daily session Volume Weighted Average Price relative to 90-period Exponential Moving Averages requested from 1-day and 4-hour higher timeframes. Long and short entries occur when VWAP crosses over or under

Strategy v5 Moving averagesTrend Repaints
Updated 3 years ago · MIT GitHub repository of 1D Bullish Buy 4H Bearish Sell Session EMA
6 stars

This indicator plots a weekly moving-average band on the price chart. It calculates a simple moving average and an exponential moving average of the close, requests both series on the weekly timeframe, and draws the SMA in red and the EMA in green. An orange f

Indicator v5 TrendMoving averages
Updated 7 days ago · MIT GitHub repository of Bull Market Support Band

This indicator calculates 1-hour Bollinger Bands and overlays them directly on lower timeframe price charts, such as M15. It fetches hourly middle, upper, and lower band values and locks them until the next hourly bar opens to provide higher-timeframe volatili

Indicator v6 Volatility & bandsSupport & resistance Repaints
Updated 1 year ago · MIT GitHub repository of H1 Bollinger Bands on M15 (Forward Shifted)

SMA Crossover

by broomva
5 stars

This strategy implements a classic trend-following moving average crossover system on the price chart. It calculates a fast simple moving average (default 50) and a slow SMA (default 200). It enters long when the fast SMA crosses above the slow SMA and enters

Strategy v5 TrendMoving averages
Updated 2 days ago · MIT GitHub repository of SMA Crossover
5 stars

Xsodus RSI Strategy is a long-only trading script that generates entry signals when the Relative Strength Index (RSI) crosses above a configurable oversold threshold. Traders can enable an optional trend filter requiring price to remain above an Exponential Mo

Strategy v5 Oscillators & momentumMoving averages
Updated 2 weeks ago · MIT GitHub repository of Xsodus RSI Strategy

SMA Crossover

by durdenbtc
5 stars

This strategy plots a 14-period and a 28-period simple moving average on the price chart. It opens a long position when the fast average crosses above the slow average and closes that long when the fast average crosses back below. Position size defaults to 100

Strategy v6 TrendMoving averages Repaints
Updated 5 months ago · MIT GitHub repository of SMA Crossover

Exponential Moving Average

by SiegerTerpstra
5 stars

This indicator calculates an Exponential Moving Average with custom seeding and optional multi-timeframe support. It computes a weighted average of the selected price source over a specified length and allows for an optional secondary smoothing pass. Drawn dir

Indicator v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Exponential Moving Average
5 stars

This indicator plots a moving average and ATR-based stop loss and take profit levels on the price chart. It calculates ATR, NATR, and surge detection using lookback periods and crossover logic. Settings control ATR lookback, length, profit and loss multipliers

Indicator v5 Volatility & bandsMoving averages
Updated 2 years ago · None stated GitHub repository of ATR Based Stoploss TakeProfit
5 stars

Calculates short and long Exponential Moving Averages alongside pivot high and low levels to identify breakout signals. The indicator plots a 20 EMA and a 50 EMA on the main price chart. It evaluates trend direction based on EMA crossover alignment, checks for

Indicator v4 Moving averagesTrend
Updated 3 years ago · Apache-2.0 GitHub repository of 20 EMA + 50 EMA + Breakout

This strategy calculates and plots up to four Simple Moving Averages (SMAs) and four Exponential Moving Averages (EMAs) directly on the price chart. It generates trading signals based on price crossing over or under a selected baseline moving average, which ca

Strategy v4 TrendMoving averages
Updated 6 years ago · LGPL-3.0 GitHub repository of 4 SMA + 4 EMA + Buy&Sell Cross (EMA or SMA) Strategy [d3nv3r]

Xiaotang System V5.0

by TUSKIJAY
4 stars

Xiaotang System V5.0 is a price-chart overlay indicator that identifies momentum breakouts across moving averages and session VWAP. It computes Heikin-Ashi price data, 50-period and 200-period SMAs, and intraday VWAP while monitoring 5-minute higher-timeframe

Indicator v5 TrendOscillators & momentum Repaints
Updated 3 days ago · None stated GitHub repository of Xiaotang System V5.0

MA Crossover

by latentwill
4 stars

This overlay strategy calculates a fast and a slow simple moving average of close and trades their crossovers. A cross of the fast average above the slow average opens a long; a cross below opens a short. Position size is fixed at one unit. After each entry it

Strategy v5 TrendMoving averages
Updated 8 days ago · None stated GitHub repository of MA Crossover

BB Breakout [trugurpala]

by trugurpala
4 stars

This strategy executes trades based on Bollinger Band breakouts and ATR-based dynamic risk management. It opens a long position when price crosses above the upper Bollinger Band and a short position when price crosses below the lower band, provided no position

Strategy v6 Volatility & bandsBreakout
Updated 2 months ago · MIT GitHub repository of BB Breakout [trugurpala]

RSI Mean Reversion

by LePotoRico2105
4 stars

This strategy executes mean-reversion trades when the Relative Strength Index rebounds from overbought or oversold zones in the direction of a higher-period trend EMA. It calculates indicators using confirmed bar closes to prevent live-bar recalculation. Entri

Strategy v5 Mean reversionOscillators & momentum
Updated 7 months ago · MIT GitHub repository of RSI Mean Reversion
4 stars

This strategy plots a 10-period and a 30-period simple moving average on the price chart. It opens a long position when the faster average crosses above the slower one and closes that long when the faster average crosses back below. Green and red markers and p

Strategy v6 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Simple Auto Buy/Sell 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