Pine Library · 3,035 open-source scripts

Free Oscillator and Momentum Pine Scripts (page 63)

Open-source Pine scripts that measure momentum: RSI and MACD variants, stochastics, CCI, multi-timeframe oscillators and momentum strategies.

Pine scripts3,035
Code shown here1,673open licence
Updated in a year1,920
No repaint flag2,652

Oscillators & momentum: Indicators, Strategies and Libraries

99 stars

This indicator calculates the Stochastic Oscillator and plots it in a separate pane. Percent K is the close position within the highest high and lowest low over the K length, scaled from 0 to 100. Percent D is a simple moving average of percent K over the D sm

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Stochastic Oscillator (STOCH)
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
99 stars

This indicator calculates the Stochastic RSI oscillator, which applies the Stochastic formula to a Relative Strength Index series to measure momentum. It computes an RSI value, tracks its rolling high-low range, and calculates smoothed %K and %D lines using cu

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Stochastic RSI (STOCHRSI)

DeMark 9

by g-moe
3 stars

This indicator tracks Tom DeMark Sequential setup counts by comparing the current close against the close four bars prior across up to six configurable timeframes. It signals potential trend exhaustion or reversal points when counts reach specified milestones,

Indicator v5 TrendOscillators & momentum Repaints
Updated 5 months ago · None stated GitHub repository of DeMark 9

Golden Buy

by hasnocool
106 stars

This strategy runs on the price chart under the title golden buy. It sets cash order size and a percent commission. Traders adjust an ATR stop-loss multiplier and a risk-reward ratio, and they can enable shorts or divergence filters. The visible inputs configu

Strategy v4 Oscillators & momentumDivergence
Updated 2 years ago · GPL-3.0 GitHub repository of Golden Buy
1 stars

This strategy computes the MACD with user-defined fast, slow, and signal lengths, then plots the MACD line, signal line, and histogram in a separate pane. It generates long entries on MACD crossover and short entries on MACD crossunder, but restricts signals t

Strategy v6 Oscillators & momentumSessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of PineForge — Waypoint Weekday MACD
106 stars

This strategy enters long trades based on standard Stochastic oscillator conditions combined with a 60-minute higher-timeframe trend filter. It opens positions when lower-timeframe Stochastic %D is below a buy threshold and both lower and higher-timeframe %D l

Strategy v4 Oscillators & momentum Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of IK 60-15 Stochastic Strategy

This indicator calculates Time Segmented Volume (TSV) by accumulating price-change weighted volume over a specified window. It plots TSV as a colored histogram alongside its simple moving average signal line and a secondary 20-period moving average in a separa

Indicator v5 VolumeOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Enhanced Time Segmented Volume

GAIN28

by g-moe
3 stars

This indicator calculates an impulse momentum value by summing candle body differences (close minus open) divided by the minimum tick over a user-defined period. On the most recent bar, it draws forward projection lines into future time coordinates using timef

Indicator v5 Oscillators & momentumMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of GAIN28

Hercules Srategy

by g-moe
3 stars

This strategy detects momentum breakouts identified as lightning candles where the absolute candle body size exceeds a user-defined tick threshold. It enters long positions on large bullish candles and short positions on large bearish candles, with an option t

Strategy v5 BreakoutOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Hercules Srategy

TD Sequential (TD_SEQ)

by mihakralj
99 stars

TD Sequential calculates Tom DeMark's exhaustion counting system to identify potential trend reversals. It operates in two phases: Phase 1 Setup tracks consecutive price comparisons against historical closes up to a 9-count, while Phase 2 Countdown tracks non-

Indicator v6 Oscillators & momentumTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of TD Sequential (TD_SEQ)
3 stars

Ichimoku Cloud Weight calculates an aggregated quantitative score based on multiple Ichimoku Cloud components from a chosen timeframe. It assigns weighted bullish and bearish points to Tenkan and Kijun crosses, price and Kijun crosses, Kumo breakouts, Senkou S

Indicator v5 TrendOscillators & momentum Repaints
Updated 5 months ago · None stated GitHub repository of Ichimoku Cloud Weight

Regex String Filter

by pineforge-4pass
1 stars

Calculates RSI and MACD indicators to evaluate trade signals parsed dynamically from an input text rule string. It uses regular expression matching to determine whether an RSI threshold rule, a MACD bullish signal line rule, or both must be satisfied. When all

Strategy v6 Oscillators & momentumTrend
Updated 6 days ago · Apache-2.0 GitHub repository of Regex String Filter

RSI 14 Cross 50

by pineforge-4pass
1 stars

A minimal strategy that trades the 14-period RSI crossing the 50 midline. It enters long when RSI crosses up through 50 and short when it crosses down through 50, reversing the position on each opposite signal so only one direction is held at a time. It has no

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of RSI 14 Cross 50
99 stars

This indicator calculates the third finite difference, or jerk, of a selected data series. By applying binomial expansion coefficients across four consecutive bars, it measures the rate of change of price acceleration. Users can customize the source input seri

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Third Derivative / Jerk (JERK)

RSI EMA Signal

by pineforge-4pass
1 stars

A strategy that smooths the RSI with an EMA and trades crossovers between the two. It enters long when RSI crosses above its signal line while RSI is below 50, and short when RSI crosses below its signal while RSI is above 50. RSI length and signal length are

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of RSI EMA Signal

This strategy overlays buy and sell signals on the price chart by combining selectable RSI conditions, ADX trend rules, and EMA pullback filters. Users can configure the RSI mode, toggle global EMA trend filtering, enforce EMA pullback requirements, and limit

Strategy v4 TrendOscillators & momentum Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of SirPoggy Simple and Effective RSI Strategy
99 stars

This indicator calculates the Triple Exponential Average oscillator as the percentage rate of change of a triple exponential moving average of the chosen source. It plots the resulting series as a single line in a separate pane. The period input sets the smoot

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Triple Exponential Average (TRIX)

RSI MACD Combined State

by pineforge-4pass
1 stars

A minimal strategy that stays long while two conditions hold together: a 14-period RSI above 50 and the MACD line above its signal line, using 12, 26 and 9 settings. When either condition fails, it closes the long position. It never goes short, has no adjustab

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of RSI MACD Combined State

Spread Entry Strategy

by hasnocool
106 stars

This strategy overlays bull and bear setup filters on the price chart. It compares a reference symbol, QQQ by default, on the daily timeframe with hot and cool percent-change levels, then combines RSI, DMI, three simple moving averages, Bollinger Bands, and Ke

Strategy v4 TrendOscillators & momentum Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Spread Entry Strategy
99 stars

Calculates the True Strength Index oscillator and its exponential moving average signal line using custom double-smoothing on price momentum and absolute momentum. The indicator measures trend strength and direction by normalizing smoothed price variations, pl

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of True Strength Index (TSI)

RSI with Bollinger Bands

by pineforge-4pass
1 stars

Calculates the Relative Strength Index (RSI) and wraps Bollinger Bands directly around the RSI series rather than price. It enters long positions when the RSI drops below its lower band and hooks back upward, and enters short positions when the RSI exceeds the

Strategy v6 Oscillators & momentumVolatility & bands
Updated 6 days ago · Apache-2.0 GitHub repository of RSI with Bollinger Bands
106 stars

This strategy evaluates trade entries by combining Stochastic RSI crossovers with MACD momentum and three exponential moving averages (8, 15, and 50 EMAs). Positions are filtered by directional alignment across indicators and date ranges. Exits are managed via

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Stoch RSI Crossover Strat + EMA

Stochastic

by hasnocool
106 stars

This strategy combines a smoothed stochastic oscillator with three exponential moving averages. It opens a long position of 1000 units when the stochastic K line crosses above D and the 5-period and 15-period EMAs both cross above the 50-period EMA. It closes

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Stochastic

This strategy demonstrates how to place and cancel pending stop orders with syntax formatted for MT4 and MT5 webhook bridges. It generates entries using a smoothed Stochastic oscillator crossover and crossunder. Stop orders are placed at a configurable tick di

Strategy v4 Oscillators & momentumSupport & resistance
Updated 2 years ago · GPL-3.0 GitHub repository of TradingView Alerts to MT4 MT5 example with cancelling pending orders

TTM Wave

by mihakralj
99 stars

This indicator plots six MACD histogram channels from exponential moving averages. Fast period is eight and the signal period equals each Fibonacci slow period: 34, 55, 89, 144, 233, and 377. Wave A shows short-term momentum, Wave B medium-term, and Wave C lon

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of TTM Wave
3 stars

This indicator plots classic On Balance Volume in a separate pane. It accumulates volume according to the sign of each close change, then overlays a smoothing moving average. Users choose the average method among SMA, EMA, RMA, WMA, and VWMA, set its length, a

Indicator v5 VolumeOscillators & momentum
Updated 5 months ago · None stated GitHub repository of On Balance Volume

Session ispremarket NASDAQ gate

by pineforge-4pass
1 stars

This strategy evaluates premarket session activity on equity markets like NASDAQ. During premarket hours, it enters a long position whenever an intraday candle closes higher than its open price. Once the regular market session opens, the strategy automatically

Strategy v6 Sessions & timeOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of Session ispremarket NASDAQ gate

XAG strategy 1h

by hasnocool
106 stars

This overlay strategy is aimed at silver and combines a length-based simple moving average with a MACD-style histogram. Inside a user-set date window it looks for bullish or bearish candles aligned with the average and a rising or falling histogram. One mode a

Strategy v4 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of XAG strategy 1h

PSAR

by g-moe
3 stars

This indicator plots the Parabolic SAR (PSAR) on the price chart combined with Relative Strength Index (RSI) momentum filters. It calculates SAR dots and triangle markers to display trend direction. When a PSAR trend reversal occurs alongside confirmation from

Indicator v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of PSAR

Slow Stochastic Cross

by pineforge-4pass
1 stars

A strategy based on the slow stochastic oscillator. Raw %K is smoothed into slow %K and then averaged into %D, with adjustable lengths. It enters long when slow %K crosses above %D while below 80, and short when it crosses below %D while above 20, reversing th

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of Slow Stochastic Cross

Ultimate Oscillator

by mihakralj
99 stars

This indicator calculates the Ultimate Oscillator from buying pressure and true range over three lookback windows. It weights the fast, medium, and slow averages, defaulting to periods of 7, 14, and 28 with weights of 4, 2, and 1, then plots the result on a 0

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Ultimate Oscillator

QQE Glaz

by g-moe
3 stars

This indicator calculates a Quantitative Qualitative Estimation (QQE) variant and plots it in a separate pane. It computes an EMA-smoothed RSI alongside a double Wilder-smoothed ATR of that RSI. From these, it creates fast and slow trailing stop bands based on

Indicator v5 Oscillators & momentumTrend
Updated 5 months ago · None stated GitHub repository of QQE Glaz

Stochastic RSI

by pineforge-4pass
1 stars

This strategy calculates a smoothed Stochastic RSI oscillator and generates trading signals based on overbought and oversold crossovers. It opens a long position when the %K line crosses above %D while below the oversold threshold, and enters short when %K cro

Strategy v6 Oscillators & momentumMean reversion
Updated 6 days ago · Apache-2.0 GitHub repository of Stochastic RSI

Velocity (VEL)

by mihakralj
99 stars

Velocity (VEL) measures the zero-lag rate of price change smoothed using a Jurik Moving Average (JMA) algorithm. It calculates the raw difference between the current price and the price from a specified lookback period, then applies adaptive JMA smoothing to r

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Velocity (VEL)

Supertrend ADX Filter

by pineforge-4pass
1 stars

The Supertrend ADX Filter strategy calculates Supertrend direction and ADX strength to generate trend signals. It plots the Supertrend line on the price chart in green for bullish and red for bearish. Long entries trigger on Supertrend direction change to bull

Strategy v6 TrendOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of Supertrend ADX Filter

RSI Strategy

by g-moe
3 stars

The RSI Strategy calculates the Relative Strength Index with a user-defined length. It generates long entries on crossover above the oversold threshold and short entries on crossover below the overbought threshold. The strategy overlays signals directly on the

Strategy v5 Oscillators & momentumMean reversion
Updated 5 months ago · None stated GitHub repository of RSI Strategy

Vortex Indicator

by mihakralj
99 stars

This indicator calculates and plots the positive and negative Vortex Indicator lines, VI+ and VI-, in a separate pane alongside a neutral reference line at 1.0. It uses circular buffers and running sums to compute true range and directional vortex movement eff

Indicator v6 TrendOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Vortex Indicator
1 stars

This strategy evaluates intraday trading execution for US equities during regular trading hours while handling overnight gaps. It calculates a 14-period Relative Strength Index (RSI) across price history without daily resets. Trades are gated by the market ses

Strategy v6 Oscillators & momentumSessions & time
Updated 6 days ago · Apache-2.0 GitHub repository of Symbol Equity RTH + Overnight Gaps AAPL

TArec_p02_UNT

by pineforge-4pass
1 stars

The strategy tests untested TA classes including ALMA, SAR and rolling correlation under bar magnifier. It enters long only when ALMA crosses above close, SAR flips below price and 20-period correlation of close and volume is positive. It exits long when SAR f

Strategy v6 TrendOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of TArec_p02_UNT

SHORT eMACD

by g-moe
3 stars

SHORT eMACD is a short-only strategy that evaluates bearish momentum using MACD crossunders, exponential moving averages (EMA), and consecutive candle filters. It offers five configurable entry modes combining MACD signals and custom EMA candle logic. Users ca

Strategy v5 TrendOscillators & momentum Repaints
Updated 5 months ago · None stated GitHub repository of SHORT eMACD

Torque TSI Signal

by pineforge-4pass
1 stars

A long-only strategy built on the True Strength Index smoothed by an RMA signal line, shown in a separate pane with a minimum strength line. It enters long when the index crosses above its signal, exceeds a minimum strength and price is above a trend EMA. It e

Strategy v6 Oscillators & momentumTrend
Updated 6 days ago · Apache-2.0 GitHub repository of Torque TSI Signal
99 stars

This indicator calculates the Cumulative Distribution Function (CDF) of the Weibull distribution based on min-max normalized price source data over a chosen lookback period. It transforms the normalized price value using adjustable shape (k) and scale (λ) para

Indicator v6 Oscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Weibull Distribution CDF

TSI Signal Cross

by pineforge-4pass
1 stars

A minimal strategy that compares the True Strength Index, with fixed 25 and 13 lengths, to a 13-period EMA of itself. It enters long when the index crosses above the average and short when it crosses below, reversing the position each time. It has no adjustabl

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of TSI Signal Cross

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