Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 11)

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

CC Test

by saket3395
13 stars

This indicator plots an exponential moving average of the closing price on the price chart. A single length input, defaulting to 14, sets the EMA period. There are no signals, entries, exits, stops, or position sizing. The plotted series is drawn as a blue lin

Indicator v6 Moving averages
Updated 7 weeks ago · MIT GitHub repository of CC Test
13 stars

BitLa Microtendencias B008 is a Pine Script v5 strategy drawn on the price chart. It enters long when a 10-period EMA crosses over a 120-period EMA and enters short on the opposite cross. Optional percentage stop loss is on by default, while take profit, trail

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of BitLa Microtendencias B008

Bte Acc

by f-cksociety
11 stars

Bte Acc is a chart indicator form of the PineCoders Backtesting and Trading Engine. It seeks an entry trigger from a main or alternate entry method, then checks trade direction, filters, date range, ATR readiness, and remaining capital before filling on the ne

Indicator v5 TrendOscillators & momentum Repaints
Updated 4 years ago · MPL-2.0 GitHub repository of Bte Acc
10 stars

This indicator tracks macro market cycle phases by evaluating moving average interactions and a modified Mayer Multiple threshold. It monitors crossovers between a double 350-period simple moving average and a 111-period SMA for cycle-out conditions, alongside

Indicator v4 Moving averagesTrend
Updated 5 years ago · None stated GitHub repository of cycleOutToCycleInProgression
10 stars

This indicator calculates and plots two exponential moving averages of closing prices directly on the price chart. It detects crossovers between the shorter and longer periods and generates an alert condition whenever the two moving averages intersect. Users c

Indicator v4 Moving averagesTrend
Updated 5 years ago · GPL-3.0 GitHub repository of Chad's Alert EMAs (@tradeprophet)

Awesome Oscillator - Eterna MCP

by EternaHybridExchange
9 stars

This strategy implements Bill Williams' Awesome Oscillator (AO) calculated as the difference between two simple moving averages of the median price. It generates long and short entries using three classic signal triggers: zero-line crossovers, twin peaks diver

Strategy v5 Oscillators & momentumMoving averages
Updated 7 months ago · MIT GitHub repository of Awesome Oscillator - Eterna MCP

Scalping 3EMA

by rodrigo-brito
9 stars

This long-only strategy calculates three exponential moving averages with lengths of 50, 100, and 150 periods, plotting them directly on the price chart. It also calculates a 14-period RSI and MACD. The strategy opens long positions when the moving averages al

Strategy v4 TrendOscillators & momentum
Updated 5 years ago · MIT GitHub repository of Scalping 3EMA

Repanocha V4 Edited

by wocclyl
9 stars

This strategy plots a Tillson T3 average on the price chart and colors it by slope. It combines the T3 direction with a range filter, ADX, RSI, MACD and parabolic SAR to mark long and short entries, including optional unconfirmed signals. Positions can be rest

Strategy v4 TrendOscillators & momentum Repaints
Updated 7 years ago · MIT GitHub repository of Repanocha V4 Edited

5000x Breakout Scanner

by jmragsdale
8 stars

This indicator marks momentum breakouts on the price chart. A signal appears only when the bar makes a new high over the lookback, volume is at least a chosen multiple of the 20-bar average, the percentage change from the prior close meets a minimum, the close

Indicator v5 BreakoutVolume
Updated 7 weeks ago · None stated GitHub repository of 5000x Breakout Scanner
8 stars

This strategy calculates a StockCharts Technical Rank metric alongside an O'Neil-style relative strength rating, plotting both curves in a separate pane. It evaluates long-term, medium-term, and short-term exponential moving average deviations, rate-of-change

Strategy v5 Oscillators & momentumMoving averages
Updated 4 years ago · None stated GitHub repository of SCTR & ONeil + RSI strategy

Breaker Block

by muammeryldrm42
7 stars

The Breaker Block strategy identifies failed Smart Money Concepts (SMC) order blocks and trades their retests. It uses an ATR impulse condition to detect bullish and bearish order blocks, tracking when price breaks through them. When price retests a broken ord

Strategy v5 SMC / ICT / price actionTrend
Updated 3 months ago · MIT GitHub repository of Breaker Block

A trend-following strategy that combines Bollinger Bands, RSI momentum, triple exponential moving average alignment, and volume filters directly on the price chart. It calculates standard Bollinger Bands, RSI, three EMAs (50, 100, 200), and customized ranging

Strategy v6 TrendOscillators & momentum
Updated 4 months ago · None stated GitHub repository of Bollinger + RSI + SMA Trend Filter
7 stars

Custom EMA Crossover Strategy calculates two Exponential Moving Averages to identify trend direction on the main price chart. It enters a long position when the fast EMA crosses above the slow EMA during a specified backtest period. The strategy closes the lon

Strategy v6 Moving averagesTrend
Updated 5 months ago · None stated GitHub repository of Custom EMA Crossover Strategy
7 stars

This indicator serves as a starter template calculating an exponential moving average (EMA) directly on the price chart. It detects price crossovers relative to the moving average and plots green triangle-up markers when price crosses above, or red triangle-do

Indicator v6 Moving averagesTrend
Updated 9 months ago · None stated GitHub repository of Template Indicator
7 stars

This strategy combines Ichimoku Kinko Hyo components, a Stochastic oscillator, and specific candlestick patterns to generate trade signals. It identifies Kumo twists and range breakouts while evaluating candle body shapes using Fibonacci threshold filters. Tra

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · MIT GitHub repository of Soulevement / Ressaut Strategy
7 stars

This strategy evaluates market trend alignment across multiple timeframes by plotting a 90-period Simple Moving Average from the daily and 4-hour timeframes alongside a weekly VWAP directly on the price chart. Long trades are entered when the weekly VWAP cross

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

This Pine Script strategy combines Triple Exponential Moving Average, Bollinger Bands, and RSI to generate trading signals on the price chart. It plots the TEMA line along with the Bollinger Bands basis and outer bands. Long entries trigger when RSI crosses be

Strategy v5 Moving averagesVolatility & bands
Updated 4 years ago · GPL-3.0 GitHub repository of TEMA + Bollinger Bands Strategy

Input metadata

by pineforge-4pass
6 stars

This strategy declares many input types and plots a simple moving average of the chosen source in a separate pane. Length sets the average period and source selects the price series. Other inputs cover a numeric threshold, an enable flag, a long or short side,

Strategy v6 Moving averages
Updated yesterday · Custom licence GitHub repository of Input metadata

Bollinger Bands

by trsdn
6 stars

This indicator plots classic Bollinger Bands on the price chart. It calculates a simple moving average of the selected source over the chosen length, then places upper and lower bands at a multiple of the standard deviation around that basis. The basis, upper

Indicator v5 Volatility & bandsMoving averages
Updated 6 days ago · MIT GitHub repository of Bollinger Bands
6 stars

MarketMerge Data Panel is a Pine Script indicator that overlays a customizable data panel on price charts to display company fundamentals. It shows ratings including composite, RS, EPS, SMR, Acc/Dis, P/E, ROE and Minervini trend template checks. The panel pres

Indicator v6 Screeners & dashboardsMoving averages
Updated 8 months ago · MIT GitHub repository of MarketMerge Data Panel
6 stars

This strategy tracks momentum using an 8-period and 21-period Exponential Moving Average (EMA) crossover system. It enters long positions when the 8 EMA crosses above the 21 EMA and closes open long positions when the 8 EMA crosses below the 21 EMA. Each trade

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of TradersPost Example MOMO Strategy

Edge 59

by subos2008
6 stars

Edge 59 is a price-chart strategy that combines an ADX directional filter, a weighted moving average, and a trend-follower channel. The channel uses an exponential moving average of close, optionally smoothed by linear regression, and a percentage of a fixed 2

Strategy v5 TrendOscillators & momentum Repaints
Updated 2 years ago · Custom licence GitHub repository of Edge 59
6 stars

This indicator overlays three moving averages and a volume-weighted average price on the price chart. Each average can be shown or hidden, with default lengths of 20, 50 and 200. A single switch changes all three from simple to exponential averages. The VWAP u

Indicator v5 Moving averagesVolume
Updated 3 years ago · None stated GitHub repository of VOIDRLM Moving Averages

MTF trend alignment

by broomva
5 stars

This strategy plots the same-length exponential moving average on the chart and on two higher timeframes. It enters long when the chart average is above the first higher-timeframe average, that average is above the second, and price is above the chart average.

Strategy v5 TrendMoving averages
Updated yesterday · MIT GitHub repository of MTF trend alignment
5 stars

This strategy calculates fast and slow exponential moving averages to execute trend-following trades based on CDC ActionZone logic. It colors price bars across six conditions depending on price position relative to the fast and slow EMAs. Entries occur when th

Strategy v5 TrendMoving averages
Updated 2 weeks ago · MIT GitHub repository of Xsodus CDC ActionZone V3
5 stars

ChandraQuant Kala-Chakra is an overlay indicator for Indian equity indices. It calculates Sun and Moon ecliptic longitudes from Meeus periodic series, converts them to the sidereal zodiac with the Lahiri ayanamsa, and marks nakshatra changes, Purnima and Amava

Indicator v6 TrendMoving averages
Updated 7 weeks ago · MIT GitHub repository of ChandraQuant — Kāla-Chakra

PA Indicators

by forecho
5 stars

This indicator plots price action tools directly on the main price chart. It shades candles according to Internal Bar Strength (IBS) and optional wick-length thresholds to differentiate trend bars from trading ranges. The script tracks session bar counts durin

Indicator v6 Candlestick patternsMoving averages
Updated 8 weeks ago · None stated GitHub repository of PA Indicators

TradeKit

by tanishq-rocks
5 stars

TradeKit is an all-in-one technical analysis indicator that consolidates multiple chart overlays into a single script on the price chart. It plots up to four customizable moving averages (SMA, EMA, SMMA, WMA, or VWMA), Bollinger Bands, VWAP, and reference leve

Indicator v6 Moving averagesCandlestick patterns
Updated 3 months ago · MPL-2.0 GitHub repository of TradeKit

Double Smoothed Stochastic

by SiegerTerpstra
5 stars

This indicator calculates the Double Smoothed Stochastic oscillator and plots it in a separate pane below the price chart. It applies dual exponential smoothing to stochastic values to filter market noise while tracking momentum changes. Rising and falling val

Indicator v6 Oscillators & momentumMoving averages
Updated 9 months ago · None stated GitHub repository of Double Smoothed Stochastic

MACD+RSI

by Ahmed-GoCode
5 stars

This indicator plots a MACD line, signal line, and histogram together with a scaled RSI in a separate pane. MACD is the difference of fast and slow moving averages of the source, with an optional simple moving average instead of an exponential moving average f

Indicator v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of MACD+RSI

Custom AAVWAP

by ak2k2
5 stars

Custom AAVWAP is an indicator that automatically calculates and plots three Anchored Volume Weighted Average Price (AVWAP) series directly on the price chart. It locates the highest price, lowest price, and highest volume bars within a user-defined lookback pe

Indicator v5 VolumeSupport & resistance Repaints
Updated 3 years ago · MPL-2.0 GitHub repository of Custom AAVWAP

ADW - Momentum

by ADWilkinson
5 stars

This indicator calculates the Relative Momentum Index (RMI) and plots it in a separate pane alongside a smoothed exponential moving average line. It displays horizontal thresholds for overbought and oversold boundaries, plus a dashed centerline at 50. A colore

Indicator v5 Oscillators & momentumMoving averages
Updated 3 years ago · Custom licence GitHub repository of ADW - Momentum

This strategy draws on the price chart and defines a long setup when the 50-period EMA is above the 200-period EMA, price is above the faster EMA, RSI is below 50, and stochastic %K crosses above %D. Entries use a percentage of equity. Take profit and stop los

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

Greeffer's Scalping Strategy combines multi-timeframe Exponential Moving Averages, Bollinger Bands, and Donchian Channels to execute dip-buying trades directly on the price chart. It triggers long entries when price dips below both the lower Donchian Channel a

Strategy v5 Moving averagesVolatility & bands
Updated 4 years ago · None stated GitHub repository of Greeffer's Scalping Strategy
5 stars

This indicator calculates smoothed Heikin Ashi and typical price series to identify trend direction and generate directional signals. It derives synthetic Heikin Ashi values and applies multi-layered exponential and triple exponential moving average smoothing

Indicator v4 TrendMoving averages
Updated 5 years ago · MIT GitHub repository of Smoothed Heikin Ashi Signals

RSI+EMA+ST

by sawantuday
5 stars

This strategy overlays a fast EMA, a slow EMA, and a Supertrend line on the price chart. It opens a long when RSI is above 50, the fast EMA is above the slow EMA, and Supertrend direction is bullish, and only after 2010. It closes all positions when the fast E

Strategy v4 TrendOscillators & momentum
Updated 5 years ago · CC0-1.0 GitHub repository of RSI+EMA+ST

This strategy plots five simple moving averages on the price chart and trades crosses of price against the longest signal average. It enters long when the close crosses above the 150-period SMA and enters short when the close crosses below it, but only from th

Strategy v4 TrendMoving averages
Updated 6 years ago · LGPL-3.0 GitHub repository of 150MA Cross BuyAndSell Strategy [d3nv3r]
4 stars

This strategy executes trades on 5-minute index futures using Exponential Moving Averages, RSI, ADX, and volume filters across multiple timeframes. It supports trend pullback and VWAP reversion regimes with entry confirmation on breakout of prior high or low p

Strategy v6 TrendMean reversion
Updated 2 days ago · None stated GitHub repository of Lucid 100K Prop Bot (MES 5m)

Donchian Breakout

by latentwill
4 stars

This strategy enters long when the close is above an exponential moving average and RSI is above a threshold, and enters short when the close is below that average and RSI is below the threshold. A bearish signal also closes an open long. Exits use the stop an

Strategy v5 BreakoutOscillators & momentum Repaints
Updated 7 days ago · None stated GitHub repository of Donchian Breakout
4 stars

This strategy plots a fast and a slow simple moving average on the price chart and trades long only. It enters when the fast average crosses above the slow average and closes the position when the fast average crosses back below. There is no stop loss or take

Strategy v6 TrendMoving averages
Updated 2 weeks ago · MIT GitHub repository of SMA cross + TokIO check
4 stars

This indicator calculates and plots predicted future Bollinger Bands mid, upper, and lower lines for 300 bars ahead using linear extrapolation. It draws these prediction lines in a separate pane below the price chart. Users can adjust the prediction horizon in

Indicator v6 Volatility & bandsMoving averages Repaints
Updated 2 weeks ago · MIT GitHub repository of GOM BB Prediction (300 bars)
4 stars

This strategy executes trend-following trades based on exponential moving average crossovers filtered by a daily trend baseline. It calculates a fast EMA and a slow EMA alongside a daily 200 EMA fetched from a daily timeframe. When the fast EMA crosses above t

Strategy v5 TrendMoving averages
Updated 6 months ago · MIT GitHub repository of EMA Crossover 21/50 + Daily Filter

VT-Lite

by algoboy-kevin
4 stars

VT-Lite is a Pine Script v5 mean-reversion strategy that draws in a separate pane. It sizes equity-percent entries from a short-term EMA and ATR band distance, with a volatility EMA threshold and a choice of close, low, or ATR-band source. It can add reentries

Strategy v5 Mean reversionVolatility & bands
Updated 2 years ago · None stated GitHub repository of VT-Lite

AYDIN-FIBO V2

by Kalumur
4 stars

This indicator plots three EMAs with customizable lengths, narrow and wide Bollinger Bands, ALMA with adjustable offset and sigma, and multiple Fibonacci retracement levels on the price chart. It generates buy and sell signals on EMA5 crossing EMA13. Main sett

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of AYDIN-FIBO V2

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