Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 12)

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 combines three Exponential Moving Averages (EMAs), imbalance gap detection, and a volume profile on the main price chart. It plots customizable short, medium, and long-term EMAs while highlighting Fair Value Gaps (FVG) and Opening Gaps (OG). Add

Indicator v5 Moving averagesSMC / ICT / price action
Updated 2 years ago · None stated GitHub repository of Imbalance + 3EMA + Volume Profile

This strategy combines two Supertrend indicators with a MACD histogram filter to identify trend-following entries on the price chart. Long entries trigger when both Supertrend lines are bullish and the MACD histogram is positive. Short entries execute when bot

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Dual-Supertrend with MACD - Strategy [presentTrading]

Bollinger Band

by might-tree
4 stars

This indicator calculates upper and lower Bollinger Bands using a Simple Moving Average and standard deviation. It plots both bands with a colored background fill between them, alongside the closing price in a separate indicator pane. Users can customize the c

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

FTX Premium Indicator

by blenessy
4 stars

The FTX Premium Indicator calculates and plots the relative price spread between cryptocurrency futures and spot contracts in a separate pane. It compares perpetual or dated contracts against spot markets and can normalize the difference into an annualized per

Indicator v5 Moving averagesVolatility & bands
Updated 4 years ago · MIT GitHub repository of FTX Premium Indicator

Snag - Makson

by dearvn
4 stars

The script is a price chart overlay indicator. It calculates a five period weighted moving average of close prices. Long signals trigger on crossovers from below the EMA combined with upward price action and trend continuation. Short signals trigger on crossov

Indicator v5 TrendMoving averages Repaints
Updated 4 years ago · None stated GitHub repository of Snag - Makson

EMA_v1

by aofwittawat
4 stars

This indicator plots an exponential moving average on the price chart and colors it green when the close is above the average and red when it is below. It marks a long triangle when price flips from below the average to above it, and a short triangle on the op

Indicator v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of EMA_v1
4 stars

This strategy plots three exponential moving averages on the price chart and trades their alignment. It enters long when the fast EMA crosses above the mid EMA while price is above the slow EMA, and closes that long on the opposite cross with price below the s

Strategy v4 TrendMoving averages
Updated 5 years ago · MIT GitHub repository of Algo Trading: Simple 3-EMA Strategy

This strategy combines Ichimoku Cloud calculations with an RSI filter to generate trading signals directly on the price chart. It offers options for displaying either standard offset lines or non-offset non-repainting cloud components. Users can configure para

Strategy v4 TrendOscillators & momentum
Updated 6 years ago · Apache-2.0 GitHub repository of Ichimoku Cloud - Kijun-Sen - RSI

EMA Cross

by degenview
3 stars

This indicator plots two exponential moving averages of a chosen price source on the price chart. A green upward triangle marks when the fast average crosses above the slow average, and a red downward triangle marks the opposite cross. Both events are also exp

Indicator v6 Moving averagesTrend
Updated 2 days ago · GPL-3.0 GitHub repository of EMA Cross

AT+T3

by gocaman
3 stars

AT+T3 is a TradingView Pine Script indicator that overlays the T3 moving average (with Fibonacci variant) and AlphaTrend on price charts for BIST stocks. T3 uses Tim Tillson's smoothing formula with adjustable length and volume factor to produce trend lines th

Indicator v5 TrendVolatility & bands Repaints
Updated 2 days ago · None stated GitHub repository of AT+T3

Mc War Ten + EMA

by tuanmcwar
3 stars

This indicator plots three exponential moving averages directly on the price chart using default lengths of 34, 89, and 200. Alongside the moving averages, it renders on-chart watermark tables displaying a custom title, subtitle, ticker symbol, timeframe, and

Indicator v5 Moving averagesTrend
Updated 4 months ago · None stated GitHub repository of Mc War Ten + EMA

MTF Confluence Dashboard

by WiseManAlgo
3 stars

This indicator calculates a multi-timeframe trend and momentum score across five customizable timeframes for up to three symbols using an EMA and RSI dual-vote system. It displays an on-chart dashboard table summarizing individual timeframe states, weighted ag

Indicator v5 Screeners & dashboardsTrend
Updated 4 months ago · None stated GitHub repository of MTF Confluence Dashboard

Stella's MACD Crossover

by stella-entry
3 stars

This strategy calculates the standard Moving Average Convergence Divergence oscillator and generates trade entries based on signal line crossovers. It opens long positions on bullish crossovers and short positions on bearish crossunders. An optional exponentia

Strategy v6 Oscillators & momentumTrend
Updated 8 months ago · MIT GitHub repository of Stella's MACD Crossover

JINADA Up

by cathxrsys
3 stars

JINADA Up is an all-in-one chart overlay indicator that combines support and resistance zones, multiple moving averages, candlestick body and wick ratio analysis, and dynamic stop levels. It identifies support and resistance levels across user-defined lookback

Indicator v6 TrendMoving averages
Updated 9 months ago · GPL-3.0 GitHub repository of JINADA Up

Coco

by IAMATOMIC001
3 stars

Coco plots several selectable moving averages in a separate pane and can show the percentage dispersion between them. Fast and slow averages default to a 3-period SMA and a 21-period WMA, with optional third and fourth averages. Supported types include SMA, WM

Indicator v6 Moving averagesVolume
Updated 12 months ago · None stated GitHub repository of Coco

Cipher B

by diehardyearone
3 stars

Cipher B is a multi-indicator plotting WaveTrend oscillator lines and signals alongside Stochastic RSI, MFI area with color bars, and buy sell marks. It draws all elements in a separate pane. WaveTrend calculates using SMMA and EMA on source like ohlc4 with ad

Indicator v6 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of Cipher B

200DMA Entry

by FinDeckDao
3 stars

This strategy plots a 200-period simple moving average on the price chart and opens a long position when the previous bar’s close crosses above that average. Each entry uses one percent of account equity. It closes the position when price reaches 2.5 times the

Strategy v5 TrendMoving averages Repaints
Updated 1 year ago · MIT GitHub repository of 200DMA Entry
3 stars

This indicator estimates how many bars typically pass before a custom skew measure falls back below its exponential moving average. It builds the skew from smoothed upside and downside true-range deviations, then applies five fixed EMA lengths from 2 to 110. O

Indicator v5 Mean reversionMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Average Bars Before Reversion

EMA+BB+ADX+AO

by mr-s8
3 stars

This strategy plots four EMAs (5, 21, 50 and 200), a Bollinger Band ratio, Awesome Oscillator and ADX on the price chart. It generates long entries when EMA alignment, BB expansion, AO strength and ADX trend strength align, then exits using a percentage-based

Strategy v5 Moving averagesVolatility & bands
Updated 2 years ago · GPL-2.0 GitHub repository of EMA+BB+ADX+AO
3 stars

Fedra Algotrading Strategy Premium is an intraday trend-following strategy designed for sub-30-minute charts. It combines dual moving averages with optional Supertrend, MACD, and market breadth ratio filters to trigger long and short positions. The script incl

Strategy v5 TrendMoving averages Repaints
Updated 3 years ago · None stated GitHub repository of Fedra Algotrading Strategy Premium
3 stars

This strategy overlays Donchian Channels and higher-timeframe exponential moving averages on the price chart to generate trading signals. It calculates an upper, lower, and median Donchian band alongside 240-minute EMAs fetched specifically for BTCUSDT. When p

Strategy v5 BreakoutMoving averages
Updated 4 years ago · CC0-1.0 GitHub repository of Greeffer's Hedge Mode Strategy

BBI HPI RSI

by blackcat1402
3 stars

This indicator combines Bollinger Band Indicator, High Price Indicator and Relative Strength Index on the price chart. It calculates BBI using length, standard deviation and pivot settings, detects HPI based on recent bars when current bar is red, and includes

Indicator v4 Oscillators & momentumMoving averages
Updated 5 years ago · MIT GitHub repository of BBI HPI RSI
2 stars

This indicator plots the relative strength index in a separate pane. It calculates RSI from the selected source and length with Wilder-style RMA smoothing, then draws the line against horizontal bands at 70, 50 and 30, with gradient fills in the overbought and

Indicator v6 Oscillators & momentumMoving averages
Updated 2 days ago · None stated GitHub repository of Relative strength index
2 stars

Gold Multi-TF NYSE Scalper v2 is an intraday trading strategy for XAUUSD that seeks momentum entries by aligning RSI and EMA bias across multiple timeframes. It filters trades using an optional NYSE session clock and an ATR volatility spike check. Entries exit

Strategy v6 Oscillators & momentumVolatility & bands
Updated 9 days ago · None stated GitHub repository of Gold Multi-TF NYSE Scalper v2

2x MA Moving Average

by piecioshka
2 stars

This indicator plots two customizable moving averages directly on the price chart. Users can select independent lengths, colors, and calculation types, including SMA, EMA, WMA, VWMA, and RMA. When the faster moving average crosses the slower moving average, th

Indicator v6 Moving averagesTrend
Updated 12 days ago · MIT GitHub repository of 2x MA Moving Average

This multi-timeframe indicator combines higher-timeframe trend analysis, MACD divergence detection, and short-term oscillator timing to identify trading opportunities on GBPJPY. It evaluates trend direction using a 4-hour EMA, locates MACD divergences with Zig

Indicator v6 DivergenceOscillators & momentum

Aurora KAMA Trend

by ZhijuCen
2 stars

This strategy plots Kaufman's Adaptive Moving Average on the price chart and trades when that average rises or falls for a set number of bars. Longs require the close above an optional long-term simple moving average; shorts require the close below it. Directi

Strategy v6 TrendMoving averages
Updated 2 weeks ago · MIT GitHub repository of Aurora KAMA Trend

EMA / SMA MP

by midngtpickle
2 stars

This indicator plots six exponential moving averages, three simple moving averages, and a session volume-weighted average price directly on the price chart. It signals through chart labels triggered by moving average crossovers, including fast and slow exponen

Indicator v6 Moving averagesTrend
Updated 4 weeks ago · Custom licence GitHub repository of EMA / SMA MP

Apex Swing System V2.5

by omharde42
2 stars

This indicator combines a 200-period simple moving average, relative strength index, and Ichimoku cloud components to evaluate market conditions and generate bullish and bearish signals. It plots fixed trade levels including entry, stop loss, and multiple targ

Indicator v6 TrendOscillators & momentum
Updated 7 weeks ago · None stated GitHub repository of Apex Swing System V2.5

API Integration Examples

by danielbodnar
2 stars

This indicator demonstrates Pine Script data requests and draws them on the price chart. It plots a four-hour simple moving average plus the daily high and low as step lines, and it plots twenty-bar relative performance versus SPY. It also requests QQQ, VIX, v

Indicator v6 Moving averagesSupport & resistance Repaints
Updated 2 months ago · MIT GitHub repository of API Integration Examples

Alertatron-KSM Demabot 2H

by danielvm-git
2 stars

This strategy calculates up to three Double Exponential Moving Averages (DEMA) and plots them on the main price chart. It executes long entries when the fast DEMA crosses above the medium DEMA while confirming the direction of an optional third DEMA, and enter

Strategy v4 Moving averagesTrend
Updated 2 months ago · MIT GitHub repository of Alertatron-KSM Demabot 2H

Kell + Minervini VCP

by mirkothepirko
2 stars

This price-chart indicator combines Oliver Kell moving-average phases with Minervini volatility contraction. It plots EMA 10, 20, 50 and 200 and can require the SMA 50, 150 and 200 trend template. It flags a wedge pop above EMA 10 after an EMA 20 cross, pullba

Indicator v6 TrendMoving averages
Updated 3 months ago · Custom licence GitHub repository of Kell + Minervini VCP
2 stars

This strategy plots on the gold price chart and combines stochastic, RSI, and three EMAs with ATR. Confirm buys and sells can require an M15 overbought or oversold rejection wick, a Fibonacci or EMA zone, and a no-chase distance from the fast EMA. Optional LSB

Strategy v5 Oscillators & momentumMoving averages
Updated 4 months ago · None stated GitHub repository of XAUUSD Strategy - Hook Trap Guard
2 stars

This overlay indicator maps a US equity day-trading framework of levels, trend, and patience candles onto the price chart. It plots 8 and 21 SMAs, higher-timeframe 200 SMAs, VWAP, the last five days of premarket highs and lows, and the 9:30–9:45 opening range.

Indicator v6 TrendMoving averages Repaints
Updated 6 months ago · None stated GitHub repository of Day Trading Strategy v2

ALGOX

by thino-dev
2 stars

ALGOX is a Pine Script v5 strategy that overlays SuperTrend, ATR bands, Heikin Ashi candles, EMA ribbons and an RSI table on the price chart. It generates long and short entries based on signal sensitivity settings with optional lower-timeframe or higher-timef

Strategy v5 TrendVolatility & bands Repaints
Updated 7 months ago · None stated GitHub repository of ALGOX

CT Reverse MACD Cross

by mushroom-men-Trading
2 stars

This indicator calculates and displays a Moving Average Convergence Divergence (MACD) oscillator alongside EMA and SMA signal lines and histograms in a separate pane. It offers reverse signal line calculations and detailed visual styling, including directional

Indicator v6 Oscillators & momentumMoving averages
Updated 9 months ago · None stated GitHub repository of CT Reverse MACD Cross

This strategy enters long positions on volume-backed breakout setups with moving average confirmation. It plots the 10, 50, 150, and 200 simple moving averages directly on the price chart. Users can select between three breakout modes: gap only, strict gap wit

Strategy v6 BreakoutMoving averages
Updated 10 months ago · MIT GitHub repository of Ede - Breakout Strategie (mit MA und ATR Exit)

EMA Trend Surfer

by nxtaiapp
2 stars

This multi-timeframe strategy identifies trend direction using fast and slow exponential moving averages from a higher timeframe while seeking trade entries on a lower timeframe. Trend signals are filtered using minimum EMA percentage separation, an optional A

Strategy v5 TrendMoving averages
Updated 11 months ago · MIT GitHub repository of EMA Trend Surfer

The AI SuperTrend x Pivot Percentile strategy combines SuperTrend trend following with KNN-based AI predictions, Pivot Percentile levels, and ADX/DMI filtering. SuperTrend indicators run on multiple higher timeframes with configurable lengths and factors, whil

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of AI SuperTrend x Pivot Percentile - 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