Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 7)

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 Min Scalp

by zeddyokaka230-del
1 stars

An overlay indicator for short-term charts that plots a fast and a slow EMA, 9 and 21 by default. A buy label appears when the fast EMA crosses above the slow EMA and RSI is above 50 or below the oversold level. A sell label appears on the opposite cross with

Indicator v5 ScalpingMoving averages
Updated 7 weeks ago · None stated GitHub repository of 1 Min Scalp

A simple strategy that goes long when a 20-period EMA crosses above a 50-period EMA and short on the opposite cross. Each entry gets a stop one ATR away and a take profit set at a risk to reward multiple of the ATR, adjustable by one input. Position size is a

Strategy v5 Moving averagesTrend
Updated 7 weeks ago · MIT GitHub repository of Lyzer Baseline Control - Simple EMA Cross
1 stars

Calculates a Simple Moving Average (SMA) and Relative Strength Index (RSI) to render a live status dashboard table on the price chart. The script plots the SMA line directly on the price chart with color dynamic styling based on market trend direction. On the

Indicator v6 Screeners & dashboardsMoving averages
Updated 7 weeks ago · MPL-2.0 GitHub repository of Dashboard Block Pattern Reference
1 stars

A Pine v6 example strategy from a trading guide that enters long when a fast EMA crosses above a slow EMA and short when it crosses below, defaulting to 10 and 50 periods. Each open position gets a percent stop loss and a percent take profit measured from the

Strategy v6 Moving averagesTrend
Updated 7 weeks ago · MIT GitHub repository of MA Crossover (Guide Example)

BIST MTF Signal System

by Baran-Ozkann
1 stars

This indicator scores each bar of a BIST equity with a weighted confluence of thirteen layers and plots the result in a separate pane. Daily ADX, SMA and EMA alignment lock direction and can veto a candidate. The one-hour timeframe needs a PAC touch plus a con

Indicator v6 TrendOscillators & momentum Repaints
Updated 8 weeks ago · None stated GitHub repository of BIST MTF Signal System

AEGIS Demo

by pythonbygabby
1 stars

AEGIS Demo is an EMA crossover strategy designed to trigger webhook signals for an external automated execution bot. It calculates a 20-period fast exponential moving average and a 50-period slow exponential moving average, plotting both lines directly on the

Strategy v5 TrendMoving averages
Updated 8 weeks ago · None stated GitHub repository of AEGIS Demo
1 stars

Calculates and plots customizable moving averages on the price chart using 20 native slots and 5 cross-timeframe overlay slots. Supports SMA, EMA, RMA, VWMA, and WMA moving average types with user-defined sources, lengths, colors, and line widths. Visibility c

Indicator v6 TrendMoving averages Repaints
Updated 2 months ago · MPL-2.0 GitHub repository of MA Slots - Multi-Timeframe

AIO Albi

by Albidev1
1 stars

An all-in-one overlay that draws a fast EMA and a slow EMA taken from other timeframes, current day, previous day and previous week highs and lows, and unfilled daily fair value gaps with a dotted midline. Optional extras are untouched daily swing points, the

Indicator v6 Support & resistanceMoving averages
Updated 2 months ago · None stated GitHub repository of AIO Albi

4Y AVWAP SIP

by sidd99-nit
1 stars

This indicator calculates four-year accumulated volume weighted average prices with recency weighting for the current year, previous year, two years ago and three years ago. It plots lines for each individual AVWAP, a recency-weighted composite and an equal-we

Indicator v6 Moving averagesSupport & resistance
Updated 2 months ago · None stated GitHub repository of 4Y AVWAP SIP

Consensus Meter

by iamsteveng
1 stars

A separate-pane indicator that adds up equal votes from up to six classic signals: a 20/50 moving average cross, RSI, MACD, Bollinger Bands, OBV and the Ichimoku cloud. Each signal votes plus one, minus one or zero, and the net total is plotted as a whole numb

Indicator v6 Oscillators & momentumMoving averages
Updated 2 months ago · None stated GitHub repository of Consensus Meter
1 stars

A configurable signal builder for the price chart. The user picks a leading indicator, with Range Filter as the default, and can then require confirmation from optional filters such as EMA position, two or three EMA crosses, Rational Quadratic Kernel, SuperTre

Indicator v6 TrendMoving averages Repaints
Updated 2 months ago · None stated GitHub repository of DIY Custom Strategy Builder v1
1 stars

EMA & Time Exit Strategy v6 is an overlay trend-following strategy based on exponential moving averages and fixed-duration holding periods. It plots a fast EMA and a slow EMA directly on the price chart, triggering a long entry when the fast EMA crosses above

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of EMA & Time Exit Strategy v6

KB# GOLD

by jayadevrana
1 stars

KB# GOLD is a trading strategy that identifies trend entries and exits using moving average crossovers and optional Tillson T3 breakout filtering. The script calculates fast and slow exponential moving averages alongside a T3 smoothing curve. When breakout mod

Strategy v5 TrendMoving averages
Updated 2 months ago · Custom licence GitHub repository of KB# GOLD

3 - 30 Formula

by jayadevrana
1 stars

A Pine v5 strategy that enters on a 3-period and 30-period EMA crossover when the candle is strong, meaning its body is at least 80 percent of its full range. A bullish cross on a strong green candle opens a long, and a bearish cross on a strong red candle ope

Strategy v5 Moving averagesTrend
Updated 2 months ago · Custom licence GitHub repository of 3 - 30 Formula
1 stars

This Pine Script indicator plots fast and slow EMA lines on the price chart to identify trend direction. It applies RSI and MACD filters to confirm momentum strength and checks volume against its average for confirmation. Buy signals trigger on fast EMA crossi

Indicator v6 TrendOscillators & momentum
Updated 2 months ago · Custom licence GitHub repository of Lesson 5 Buy Sell Logic Demo

This indicator identifies confluence patterns based on smart money concepts including liquidity grabs, break of structure, order blocks, and fair value gaps. It maintains a statistical database of past setups, logs outcomes on bar close, and calculates dynamic

Indicator v6 SMC / ICT / price actionTrend
Updated 2 months ago · MIT GitHub repository of Smart Money Concepts V3.5.5 - Confluence Learning Engine

GrimmArty Indicator

by GreyssonEnterprises
1 stars

A Pine v5 indicator that draws four smoothed moving averages (21, 50, 100 and 200), a trend fill between a two-period EMA and the 200 average, three line strike markers and engulfing-style candle markers, with optional time-zone session shading and weekday tog

Indicator v5 Moving averagesCandlestick patterns
Updated 2 months ago · MIT GitHub repository of GrimmArty Indicator

PineFlow v6 — ORB Risk Strategy

by loveyuanfandj-glitch
1 stars

PineFlow v6 — ORB Risk Strategy executes opening range breakout trades filtered by trend and momentum indicators. It defines an initial opening range and trades breakouts during the active trading session when aligned with fast and slow EMAs, ADX momentum, and

Strategy v6 BreakoutSessions & time
Updated 3 months ago · MIT GitHub repository of PineFlow v6 — ORB Risk Strategy

EMA Crossover Strategy

by jaichaturvedi88
1 stars

A simple long-only strategy written for an Indian rupee account. It buys when the close is above a short EMA, default 9, and closes the position when the high falls below a longer EMA, default 26. Order size is a fixed rupee amount divided by price, and tradin

Strategy v6 Moving averagesTrend
Updated 3 months ago · None stated GitHub repository of EMA Crossover Strategy

Elephant Bars

by FranklyBrandon
1 stars

A price chart overlay that flags unusually large candles, called elephant bars, when the candle body is at least a set multiple of the average body over a lookback, 1.5 times and 100 bars by default. It also marks small retracement bars that follow an elephant

Indicator v5 Candlestick patternsMoving averages
Updated 3 months ago · None stated GitHub repository of Elephant Bars

Buddha Bands

by DarthBuddha
1 stars

A chart-overlay indicator that draws four pairs of long-term moving averages, each pair forming a filled band between a slow and a fast line. The default lengths are 20 and 21, 50 and 55, 200 and 233, and 365 and 377. Each band can be switched on or off, its m

Indicator v6 Moving averagesTrend
Updated 3 months ago · MIT GitHub repository of Buddha Bands

Fusion Cipher A Overlay

by shahzaib-574
1 stars

This indicator draws an eight-line EMA ribbon with an optional cloud on the price chart, using Fibonacci-style lengths from 8 to 233 and an optional Heikin Ashi source. It adds symbolic guidance marks, long and short setup labels, a compression filter and a vo

Indicator v6 TrendMoving averages
Updated 3 months ago · None stated GitHub repository of Fusion Cipher A Overlay

EMA Gold Trader 2026

by alexhb-maker
1 stars

An overlay for the price chart that plots a 60-period EMA, a 60-period double EMA and a 200-period EMA. It marks a buy triangle when the previous close sits above both the EMA and the double EMA, and a second triangle when the EMA crosses above the double EMA.

Indicator v6 TrendMoving averages
Updated 3 months ago · MIT GitHub repository of EMA Gold Trader 2026

EMA Cross (Clean)

by ForexCodes-hq
1 stars

A small Pine v6 example strategy that goes long when a 12-period EMA crosses above a 26-period EMA, and only acts on a confirmed bar. After entry it attaches a fixed stop loss placed a set number of points below the average entry price, set by one input. There

Strategy v6 Moving averagesTrend
Updated 3 months ago · MIT GitHub repository of EMA Cross (Clean)
1 stars

The ATR Breakout Channel strategy detects breakouts by comparing the current close price to the high or low of the previous 20 bars, forming a channel. Entries occur when the price breaks through the channel in the trend direction of a 200-period EMA if the tr

Strategy v6 BreakoutTrend
Updated 3 months ago · MIT GitHub repository of ATR Breakout Channel [QuantForge]

GEKO Gold

by grzegorzkowalskigk-jpg
1 stars

GEKO Gold is a trend-following indicator for gold (XAUUSD/MGC). It computes a GEKO-TIMID composite trend strength score by blending weekly and daily EMAs and ADX values, then classifies the trend into Emerging, Dominant or Extended states. The indicator plots

Indicator v6 TrendMoving averages
Updated 3 months ago · Custom licence GitHub repository of GEKO Gold

Trade Signal Indicator

by ashishgkwd
1 stars

Trade Signal Indicator is an overlay script that combines three tools: an EMA crossover (13 and 48 by default), an adaptive trend finder channel and a Nadaraya-Watson envelope. Each can be enabled separately, and colours, deviation multiplier, bandwidth and so

Indicator v6 TrendMoving averages Repaints
Updated 4 months ago · None stated GitHub repository of Trade Signal Indicator
1 stars

Array Advanced Helpers is a Pine Script v6 strategy that plots on the price chart. It builds arrays from close, open, high and hl2 to compute the lowest and highest values along with the last index of the highest. Two EMAs with periods 8 and 21 generate crosso

Strategy v6 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of Array Advanced Helpers

Nexus Flow

by darkwader26
1 stars

Nexus Flow is a multi-dimensional trend and momentum indicator that combines EMA and ALMA trend detection with Supertrend consensus for adaptive trend filtering. It incorporates an adaptive RSI for momentum analysis with volatility-adjusted lookback and plots

Indicator v6 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Nexus Flow
1 stars

This overlay strategy is built for MNQ on a five-minute chart and is meant to trade imbalance fair value gaps. It reads one-hour and two-hour closes against exponential moving averages for directional bias, and it flags liquidity sweeps of the previous day hig

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 5 months ago · None stated GitHub repository of IFVG Strategy – MNQ 5min

Sentiment 2

by ggamer5555
1 stars

Sentiment 2 is a trend-following strategy that calculates a normalized composite market sentiment score ranging between 0 and 1. It combines exponential and Hull moving average slopes, high/low midpoints, Supertrend distances, and Parabolic SAR metrics. Plotte

Strategy v6 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of Sentiment 2

Gold indicator

by H4RsH-25
1 stars

The Gold indicator plots the 20 SMA and 200 EMA on the price chart together with $2 proximity zones around the SMA. It generates strong long signals when price enters the zone from below, stays above the SMA and MACD histogram is positive. Strong short signals

Indicator v6 TrendOscillators & momentum Repaints
Updated 5 months ago · None stated GitHub repository of Gold indicator
1 stars

This indicator is tuned for 30-minute micro gold futures. It computes a Keltner-style band around a Hull-type moving average and draws a coloured cloud on the price chart. A separate pane shows a smoothed mountain-style oscillator and candles, while a four-lin

Indicator v6 Volatility & bandsMoving averages
Updated 5 months ago · None stated GitHub repository of MMP v.17 Futures 30Min MGC

BEST Supertrend Strategy

by Ayooluwa-trading-dev
1 stars

This strategy combines a Supertrend line, calculated on a selectable timeframe from daily up to yearly, with a fast and slow SMA pair, 7 and 20 by default. A long needs price above the Supertrend level and the fast SMA above the slow one; a short needs the rev

Strategy v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of BEST Supertrend Strategy

Bakome Buy Sell

by BAKOME-Hub
1 stars

This indicator plots a fast and a slow EMA, 5 and 13 by default, on the price chart and gives a buy or sell signal when they cross, optionally requiring the signal candle to close in the same direction. For each signal it draws an entry, an ATR-based stop loss

Indicator v5 Moving averagesTrend
Updated 5 months ago · MIT GitHub repository of Bakome Buy Sell
1 stars

Plots two VIDYA adaptive moving averages, a short one of 9 bars and a long one of 21 bars by default, on the price chart. A buy label appears when the short line crosses above the long one while the positive directional index is above a threshold, and a sell l

Indicator v6 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of VIDYA Crossover with ADX Filter
1 stars

An overlay indicator that combines smart money concepts with order blocks and moving averages. It draws swing and internal market structure with sweep and bubble options, volumetric order blocks that show recent buy and sell activity, optional breaker blocks a

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 5 months ago · None stated GitHub repository of Combined Indicators: SMC + OBD + 7MA

Chintan Cheatcode

by onlyspx
1 stars

This indicator overlays a stack of reference lines on the price chart for index trading: session VWAP, optional two-day, weekly and monthly VWAP, an hourly 20-period average, daily 5, 20, 50 and 200 averages and a daily halfback midpoint. It can also show ATR-

Indicator v6 Moving averagesSupport & resistance
Updated 6 months ago · None stated GitHub repository of Chintan Cheatcode

SmartFlow Market Indicator

by Nadarisgetae
1 stars

This indicator gives buy and sell labels on the price chart by combining a triple moving average trend filter (EMA 21, EMA 50 and SMA 200), an RSI zone check, a volume spike on a candle of the same direction, and an optional pivot breakout. It also marks pivot

Indicator v5 TrendMoving averages
Updated 6 months ago · None stated GitHub repository of SmartFlow Market Indicator
1 stars

This Pine Script indicator computes a Confluence Score from 0 to 100 by aggregating seven breakout identification strategies based on VCP trend template, TTM squeeze, volume analysis, relative strength, MA setup, RSI momentum and price near resistance. It plot

Indicator v6 TrendOscillators & momentum
Updated 6 months ago · None stated GitHub repository of Breakout Confluence Scanner

ARPS ZEMA Cross

by ali-rajabpour
1 stars

An overlay indicator written in Pine v4 that plots two zero-lag EMAs, a fast 50-period and a slow 200-period line, and labels long and short entries where they cross. Both averages are calculated from a fixed ten-minute BTCUSDT series rather than the chart sym

Indicator v4 Moving averagesTrend
Updated 6 months ago · None stated GitHub repository of ARPS ZEMA Cross

ARPS OB Scalp

by ali-rajabpour
1 stars

Overlay indicator that plots 200-period simple and exponential moving averages from the 30 minute, 1 hour and 4 hour timeframes on the price chart, using request.security. It also offers a Williams Fractal reversal display, toggled by a single setting. Intende

Indicator v5 Moving averagesScalping
Updated 6 months ago · None stated GitHub repository of ARPS OB Scalp

ARPS FastScalping Indicator

by ali-rajabpour
1 stars

A chart-overlay indicator written in Pine v4 for one-minute crypto charts. It plots a zero-lag EMA built from two 100-period EMAs, and two Tillson T3 moving averages, one with a Fibonacci volume factor, coloured by slope. A label on the last bar shows a limit

Indicator v4 Moving averagesScalping
Updated 6 months ago · None stated GitHub repository of ARPS FastScalping Indicator

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