Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 15)

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

BTC Multiples

by readysetcryptocodes
43 stars

BTC Multiples calculates and displays Bitcoin macro valuation metrics in a separate pane, including the Mayer Multiple, Stock-to-Flow Multiple, Difficulty Multiple, and Puell Multiple. Each valuation multiple features configurable overvalued and undervalued th

Indicator v4 Moving averagesSupport & resistance
Updated 2 years ago · None stated GitHub repository of BTC Multiples

This strategy trades 1-minute futures contracts on Binance. It plots pivot high and low resistance and support levels on the price chart, along with an EMA and a custom Cto indicator. Long and short entries trigger on EMA and Cto crossovers combined with price

Strategy v5 TrendMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of Binancash Futures Strategy 1M Candles

FVG RSI Strategy (Translated)

by skywalker0803r
42 stars

This strategy overlays two exponential moving averages on the price chart to trade reversals using custom Fair Value Gaps and the Relative Strength Index. It enters long trades when price closes bullishly below both moving averages with an oversold RSI and a g

Strategy v5 SMC / ICT / price actionOscillators & momentum
Updated 2 months ago · None stated GitHub repository of FVG RSI Strategy (Translated)

NostalgiaForInfinityV2

by viktors1982
36 stars

NostalgiaForInfinityV2 is a multi-timeframe mean-reversion strategy derived from the popular Freqtrade algorithmic trading framework. It evaluates price behavior using dual Bollinger Bands, RSI, exponential moving averages, and ATR volatility metrics sampled a

Strategy v4 TrendOscillators & momentum Repaints
Updated 2 years ago · None stated GitHub repository of NostalgiaForInfinityV2

BB + MA + RSI

by thanhnguyennguyen
33 stars

This overlay indicator plots Bollinger Bands around a simple moving average, three exponential moving averages, and RSI-based markers on the price chart. Triangles mark RSI below the oversold level or above the overbought level, and arrows mark RSI crossing th

Indicator v4 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of BB + MA + RSI

Bollinger Bands

by modster
32 stars

This indicator plots a Bollinger-style envelope on the price chart. It calculates a simple moving average of the selected source and a standard-deviation band width set by the multiplier. It draws the basis, two lines offset by a small fraction of the basis as

Indicator v4 Volatility & bandsMoving averages
Updated 3 years ago · None stated GitHub repository of Bollinger Bands

Hedge Scalp - Open Profit/Loss

by nikita-doronin
30 stars

This indicator tracks and plots open profit and loss in a separate pane for a custom crypto hedge scalping strategy. It calculates an exponential moving average and establishes four long grid levels and one hedged short grid level at user-defined percentage di

Indicator v5 Moving averagesScalping
Updated 2 years ago · Custom licence GitHub repository of Hedge Scalp - Open Profit/Loss

Zen ABR Range Bands

by Zen-Tim
29 stars

The Zen ABR Range Bands indicator calculates an 8-bar average range from high-low differences and an exponential moving average of close prices. It plots the EMA on the price chart along with optional bands at multiples of the ABR (1x, 2x, 3x, 4x) centered on

Indicator v6 Moving averagesVolatility & bands
Updated 2 weeks ago · MIT GitHub repository of Zen ABR Range Bands
29 stars

This indicator calculates the Amazing Oscillator using 5-period and 34-period simple moving averages of the median price, then applies an RSI-style relative strength formula over a configurable smoothing period. The resulting oscillator fluctuates between -50

Indicator v5 Oscillators & momentumMoving averages
Updated 11 months ago · Custom licence GitHub repository of Amazing Oscillator [Algoalpha]
25 stars

This Pine Script strategy calculates Bayesian probabilities of price breaking up or down relative to Bollinger Bands and a Simple Moving Average. It plots these breakout and breakdown probability lines as oscillators in a separate pane. Long entries trigger wh

Strategy v4 Oscillators & momentumVolatility & bands
Updated 6 years ago · None stated GitHub repository of Bayesian BBSMA Oscillator Strategy

Greeffer BB Strategy

by SammyEnigma
18 stars

This strategy combines Bollinger Bands, Bollinger Band Width, and the Relative Strength Index (RSI) for mean-reversion trades. It enters long when price crosses below the lower band with oversold RSI, or when band width contracts under low volatility. Short en

Strategy v4 Mean reversionOscillators & momentum
Updated 6 years ago · None stated GitHub repository of Greeffer BB Strategy

This script plots Vegas Tunnel exponential moving averages directly onto the price chart. It calculates two pairs of EMAs: a fast tunnel using 144 and 169 periods displayed in green, and a slow filter tunnel using 576 and 676 periods displayed in red. Although

Strategy v5 Moving averagesTrend
Updated 3 weeks ago · Apache-2.0 GitHub repository of 第一个指标VeGa隧道交易策略
16 stars

This strategy plots Donchian channels, trailing stops, and profit targets directly on the price chart. It enters breakout trades using a 55-bar Donchian channel and sizes positions according to an ATR-based risk percentage per unit. The system adds units as pr

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 10: Profit Targets

Index Intraday Analyst

by chris-c-thomas
14 stars

Index Intraday Analyst overlays CBOE cash indices such as SPX, NDX, RUT, and DJX. It plots a multi-EMA ribbon, a session-anchored TWAP with standard-deviation bands, and session levels such as prior-day high, low, and close, the opening range, and the high and

Indicator v6 TrendOscillators & momentum
Updated 6 months ago · MIT GitHub repository of Index Intraday Analyst
13 stars

This strategy generates entry signals using pivot points and uses custom Curie moving average closing lines for exiting positions. It features risk management components including percentage-based stop loss, take profit, trailing stops, and break-even levels,

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of BitLa PivotPoints A002
12 stars

This strategy enters long when a fast EMA crosses above a slow EMA and RSI, ADX, and volume all clear their thresholds. It sizes the order from a percentage of equity and an ATR stop distance, then sets a partial profit target at a multiple of that risk. After

Strategy v5 TrendMoving averages
Updated 4 months ago · None stated GitHub repository of BTC 4H Institutional Trend

我的腳本

by blockplusim
12 stars

This script plots two simple moving averages (SMA) directly on the main price chart. It calculates a short-term 7-period SMA and a medium-term 20-period SMA based on bar closing prices. The 7-period SMA is displayed in red, while the 20-period SMA is rendered

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

NFI v6

by koradiyakaushal
12 stars

This Pine v4 study ports early NostalgiaForInfinity V6 conditions onto the price chart. It computes two Bollinger setups, several EMAs and SMAs, RSI, MFI, a percent SMA spread labeled EWO, a 14-period choppiness value, and short and longer volume medians. Fixe

Indicator v4 Moving averagesVolatility & bands
Updated 5 years ago · MIT GitHub repository of NFI v6

Estrategia EMA and BARS

by JoelPasapera
11 stars

This strategy generates long trade entries based on an exponential moving average crossover on the main price chart. It calculates two customizable EMAs and executes a buy order when the shorter moving average crosses above the longer moving average. Rather th

Strategy v6 TrendMoving averages
Updated 5 months ago · Apache-2.0 GitHub repository of Estrategia EMA and BARS
10 stars

This indicator plots three sets of multi-timeframe moving averages on the price chart to assist with top-down macro trend analysis. It renders two configurable fast and slow moving averages on a 610-minute timeframe, a 21-period weekly ribbon comparing EMA and

Indicator v4 Moving averagesTrend Repaints
Updated 5 years ago · None stated GitHub repository of Magicks (e)mas Indicator

Chad's Alert SMAs

by TPCharts
10 stars

Chad's Alert SMAs is an overlay indicator that calculates and plots two Exponential Moving Averages on the main price chart despite its naming. It evaluates short-term and long-term moving averages to detect crossovers and triggers alert conditions when the li

Indicator v4 Moving averagesTrend
Updated 5 years ago · GPL-3.0 GitHub repository of Chad's Alert SMAs
9 stars

Volume SuperTrend AI (Expo) combines SuperTrend trend filtering with a k-nearest neighbors machine learning classification algorithm. It computes a SuperTrend using customizable moving average types, including simple, exponential, weighted, smoothed, or volume

Indicator v5 TrendAI / machine learning
Updated 3 years ago · None stated GitHub repository of Volume SuperTrend AI (Expo)

Setup 9.2 - Larry Willians

by rodrigo-brito
9 stars

This strategy plots a 9-period exponential moving average and a 20-period simple moving average on the main price chart. It executes long entries based on the Larry Williams 9.2 setup when price breaks above a trigger bar high while the 9 EMA is rising above t

Strategy v4 TrendMoving averages
Updated 5 years ago · MIT GitHub repository of Setup 9.2 - Larry Willians
8 stars

The Triple EMA vs 55 EMA strategy plots three exponential moving averages (lengths 8, 13, 21), a 65-period exponential moving average, a 200-period simple moving average, and Hull moving averages of length 55 on high and low. It fills the area between the HMA

Strategy v5 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of Triple EMA vs 55 EMA

Commodity Channel Index

by eddiebelaval
7 stars

This indicator calculates and plots the Commodity Channel Index (CCI) alongside a configurable moving average in a separate pane. The CCI line dynamically changes color based on whether its value is above or below a threshold level of 50, accented by gradient

Indicator v6 Oscillators & momentumMoving averages
Updated 3 months ago · None stated GitHub repository of Commodity Channel Index
7 stars

The EMA 9/26/52 Cross Strategy is a trend-following strategy overlay that plots three Exponential Moving Averages (9, 26, and 52 periods) on the price chart. It generates long entry signals when the 9 EMA crosses above the 26 EMA while the price remains above

Strategy v6 TrendMoving averages
Updated 1 year ago · MPL-2.0 GitHub repository of EMA 9/26/52 Cross Strategy

This strategy plots a 90-period simple moving average from the daily and four-hour charts plus a daily session VWAP on the price chart. It enters long when VWAP is above the daily average and the four-hour VWAP crosses above its average, and short in the oppos

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

This indicator plots a weekly simple moving average and a weekly exponential moving average on the price chart and shades the area between them. It requests weekly values of the close-based averages so the band stays aligned with the weekly timeframe even on l

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

C41 Oscillator

by damianpitt
6 stars

The C41 Oscillator is a separate pane composite momentum indicator designed to companion the C41 Core Strategy. It combines a moving average trend filter with RSI and Williams %R overbought or oversold reversal conditions into a normalized 0 to 100 score. The

Indicator v6 Oscillators & momentumTrend
Updated 2 months ago · MIT GitHub repository of C41 Oscillator

MarketMerge v1.5

by mgnyc11
6 stars

MarketMerge is a price-chart overlay that plots moving averages, a relative strength line, and an S&P 500 comparison. Users can show a 21-period EMA and 50-, 150-, and 200-period simple averages. The relative strength line divides price by a chosen benchmark,

Indicator v6 Moving averagesTrend
Updated 8 months ago · MIT GitHub repository of MarketMerge v1.5

This indicator calculates daily 90-period Bollinger Bands and plots them directly on a lower timeframe chart, such as M15. It queries higher-timeframe daily data using request.security and updates the upper, middle, and lower band values at the start of each n

Indicator v6 Volatility & bandsMoving averages Repaints
Updated 1 year ago · MIT GitHub repository of D1 Bollinger Bands (Period 90) on M15 (Forward Shifted)
6 stars

The TradersPost Example MOMO Strategy is a trend-following trading strategy that generates buy and sell signals based on exponential moving average (EMA) crossovers. It calculates a fast EMA and a slow EMA on the chart timeframe while plotting multi-timeframe

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of TradersPost Example MOMO Strategy

SMA Cross 50/200

by durdenbtc
5 stars

This strategy calculates a 50-period simple moving average and a 200-period simple moving average using closing prices. It enters a long position whenever the fast moving average crosses above the slow moving average, and closes the trade when it crosses below

Strategy v6 TrendMoving averages
Updated 5 months ago · MIT GitHub repository of SMA Cross 50/200

MACD Divergence

by chaise-cogent
5 stars

This indicator calculates the Moving Average Convergence Divergence (MACD) and signal line in a separate pane to detect regular bullish and bearish divergences. It identifies price pivot highs and lows using a configurable lookback length and compares them aga

Indicator v6 Oscillators & momentumDivergence
Updated 7 months ago · MIT GitHub repository of MACD Divergence

Scalping PullBack Tool R1.1

by Ahmed-GoCode
5 stars

This indicator plots a Price Action Channel (PAC) based on high, low, and close moving averages alongside fast, medium, and slow trend EMAs directly on the price chart. It detects regular and Bill Williams fractals to track market structure and identifies pull

Indicator v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Scalping PullBack Tool R1.1

ATR Based Stoploss

by rubystar0512
5 stars

ATR Based Stoploss is an overlay indicator that calculates dynamic stop loss and take profit bands around a central simple moving average. It uses standard Average True Range or an ATR Surge Average derived from volatility spikes to offset profit and loss boun

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

Hedge Exit Algo

by jerryinyang
5 stars

Hedge Exit Algo provides position sizing and lot calculations for forex and precious metals hedging strategies. It evaluates pip values, currency conversion rates, and profit targets relative to account balance. The script defines custom lot sizing routines al

Indicator v5 Moving averages Repaints
Updated 2 years ago · None stated GitHub repository of Hedge Exit Algo

This short-only strategy identifies trend continuation setups on the price chart by combining 50 and 200 EMAs with Stochastic crossovers and RSI momentum filters. It executes short entries when the 50 EMA is below the 200 EMA, price trades below the 50 EMA, St

Strategy v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of 2 EMAs + RSI + Stochastic Short Strategy

[CP]Pivot Boss Floor Pivots

by pranjalchaubey
5 stars

This indicator draws floor pivots and the central pivot range on the price chart. A timeframe input sets the pivot period from one hour through twelve months, and toggles control labels and next-period levels. When dynamic levels are on, an ATR threshold decid

Indicator v4 Support & resistanceMoving averages
Updated 3 years ago · None stated GitHub repository of [CP]Pivot Boss Floor Pivots

Triple Supertrend

by shyrwinsia
5 stars

This indicator calculates three distinct Supertrend lines on the main price chart, designated as short, medium, and long term. Each Supertrend line utilizes its own Average True Range period and multiplier settings to identify trend directions across different

Indicator v4 TrendVolatility & bands
Updated 5 years ago · MIT GitHub repository of Triple Supertrend

This strategy plots an eight-line exponential moving average ribbon spanning lengths 20 to 55 alongside a separate signal EMA directly on the price chart. It executes a long entry when price crosses above the signal EMA and enters short when price crosses belo

Strategy v4 TrendMoving averages
Updated 6 years ago · LGPL-3.0 GitHub repository of 35EMA Cross BuyAndSell Strategy + RIBBON [d3nv3r]

Antigravity Elite

by eltonaguiar
4 stars

Antigravity Elite is an overlay indicator that screens price with seven selectable components: Mercury Fear, Connors RSI-2, volatility-spike reversal, EMA stack, Supertrend, multi-sigma bands, and an optional funding proxy. Auto-Detect chooses one method, whil

Indicator v6 Oscillators & momentumMoving averages
Updated 2 days ago · None stated GitHub repository of Antigravity Elite
4 stars

This strategy translates Python backtesting logic into Pine Script for intraday momentum trading. It calculates forced Heikin-Ashi candles and 1-minute moving averages to evaluate market trends and assign a signal strength score from 0 to 10. Entries execute w

Strategy v5 TrendMoving averages
Updated 3 days ago · None stated GitHub repository of Xiao Tang System v2 Strategy

EMA Cross + RSI Filter

by latentwill
4 stars

This strategy plots on the price chart and trades EMA crossovers filtered by RSI. It enters long when the fast EMA crosses above the slow EMA and RSI is above the minimum threshold. A cross below closes the long and opens a short without an RSI filter. Each en

Strategy v5 TrendMoving averages
Updated 8 days ago · None stated GitHub repository of EMA Cross + RSI Filter

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