Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 53)

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

This strategy evaluates a multi-timeframe moving average setup by requesting a 6-period exponential moving average computed on a monthly calendar timeframe. It operates directly on the price chart and triggers trade executions when the current bar close crosse

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of PF MTF Isolate - Monthly EMA(6) Cross
1 stars

This indicator projects cyclical wave paths and moving averages directly onto the price chart based on two user-defined reference anchor points. It derives a base cycle length from the time difference between the anchors and scales a second period using the 1.

Indicator v5 Moving averagesSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Fibo Wave MA - Auto Path (Plot)
1 stars

A Pine v4 strategy that plots a 21-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of YFIXBT EMA Cross Strategy
114 stars

This indicator plots two Hull moving average variants on the price chart and colors them by which line is above the other. When the Kahlman option is on, both averages pass through a simple Kahlman-style smoother controlled by the gain setting. Optional labels

Indicator v4 TrendMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of Hull Trend with Kahlman

MACD Strategy

by TWODS-CAPITAL
37 stars

This strategy plots on the price chart and builds a MACD line as the difference between a fast and a slow exponential moving average of close, then smooths that line into a signal. The histogram is their difference. It opens a long when the histogram crosses a

Strategy v5 Oscillators & momentumMoving averages
Updated 3 years ago · MIT GitHub repository of MACD Strategy
13 stars

This strategy combines Noro Trend Ribbon directional shifts with High and Low moving average price corridors and ADX momentum filtering. It evaluates market strength using configurable ADX key levels to filter trades during choppy or weak trend conditions. Use

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon F005
1 stars

PF MTF probe - weekly SMA(10) cross is a multi-timeframe trend-following strategy designed to test weekly moving average interactions. It calculates a 10-period Simple Moving Average on a weekly timeframe using request.security without lookahead bias. When the

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of PF MTF probe - weekly SMA(10) cross

RSI Reversal

by GammaExpansion
1 stars

This long-only strategy calculates an RSI and a long exponential moving average. It enters when RSI crosses above the oversold level while price is above the trend average and no position is open. It closes when RSI crosses the midline or a mirrored overbought

Strategy v6 Oscillators & momentumMoving averages
Updated 7 days ago · MIT GitHub repository of RSI Reversal
1 stars

Fibo Wave MA - Auto Path (Plot) is an overlay indicator that projects Fibonacci-based wave structures and moving averages onto the price chart. The script calculates a wave period from two user-selected interactive anchor points and generates a secondary movin

Indicator v5 Moving averagesSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Fibo Wave MA - Auto Path (Plot)
1 stars

A swing strategy on the price chart that takes long signals when a 9 EMA crosses above a 21 EMA with RSI above 50, and shorts on the opposite cross. An optional multi-timeframe filter checks a weekly EMA trend and four-hour RSI momentum before accepting a sign

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign Adv Swing
1 stars

Plots a double-smoothed Bressert stochastic in a separate pane, built from %K and %D lines whose smoothing type can be chosen from a long list of moving averages such as DEMA, EMA, zero-lag variants and Hull-style averages. A second line pair with its own leng

Indicator v5 Oscillators & momentumMoving averages
Updated 6 months ago · None stated GitHub repository of DSS Bressert Stochastic MTF
1 stars

A Pine v4 strategy that plots a 33-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of ZECBTC EMA Cross Strategy
114 stars

This strategy plots two Hull Moving Average variations on the main price chart, optionally smoothed with an adaptive Kalman filter algorithm. It enters long positions when the faster moving average crosses above the slower moving average and enters short posit

Strategy v4 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Hull Trend with Kahlman Strategy

Boftei's Strategy

by hasnocool
106 stars

Boftei's Strategy plots the difference between the log of the current close and the close a chosen number of bars earlier in a separate pane. It draws positive and negative histogram bars, a thin line of the same value, and dotted threshold lines. Crosses of t

Strategy v5 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Boftei's Strategy
13 stars

This strategy evaluates market trend direction using a Noro TrendRibbon and creates a price corridor based on recent moving-average extremes, plotting directly on the price chart. It executes long entries when price dips below the corridor during an upward tre

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon G004

Triangular Moving Average (TRIMA)

by mushroom-men-Trading
2 stars

The Triangular Moving Average (TRIMA) indicator calculates a double-smoothed moving average that places greater weight on the middle values of the chosen lookback period. It dynamically generates a triangular weighting array to smooth price fluctuations and fi

Indicator v6 TrendMoving averages
Updated 9 months ago · None stated GitHub repository of Triangular Moving Average (TRIMA)
1 stars

Fibo Wave MA - Auto Path Plot is an indicator that calculates and plots base moving averages along with Fibonacci-extended moving averages on the price chart. Users define a custom wave period by setting start and end times t1 and t2, with an adjustable center

Indicator v5 Moving averagesSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Fibo Wave MA - Auto Path Plot
1 stars

A strategy that enters on a 9 and 21 EMA crossover, optionally confirmed by RSI above 40 for longs or below 60 for shorts. Trades must agree with a 200 EMA market filter and a weekly 20 EMA taken from the previous completed week. Position size is set so the di

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign Advanced Swing
114 stars

This indicator plots a trend-following band directly on the price chart by comparing two variations of the Hull Moving Average, with an optional Kahlman filter applied to both. Line A calculates a standard Hull MA on selected price data, while Line B calculate

Indicator v4 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Hull-Kahlman Trend with Alerts
13 stars

This strategy pairs the Noro Trendribbon directional filter with price corridors formed by high and low moving averages. In an uptrend, it initiates long trades when price pulls below the upper band corridor, while in a downtrend it enters short positions when

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon H005
3 stars

Hercules Indicator 1.7 is a multi-filter trade signal generator designed to overlay entry conditions directly on the price chart. It evaluates engulfing candle patterns alongside multiple configurable filters, including trading session windows (Sydney, Tokyo,

Indicator v5 Candlestick patternsSessions & time
Updated 5 months ago · None stated GitHub repository of Hercules Indicator 1.7
1 stars

This strategy calculates fast and slow exponential moving averages alongside the Average Directional Index. It plots both moving averages on the price chart and displays an on-screen table tracking trend strength, directional bias, and volatility. A long posit

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Tn Sovereign ADX Trend

JMA-HMA-based Scalper

by capissimo
114 stars

This price-chart indicator builds a fast-minus-slow Jurik moving average of the selected price and wraps that series in upper and lower bands set by a standard-deviation multiplier and the fast lookback. It reads band direction, whether both bands rise or fall

Indicator v4 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of JMA-HMA-based Scalper
13 stars

A trend-following strategy that combines the Noro TrendRibbon direction filter with high and low moving average corridors. It determines the dominant market direction from the trend ribbon and opens positions when price moves outside the corridor, taking long

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon I002

PF MTF probe 03 — 60m SMA(20)

by pineforge-4pass
1 stars

The strategy computes the 20-period SMA on the 60-minute timeframe using request.security to obtain the HTF series. It generates long signals on SMA crossovers where the HTF close crosses above the SMA from below and exits long positions on downward crossovers

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of PF MTF probe 03 — 60m SMA(20)

TN Sovereign Audit

by raybird
1 stars

A strategy on the price chart that scores each bar from 0 to 4 using four checks: volume against its average, price against a higher-timeframe EMA, bar movement against an ATR noise level, and a fast EMA above a slow EMA. The score maps to signal grades, and a

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign Audit

McGinley Dynamic

by TWODS-CAPITAL
37 stars

This indicator plots the McGinley Dynamic as a single line on the price chart. It seeds the line with an exponential moving average of the close, then updates each bar by adding a fraction of the gap between price and the previous value. That fraction depends

Indicator v5 Moving averages
Updated 3 years ago · MIT GitHub repository of McGinley Dynamic
13 stars

This strategy detects long and short signals from the Noro TrendRibbon ribbon side change. It draws a corridor from recent high and low prices on the chart. When price falls below the corridor on long signals it opens long positions sized to a percentage of co

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon J009
3 stars

Hercules Strategy 1.7 is a price-chart strategy that gates trades with an engulfing-candle option, a lightning tick threshold, and a choice of long, short, or both directions. It can invert signals and stop the next trade from repeating the same side. Sydney,

Strategy v5 Candlestick patternsSessions & time
Updated 5 months ago · None stated GitHub repository of Hercules Strategy 1.7
2 stars

This indicator adapts the built-in TradingView volume tool by adding extended visualization options in a separate pane. It plots volume columns colored by price direction relative to the open or previous close, alongside a simple moving average of volume. An o

Indicator v5 VolumeMoving averages
Updated 8 months ago · None stated GitHub repository of Adapting a built-in [PineCoders]
1 stars

This indicator plots a ribbon of seven exponential moving averages based on Fibonacci lengths (8, 13, 21, 34, 55, 89, and 144) directly on the price chart. It calculates volume-weighted distance gaps between consecutive moving averages normalized against a 50-

Indicator v5 Moving averagesTrend
Updated 7 weeks ago · None stated GitHub repository of Fibonacci Volumetric MA Ribbon
106 stars

This strategy plots a 20-period Bollinger Band and a 9-period EMA on the price chart. It opens a long when the prior close is below the lower band and the current candle is bullish, and a short when the prior close is above the upper band and the current candl

Strategy v5 Volatility & bandsMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Bands + EMA 9

Example 4

by be-thomas
65 stars

This indicator smooths each of the open, high, low and close series with a simple moving average and plots those four values as candles. A user-defined function applies the same length to every price component, then plotcandle draws the result in a separate pa

Indicator v4 Moving averages
Updated 6 days ago · GPL-3.0 GitHub repository of Example 4

Median

by TWODS-CAPITAL
37 stars

The Median indicator calculates the median of a selected source series such as the high-low average over a user-defined length and plots it as a red line on the price chart. It draws an EMA of the median as a blue line and fills the space between them, changin

Indicator v5 Moving averagesVolatility & bands
Updated 3 years ago · MIT GitHub repository of Median
13 stars

This strategy uses Noro TrendRibbon direction to set a long or short bias, then opens a trade when price leaves a high-low corridor built from recent candles. A long opens below the corridor in a long bias, and a short opens above it in a short bias, sized fro

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon Ladder

Tn Sovereign CCI v6

by raybird
1 stars

This strategy draws on the price chart and trades a fast and slow Commodity Channel Index against an exponential moving average regime. It enters long when the fast CCI crosses above the lower extreme, the slow CCI is already above that level, and price is abo

Strategy v6 Oscillators & momentumMoving averages
Updated 2 months ago · None stated GitHub repository of Tn Sovereign CCI v6

ta

by ivansoft
1 stars

Provides a collection of technical analysis calculation functions for use across Pine scripts. It exports implementations for various indicators and mathematical formulas, including oscillators like the Awesome Oscillator, Aroon, and Schaff Trend Cycle, moving

Library v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of ta
106 stars

This strategy trades breakouts beyond Bollinger Bands on the main price chart. It features optional trend filters using various moving average types, a volatility filter based on standard deviation relative to its moving average, and a daily rate-of-change fil

Strategy v5 BreakoutVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Bands - Breakout Strategy

This strategy connects TradingView signals to Zignaly crypto trading platform with risk management. It plots a Noro TrendRibbon on the price chart to generate trend signals for entries. Long and short positions open based on ribbon conditions using specified M

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon Laddered C001

This indicator plots a double-smoothed Supertrend baseline on the price chart, combining a Supertrend midline with WMA and EMA smoothing to show trend direction. Direction uses an ATR-scaled baseline slope with hysteresis, while percentile-ranked slope magnitu

Indicator v6 TrendMoving averages
Updated 3 days ago · MIT GitHub repository of Smooth Trend Radar [WavesUnchained]
1 stars

This strategy adapts the Chandelier Exit indicator to build a trend-following system with added audit filters. It calculates trailing stop levels using ATR and highest highs or lowest lows to determine directional shifts. Entries are filtered through a long-te

Strategy v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of Tn Sovereign Chandelier
261 stars

This indicator plots multiple auto-multiplying Keltner Channels across different lookback lengths (5, 10, 25, 50, 100, and 200 periods) directly on the main price chart. It calculates exponential moving averages and range-based band offsets, dynamically adjust

Indicator v4 Volatility & bandsMoving averages
Updated 4 years ago · None stated GitHub repository of [RS] Simple Forecast - Keltner Worms
114 stars

Calculates normalized reversal metrics across up to ten Forex currency pairs using user-selected moving average methods, including HarmonicMA, EMA, SMA, or WMA. The indicator identifies overbought, oversold, and mean-crossing conditions using a configurable th

Indicator v4 Screeners & dashboardsMean reversion
Updated 1 year ago · None stated GitHub repository of Multi-Pair Trend Reversal Widget
13 stars

Ruckard Noro TrendRibbon N003 is a trend-following strategy designed to generate long and short trade signals based on side changes in the Noro Trendribbon indicator. It calculates upper and lower moving average corridors alongside ADX smoothing to identify ch

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon N003

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