Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 10)

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 stars

A price-chart overlay that draws a moving average channel from a higher timeframe. It computes the moving average of the high, close and low on a chosen timeframe of 1 hour, 4 hours, daily, weekly or monthly, and plots them as three red lines. Settings pick th

Indicator v5 Moving averagesTrend Repaints
Updated 4 years ago · None stated GitHub repository of Switch using an expression
1 stars

A multi-tool overlay that bundles several classic studies on one chart, each with its own on/off switch. These include a blended BBI moving average colored by position against price, four configurable EMAs, Bollinger bands, parabolic SAR, zigzag with fib level

Indicator v5 TrendMoving averages
Updated 4 years ago · MIT GitHub repository of Victorinox by Illupute v1

Eth Strategy

by samliu0206
1 stars

This script aggregates spot and perpetual futures price data across multiple cryptocurrency exchanges to calculate a volume-weighted futures premium index. It computes the log ratio between perpetual futures and spot prices, applies a user-selected moving aver

Strategy v4 Moving averagesMean reversion
Updated 4 years ago · None stated GitHub repository of Eth Strategy
1 stars

A multi-study overlay that plots a triple exponential moving average, short SMAs, EMAs at 9, 20, 50, 100 and 200, and an ATR band around an EMA midline. It shades the background when the 9 and 20 EMAs cross and when the CCI moves back through plus or minus 100

Indicator v5 Moving averagesVolatility & bands
Updated 4 years ago · None stated GitHub repository of TEMA + 9 EMA + ATR + CCI + WR

Leo Supertrend

by kodtodya
1 stars

Leo Supertrend calculates and plots a Supertrend indicator alongside an Exponential Moving Average on the main price chart. It determines trend direction by tracking price relative to an ATR-based volatility band, supporting both standard RMA and simple moving

Indicator v4 TrendVolatility & bands
Updated 4 years ago · None stated GitHub repository of Leo Supertrend
1 stars

This trend-following strategy overlays fast and slow Hull Moving Averages, Parabolic SAR, Chaikin Money Flow, a Volume Oscillator, and Heikin Ashi candle confirmation on the main price chart. Long entries occur when price and fast HMA are above the slow HMA, S

Strategy v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of KRJ Swing HMA Volume Sar HA
1 stars

This strategy builds trades from two configurable moving averages, each selectable from eleven types with its own source, length, offset and ALMA settings. Optional modules add RSI-based take profit and stop levels and an ATR comparison as confirmation, and it

Strategy v5 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of All Moving Average Strategy

The script calculates two exponential moving averages with 21 and 34 periods and plots them on the price chart. It fills the area between them in a color that changes from green to red based on whether the fast MA is above the slow MA. This creates support ban

Indicator v5 Moving averagesTrend Archived
Updated 4 years ago · MPL-2.0 GitHub repository of MehdiJangjou - BullMarket Support Type 2

Stoch Strat

by GoatGodXBT
1 stars

Stoch Strat is an overlay trading strategy that combines Stochastic Oscillator crossovers, MACD histogram momentum, and 50/100 Exponential Moving Averages for trend filtering. It generates long signals when Stochastic crosses up in oversold conditions while pr

Strategy v5 TrendOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Stoch Strat

MA+ADX+DMI

by fifiteen82726
1 stars

Plots a fast and a slow simple moving average on the price chart and shades the area between them. A buy highlight appears when the fast average crosses above the slow one while the positive directional index is above the negative and ADX is above a key level.

Indicator v4 TrendMoving averages
Updated 5 years ago · None stated GitHub repository of MA+ADX+DMI
1 stars

A Pine v4 overlay that draws a volume profile on the price chart. Volume over a lookback window is split into price bins and shown as horizontal bars, with an optional point of control line at the busiest level. Settings control lookback depth up to 1000 bars,

Indicator v4 VolumeSupport & resistance
Updated 5 years ago · None stated GitHub repository of Volume Profile + 3EMA

War Zone Control

by CriptomonedasRentables
1 stars

War Zone Control calculates a fast Exponential Moving Average (EMA) and a slow Weighted Moving Average (WMA) using the selected price source. It plots both moving averages directly on the price chart. When the fast EMA crosses above the slow WMA, it displays a

Indicator v4 TrendMoving averages
Updated 5 years ago · None stated GitHub repository of War Zone Control

MACD Rise and Fall

by RayRuizheLi
1 stars

This strategy calculates the MACD line and plots it as a colored histogram in a separate pane. Instead of traditional crossovers, it tracks consecutive rising or falling values on the MACD line. It enters long positions after a configurable number of consecuti

Strategy v4 Oscillators & momentumMoving averages
Updated 6 years ago · None stated GitHub repository of MACD Rise and Fall
1 stars

This indicator plots Bitcoin network hash-rate moving averages in a separate pane. It requests daily hash rate, applies a short and a long simple moving average, and can draw them as ribbons or as an oscillator. Optional markers show miner capitulation when th

Indicator v4 Moving averagesTrend Repaints
Updated 6 years ago · GPL-3.0 GitHub repository of Bitcoin Hash Ribbons
947 stars

Calculates the Corrected Moving Average (CMA) alongside a standard Simple Moving Average (SMA) over a specified period. The indicator dynamically adjusts the average based on sample variance and deviation from price. Both lines plot directly on the price chart

Indicator v6 Moving averagesTrend
Updated 11 days ago · GPL-3.0 GitHub repository of Corrected Moving Average
285 stars

Mean Reversion Study is an indicator that identifies trade setups combining exponential moving averages, RSI extremes, and engulfing candlestick patterns. It highlights bullish setups when a bullish engulfing candle forms below the EMA while RSI is oversold, a

Indicator v4 Mean reversionCandlestick patterns
Updated 3 years ago · None stated GitHub repository of Mean Reversion Study
257 stars

This strategy plots running pivot highs as red R circles and pivot lows as blue S circles directly on the price chart. It computes an EMA 3 and a Cto trend line from close prices, then generates long signals on upward EMA-Cto crossovers combined with price pos

Strategy v6 TrendMoving averages Repaints
Updated 6 weeks ago · None stated GitHub repository of Best Chart 1m Strategy Candle Bar

Deduct

by TaichiS
219 stars

This indicator displays moving average deduction reference points directly on the price chart. It plots dynamic labels on historical bars corresponding to short, medium, and long lookback periods, defaulted to 20, 60, and 120 bars. Each text label displays the

Indicator v4 Moving averagesSupport & resistance
Updated 5 years ago · None stated GitHub repository of Deduct
193 stars

This strategy calculates a chart-timeframe MACD oscillator alongside a higher-timeframe Simple Moving Average (SMA) trend filter using security requests. It triggers long signals when the MACD line crosses above its signal line while the higher-timeframe price

Strategy v6 TrendOscillators & momentum
Updated yesterday · Apache-2.0 GitHub repository of PineForge MTF Tutorial — HTF SMA Filter

Daily Trend Filter

by agutinbaigo28
147 stars

Calculates market regime conditions by combining RSI, MACD, and ADX/DMI indicators. It evaluates whether the market is in a strong bullish, strong bearish, neutral, or non-trending regime. The script plots a colored line overlaying the close price to reflect t

Indicator v5 TrendOscillators & momentum
Updated 6 weeks ago · MIT GitHub repository of Daily Trend Filter

Consolidation Filter

by capissimo
114 stars

Consolidation Filter identifies market indecision and sideways ranges characterized by low volatility. It computes a forecast oscillator variant comparing price against an exponential moving average or a McGinley dynamic across three selectable methods. When t

Indicator v5 Volatility & bandsMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of Consolidation Filter

200DMA last DOM - ajh

by hasnocool
106 stars

This strategy executes a long-only trend-following system based on a simple moving average, designed primarily for daily charts. It plots the moving average directly on the price chart and evaluates trading signals strictly on a user-defined day of the month,

Strategy v5 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of 200DMA last DOM - ajh
99 stars

The Absolute Price Oscillator (APO) script calculates the difference between a fast exponential moving average (EMA) and a slow EMA for a specified source series. It uses explicit EMA calculations featuring warmup compensation to handle early bar initializatio

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Absolute Price Oscillator (APO)

Hull Keltner Channel

by cryptorife
75 stars

Hull Keltner Channel calculates and plots a customized Keltner Channel overlaid directly on the price chart. It replaces the traditional moving average baseline with a Hull Moving Average variation, offering standard HMA, exponential EHMA, and triple THMA opti

Indicator v4 Moving averagesVolatility & bands
Updated 3 years ago · GPL-3.0 GitHub repository of Hull Keltner Channel

Get 20 SMA of Apple

by PythonForForex
64 stars

This indicator requests Apple's daily closing price and calculates a 20-period simple moving average of that series. It plots the moving average on the price chart as an overlay. There are no user inputs, so the symbol, daily timeframe, and length stay fixed i

Indicator v5 Moving averages
Updated 4 years ago · None stated GitHub repository of Get 20 SMA of Apple

Momentum Rider DAILY FINAL

by greenpeas007
58 stars

This strategy combines exponential moving averages (EMA 9, 21, 50), RSI, MACD, and Supertrend indicators to enter long positions. It triggers trades using six dynamic setups based on momentum breakouts, EMA crossovers, and pullbacks. Position sizing is compute

Strategy v6 TrendOscillators & momentum Repaints
Updated 4 months ago · Custom licence GitHub repository of Momentum Rider DAILY FINAL

Hash Ribbons

by oguzhandilber
47 stars

This indicator plots the Hash Ribbon metric by calculating 30-day and 60-day simple moving averages of Bitcoin network hash rate data. Designed for long-term market cycle analysis, it draws in a separate pane and displays hash ribbons alongside optional buy si

Indicator v4 Moving averagesTrend Repaints
Updated 5 years ago · None stated GitHub repository of Hash Ribbons

Trap Shorts - Hamza Naveed

by ProfHamzaNaveed
43 stars

This indicator tracks and visualizes cryptocurrency net positioning across multiple derivative exchanges, including Binance, BitMEX, and Kraken. It calculates aggregated net longs, net shorts, net delta, and ratio metrics, or an optional Position RSI, renderin

Indicator v5 VolumeOscillators & momentum
Updated 9 months ago · None stated GitHub repository of Trap Shorts - Hamza Naveed
43 stars

This overlay indicator monitors moving-average relationships for up to ten symbols. For each market it requests the close and three exponential moving averages from a user-chosen timeframe, defaulting to twelve hours, and builds a status for the faster-versus-

Indicator v6 Moving averagesScreeners & dashboards
Updated 1 year ago · None stated GitHub repository of Multi-Market MA Cross Monitor

This strategy executes trades based on pivot levels, an exponential moving average, and a multi-stage smoothing trend line. It identifies support and resistance points from pivot highs and lows, combining them with price relationship rules against a custom smo

Strategy v5 TrendMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of Binancash - Candle Strategy Futures on Binance

FVG RSI Strategy (Optimized)

by skywalker0803r
42 stars

This strategy plots on the price chart and trades fair value gaps filtered by RSI and two EMAs. It opens a long when a bullish gap, a rising candle, RSI below the oversold level, and price under both EMAs align, and a short on the opposite conditions. Each tra

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

Candle Stage Analysis

by ChartsLector
41 stars

This indicator classifies market trends into structured stages based on moving average alignments, compression, and ATR distance from the 50-period SMA. It tracks multiple exponential moving averages against the 50 SMA to detect basing phases, breakouts, trend

Indicator v6 TrendMoving averages
Updated 3 days ago · None stated GitHub repository of Candle Stage Analysis

CombinedBinHAndClucV8

by viktors1982
36 stars

This strategy trades on the price chart using multiple indicators. It enters long positions when price dips meet conditions on Bollinger Bands 40 and 20, RSI, MFI, volume and other thresholds. It exits at custom ROI profit levels based on RSI or after timeout

Strategy v4 Oscillators & momentumMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of CombinedBinHAndClucV8

Bitcoin Energy Value Oscillator

by thanhnguyennguyen
33 stars

This indicator estimates Bitcoin energy value from joules of mining energy input, supply growth, and a fiat factor, then plots that value as an oscillator in a separate pane. A simple moving average of the energy value is drawn using a user-set length in days.

Indicator v4 Oscillators & momentumMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of Bitcoin Energy Value Oscillator

This indicator calculates fast and slow moving averages based on predefined Fibonacci ratio pairs, such as 89/144 or 21/34, along with a combined Golden Ratio moving average. Users can choose from multiple weighting types, including Simple, Exponential, Runnin

Indicator v4 TrendMoving averages
Updated 5 years ago · Unlicense GitHub repository of [Pirate] Deconstructed FMAs + Crosses

BBfib

by modster
32 stars

This indicator plots Bollinger Bands on the price chart using a 15-bar simple moving average of ohlc4 as the basis line. It calculates upper and lower bands at one standard deviation multiplied by 1.12, plus additional outer levels at 1.5, 1.75, and 0.5 deviat

Indicator v4 Moving averagesVolatility & bands
Updated 3 years ago · None stated GitHub repository of BBfib
30 stars

This indicator simulates a crypto hedge-scalping grid in a separate pane and tracks cumulative profit after commission. It builds a short EMA and places four long grid levels plus one deeper short hedge level as percentages below that EMA. Equity shares of a U

Indicator v5 ScalpingMoving averages
Updated 2 years ago · Custom licence GitHub repository of Hedge Scalp - Cumulative Profit

The indicator calculates a triple-smoothed moving average and a corresponding signal line to identify trend direction and potential reversal points directly on the price chart. Users can select from EMA, SMA, RMA, or WMA for both the main triple smoothing and

Indicator v6 Moving averagesTrend
Updated 11 months ago · Custom licence GitHub repository of Triple Smoothed Signals [AlgoAlpha]

Bands

by heyphat
26 stars

This library exports a Band type and functions that build a simple-moving-average basis with upper and lower envelopes from standard deviation. It classifies a source as above, below, or inside those envelopes, measures band width, and scales an imported z-sco

Library v6 Volatility & bandsMoving averages
Updated 2 months ago · AGPL-3.0 GitHub repository of Bands

Bayesian BBSMA Oscillator

by tistaharahap
25 stars

This indicator calculates directional probabilities based on price position relative to Bollinger Bands and a simple moving average over a rolling lookback window. It computes breakup, breakdown, and combined prime probability percentages, plotting up to three

Indicator v4 Oscillators & momentumMoving averages
Updated 6 years ago · None stated GitHub repository of Bayesian BBSMA Oscillator

多空排列指标

by midoks
16 stars

This indicator plots four exponential moving averages of the close, with fixed lengths of 5, 15, 30, and 60, directly on the price chart. It marks a bullish alignment when the three faster averages are all above the 60-period average, and a bearish alignment w

Indicator v5 TrendMoving averages
Updated 3 weeks ago · Apache-2.0 GitHub repository of 多空排列指标
16 stars

This indicator calculates trend direction and market zones using exponential moving average crossovers combined with a secondary baseline. It identifies various bull and bear conditions based on the relative position of price and the fast and slow averages, co

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of CDC ActionZone V3 2020 + EMA
15 stars

This indicator overlays Bollinger Bands and smoothed HAMA candles directly on the main price chart. It calculates standard Bollinger Bands using a simple moving average and standard deviation, alongside custom smoothed open, high, low, and close values. A cent

Indicator v5 TrendMoving averages
Updated 4 months ago · Apache-2.0 GitHub repository of NSDT HAMA Candles with Bollinger Bands

PMA Strategy Idea

by QuantCT
14 stars

PMA Strategy Idea evaluates trend alignment using three exponential moving averages calculated on the typical price. It enters long when all three EMAs are concurrently rising over one bar, closing the position as soon as any EMA stops rising. Conversely, shor

Strategy v4 TrendMoving averages
Updated 5 years ago · Apache-2.0 GitHub repository of PMA Strategy Idea

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