Pine Library · 3,064 open-source scripts

Free Moving Average Pine Scripts (page 63)

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 calculates a fast EMA, a slow EMA, and an ATR value to implement a trend-following trading model with cash position sizing. It enters long trades when the fast EMA crosses above the slow EMA. Positions are exited when the fast EMA crosses below t

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Cashflow Cash Costs

Session Wicks

by g-moe
3 stars

Session Wicks is a price-chart strategy that combines a Heikin Ashi weighted moving average, an RSI compared with its moving average, and a smoothed stochastic. Bullish and bearish states come from the Heikin Ashi average falling or rising and from RSI sitting

Strategy v5 Oscillators & momentumMoving averages
Updated 5 months ago · None stated GitHub repository of Session Wicks
1 stars

The PineForge Compass Partial Ladder strategy identifies trend-following opportunities using a fast and slow Exponential Moving Average (EMA) crossover. Upon entering a long position, the strategy manages risk and profit targets using Average True Range (ATR)

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Compass Partial Ladder

This indicator calculates the R-squared coefficient of determination between a chosen price source and its exponential moving average over a specified lookback period. It plots the resulting statistical fit score as an area curve in a separate pane, alongside

Indicator v6 TrendMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of R² Coefficient of Determination (RSQUARED)
1 stars

PineForge — Constellation Bands is a mean-reversion strategy displayed on the price chart. It calculates standard Bollinger Bands alongside price volatility. A long entry triggers when the close price crosses back above the lower band while remaining below the

Strategy v6 Mean reversionVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Constellation Bands
99 stars

This indicator implements John Ehlers' Swiss Army Knife as a second-order recursive filter and plots the result in a separate pane. A mode string selects EMA, SMA, Gaussian, Butterworth, smoother, high-pass, two-pole high-pass, band-pass, or band-stop coeffici

Indicator v6 Moving averagesOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of SAK: Swiss Army Knife Indicator

Squeeze Momentum

by g-moe
3 stars

This overlay indicator combines classic Bollinger Band and Keltner Channel squeeze detection with linear regression momentum and pivot-based support and resistance levels. It plots a long-term moving average filter and tracks squeeze compression and release co

Indicator v5 Volatility & bandsOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Squeeze Momentum
99 stars

The Savitzky-Golay Filter applies polynomial convolution to smooth price series while preserving features like local extrema better than simple moving averages. It calculates filter coefficients based on the selected window size and polynomial order, applying

Indicator v6 Moving averagesTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Savitzky-Golay Filter (SGF)
106 stars

Buy The Dips - MA200 Optimised is a mean-reversion strategy that measures short-term percentage price changes alongside a simple moving average trend filter. It opens long positions when price experiences a steep drop exceeding three percent while remaining ab

Strategy v4 Oscillators & momentumTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Buy The Dips - MA200 Optimised
99 stars

This indicator calculates the Schaff Trend Cycle and plots it in a separate pane. It subtracts a slow EMA from a fast EMA, applies a stochastic over the cycle length, smooths that result, and applies a second stochastic. A second-stage smoother then feeds opti

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Schaff Trend Cycle (STC)
3 stars

Supersaiyan Strategy is an overlay indicator that plots three exponential moving averages alongside the volume-weighted average price (VWAP). It computes a standard Moving Average Convergence Divergence (MACD) oscillator and prepares trend metrics based on EMA

Indicator v5 Moving averagesOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Supersaiyan Strategy
1 stars

The Pine Script strategy calculates fast and slow EMAs along with RSI and ATR on the price chart. It enters long positions when the configuration string matches trend confirmation, fast EMA crosses above slow EMA, and RSI exceeds a threshold. It exits on fast-

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Glyph String Regex
106 stars

This trend-following strategy identifies buying opportunities during bullish pullbacks on the price chart. It defines a bull market when the 50-period simple moving average trades above the 200-period moving average. Long entries trigger when the RSI drops bel

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Buy The Dips in Bull Market

Supertrend

by g-moe
3 stars

This strategy calculates trend direction using a multi-timeframe Supertrend formula based on ATR and median price, paired with RSI and Bollinger Band indicators. It enters positions when the Supertrend flips direction, plotting uptrend and downtrend bands with

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Supertrend
1 stars

This strategy plots a trend EMA and a working pullback limit on the price chart. It enters long only when flat, the EMA is rising, and close is above the EMA, placing a limit buy a set fraction of ATR below the EMA. If that trend condition fails while still fl

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Keystone Limit Pullback
3 stars

This indicator plots multiple moving averages directly on the price chart and identifies crossover entry and exit signals. It evaluates crossovers between a fast moving average and a slower baseline, requiring price bar direction confirmation to mark long and

Indicator v5 Moving averagesTrend
Updated 5 months ago · None stated GitHub repository of 2 EMA Cross 10 EMA
1 stars

The Kiln Power Efficiency strategy computes an EMA trend line and a squared displacement efficiency metric from price moves relative to ATR. It plots both on the price chart. The strategy enters long trades on EMA crossover above the trend when efficiency exce

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Kiln Power Efficiency
106 stars

This strategy executes trend-following breakout trades based on Donchian channels, moving average alignment, and long-term price extremes. It evaluates alignment across seven moving average periods alongside multi-period and yearly high or low filters. Long po

Strategy v4 TrendBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of BuyHigh-SellLow Strategy
3 stars

This strategy plots exponential moving averages of length 1, 15, and 21 on the price chart and also calculates a length-5 simple moving average. It enters long when the length-1 average crosses above the length-15 average and the close is above the previous cl

Strategy v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of 2 EMA cross 10 EMA Strategy
1 stars

This strategy enters long when the fast EMA crosses above the slow EMA and RSI exceeds the entry threshold. It closes when the fast EMA crosses under the slow EMA, RSI falls below the exit threshold, or the open position reaches the maximum hold bars. A stop s

Strategy v6 TrendOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Lattice Confirmed Pivot
3 stars

This overlay indicator plots ATR-based horizontal levels around the previous close of a selected higher timeframe. A trading-type input maps day, multiday, swing, position, and long-term modes to daily through yearly periods. It draws trigger bands from a perc

Indicator v5 Volatility & bandsSupport & resistance Repaints
Updated 5 months ago · None stated GitHub repository of ATR Levels + CALL/PUT

PineForge — Ledger History NA

by pineforge-4pass
1 stars

This strategy plots a smoothed historical price anchor on the price chart by averaging historical closing prices. It enters a long position when price crosses under an entry threshold set below the smoothed anchor. The trade closes when price crosses back abov

Strategy v6 Mean reversionMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Ledger History NA

BuyTheDip

by hasnocool
106 stars

BuyTheDip is a strategy script that identifies upward moving average alignments across multiple timeframes using SMA, EMA, HMA, RMA, VWMA or WMA types. It plots Bollinger Bands on the price chart and enters long positions when alignment scores reach 1 and pric

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of BuyTheDip

Bands Indicator

by g-moe
3 stars

This indicator plots multiple deviation bands around the volume-weighted moving average and standard deviation. Upper bands R-1 to R-6 and lower bands S-1 to S-6 appear at Fibonacci ratios of the deviation from the mid-line on the price chart. The mid-line is

Indicator v5 Volatility & bandsMoving averages
Updated 5 months ago · None stated GitHub repository of Bands Indicator
1 stars

This strategy trades long only on the price chart. It enters when a fast exponential moving average crosses above a slower one and sizes the next order from the last closed trade: the recovery quantity after a negative result and the full quantity otherwise. I

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Ledger Outcome Throttle

Bankai + DTEK

by g-moe
3 stars

Bankai + DTEK is an overlay indicator that combines Qualitative Quantitative Estimation (QQE) logic, trend coloring based on SuperTrend and CCI ATR, up to four customizable EMA clouds, and simplified TD Sequential signals. It plots multiple moving average clou

Indicator v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of Bankai + DTEK
2 stars

This strategy plots in a separate pane and tests a selected oscillator with one of six entry logics: moving average, moving-average crossover, zero cross, extremes, mean reversion, or take profit. Users scale and time-adjust one of three oscillators and can li

Strategy v4 Oscillators & momentumMoving averages
Updated 8 months ago · None stated GitHub repository of Oscillator Evaluator (Analysis tool)
1 stars

The PineForge — Meridian DMI Regime strategy evaluates trend direction and momentum using the Directional Movement Index, Average Directional Index, and an Exponential Moving Average. It enters long trades when +DI crosses above -DI, provided ADX exceeds the d

Strategy v6 TrendOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Meridian DMI Regime
106 stars

This strategy evaluates multiple MACD entry techniques on the price chart. It calculates standard or SMA-based MACD line, signal line, and histogram values, offering selectable trigger models including continuation crosses, reversal crosses, histogram zero cro

Strategy v4 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of BV's MACD SIGNAL TESTER

Bankai DXY

by g-moe
3 stars

Bankai DXY is a multi-component trend and signal overlay script that combines EMA clouds, moving average slope filters, Aroon filters, QQE signals, Supertrend, CCI-ATR trend rules, and simplified TD Sequential counts. It overlays dynamic EMA clouds on the main

Indicator v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of Bankai DXY

PMax Explorer

by regalouisei
2 stars

The PMax Explorer strategy calculates the Profit Maximizer indicator by applying an ATR trailing stop band to various moving average types including EMA, VAR, ZLEMA, and TSF. It plots the selected moving average and PMax line directly on the price chart to tri

Strategy v4 TrendMoving averages
Updated 8 months ago · None stated GitHub repository of PMax Explorer

PineForge — Mosaic Map Regime

by pineforge-4pass
1 stars

PineForge — Mosaic Map Regime is a trend-following strategy that dynamically scales trading signals using volatility regimes. It calculates an Exponential Moving Average and ATR, using a map to assign risk weights based on whether ATR percentage exceeds an exp

Strategy v6 TrendVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Mosaic Map Regime

The CDC Action Zone V.3 Test strategy calculates fast and slow exponential moving averages to generate trend-following buy and sell signals. It plots EMA lines, custom bar colors, buy and sell labels, and a visual ribbon directly on the main price chart. The s

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of CDC Action Zone V.3 Test ++Position Size Fix+Float

Bankai ES Trend

by g-moe
3 stars

Bankai ES Trend combines multiple trend and momentum tools into an overlay indicator on the price chart. It calculates moving average slope filters, Aroon trend conditions, QQE momentum signals, Supertrend levels, and multi-period EMA clouds. It plots trend ba

Indicator v5 TrendMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of Bankai ES Trend

PineForge — Orbit MTF Trend

by pineforge-4pass
1 stars

Orbit MTF Trend is a multi-timeframe strategy that plots higher-timeframe and local exponential moving averages on the price chart. It generates long entries on local EMA crossover above the higher EMA and closes positions on the reverse crossover. Risk manage

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Orbit MTF Trend
3 stars

This strategy combines two sets of Bollinger Bands with a Laguerre RSI oscillator plotted on the price chart. It generates buy and sell signals when price touches the upper or lower bands or zones. The strategy allows enabling or disabling entries and includes

Strategy v5 Mean reversionVolatility & bands
Updated 5 months ago · None stated GitHub repository of BB + LaRSI Strategy

PineForge — Prism Matrix Vote

by pineforge-4pass
1 stars

The PineForge Prism Matrix Vote strategy plots two EMAs on the price chart and calculates a vote score from four factors: EMA crossover, price above fast EMA, RSI above 52, and ATR relative to close. It enters long positions when the vote score crosses above a

Strategy v6 TrendOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Prism Matrix Vote
106 stars

This strategy plots a mapped EMA-and-standard-deviation difference in a separate pane and trades moving-average crossovers filtered by that line. After the 50-period EMA crosses the 200-period SMA, it waits for price to stay on the crossover side and for the m

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of EMA Difference Mapping with Trades
3 stars

Buy Low Sell High Composite is a pane oscillator that normalizes RSI, a short-versus-long EMA difference, the MACD histogram, and the Money Flow Index onto a shared scale, then sums them into one composite. It plots that composite as a colored area, the MACD s

Indicator v5 Oscillators & momentumMoving averages
Updated 5 months ago · None stated GitHub repository of Buy Low Sell High Composite
1 stars

This strategy enters one long position when a fast exponential moving average crosses above a slow one. While the trade is open, it keeps an ATR stop and target under the same exit identifier. For the first revision hold bars those distances stay wide; afterwa

Strategy v6 Moving averagesVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Revision Exit Replacement

Estrategia Booz

by hasnocool
106 stars

This strategy trades moving-average crossovers on the price chart. It buys when a fast exponential moving average crosses above a slow one in an uptrend, and sells on the opposite cross in a downtrend. An optional source average and a longer trend filter, each

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Estrategia Booz
99 stars

This indicator plots a Stochastic MACD in a separate pane. It measures the rolling high and low over a lookback, applies fast and slow exponential moving averages to the close, and normalizes each average against that range. The difference, scaled by 100, is t

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Stochastic MACD Oscillator (STMACD)

PineForge — Rivet Calc Fill

by pineforge-4pass
1 stars

This strategy identifies bullish trends using a fast EMA crossing above a slow EMA to enter long positions when no trade is open. Once entered it attaches a stop loss and limit order using ATR multiplied by the input values of 1.7 and 2.2 respectively. The fas

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Rivet Calc Fill

The Commodity Channel Index Custom indicator plots a customizable oscillator in a separate pane on the price chart. It calculates the CCI using a selected source such as HLC3 and a moving average method including SMA EMA or others. Main settings allow adjustin

Indicator v5 Oscillators & momentumMoving averages
Updated 5 months ago · None stated GitHub repository of Commodity Channel Index Custom

PineForge — Sextant CCI HMA

by pineforge-4pass
1 stars

PineForge — Sextant CCI HMA is a trend-following momentum strategy that combines the Commodity Channel Index with a Hull Moving Average filter. The strategy opens long positions when the CCI crosses above a specified entry level, provided the HMA is rising and

Strategy v6 TrendOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Sextant CCI HMA

Ezieh Str.v2

by hasnocool
106 stars

Ezieh Str.v2 is a momentum and volatility strategy combining Bollinger Bands with two distinct RSI periods to identify trading opportunities. It opens long positions when a fast RSI crosses above an oversold threshold while price crosses over the lower Bolling

Strategy v4 Oscillators & momentumVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Ezieh Str.v2
1 stars

This overlay strategy keeps a bounded deque of one-bar rate-of-change values and measures how many are positive and their average. It enters one long position of two units when the positive share rises through the minimum share, the average return is positive,

Strategy v6 Oscillators & momentumMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Spectrum Array Deque

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