Pine Library · 3,035 open-source scripts

Free Oscillator and Momentum Pine Scripts (page 18)

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

1 stars

A strategy that uses the underlying stock as a timing proxy for buying around 21-day at-the-money call options. A symbol profile preset selects gates and a higher timeframe. Entries depend on a volume profile value area, a swing VWAP, MACD Heikin-Ashi and a sq

Strategy v6 Oscillators & momentumVolume
Updated 2 months ago · None stated GitHub repository of v29 Coldstart Options Proxy

APM v7 Multi-Factor

by rcaldwell67
1 stars

This indicator plots three exponential moving averages (8, 21 and 55 by default) on the price chart and marks a green triangle when at least three of five conditions agree. The conditions are EMAs stacked upward, RSI between 40 and 70, MACD above its signal li

Indicator v6 TrendOscillators & momentum
Updated 2 months ago · None stated GitHub repository of APM v7 Multi-Factor

A/D Context v20.10

by VVASILEVSS
1 stars

A Pine v5 indicator in a separate pane that follows accumulation and distribution flow, using Williams or Chaikin A/D together with a smoothing EMA, Chaikin Money Flow and ATR. It looks for divergences between price pivots and flow pivots, with regular, hidden

Indicator v5 DivergenceVolume
Updated 3 months ago · None stated GitHub repository of A/D Context v20.10

Bollinger Band Squeeze Detector

by shubhamtaywade82
1 stars

Detects a volatility squeeze when the Bollinger Bands sit inside the Keltner Channel, and shows it in a separate pane as a column state. A momentum histogram measures close against the Donchian midline, optionally normalised by ATR and clamped. A small table r

Indicator v6 Volatility & bandsOscillators & momentum Archived
Updated 5 months ago · None stated GitHub repository of Bollinger Band Squeeze Detector

BVortex Strategy v1

by Alberto082544
1 stars

BVortex Strategy v1 calculates a scaled Vortex Indicator difference to detect overbought and oversold conditions relative to predefined upper and lower thresholds. It filters entries using market trend direction established by confirmed swing pivot highs and l

Strategy v6 Oscillators & momentumTrend
Updated 5 months ago · None stated GitHub repository of BVortex Strategy v1
1 stars

An indicator in a separate pane that turns Heikin Ashi data into a momentum oscillator. It offers lookback modes, an engine choice including a Heikin Ashi blend, optional final smoothing, and adaptive fast and slow crossovers, plus a separate SMA 20 and 50 cro

Indicator v6 Oscillators & momentumTrend
Updated 6 months ago · None stated GitHub repository of Heikin Ashi Oscillator Trend Engine

This strategy calculates intraday volatility mean reversion using session VWAP standard deviation bands, RSI overbought and oversold levels, and candle wick exhaustion ratios. It enters trades when price reaches statistical extremes filtered by RSI and wick co

Strategy v6 Mean reversionVolatility & bands
Updated 7 months ago · MIT GitHub repository of Intraday Volatility Reversion Z-Score

A long and short strategy built on a custom momentum index that combines price velocity, log volume and a standardised Bollinger Band width. A trade needs a recent squeeze in band width, the index breaking beyond its own two-deviation band, and price on the co

Strategy v5 BreakoutVolatility & bands
Updated 8 months ago · MIT GitHub repository of Thermodynamic Volume-Price Resonance (TVPR)

MTF Trend Guardian

by propuchon
1 stars

A strategy that combines a higher-timeframe trend filter with an RSI trigger. It goes long when price is above the previous higher-timeframe EMA and RSI crosses above its long threshold, and short in the mirror case. Positions close when RSI falls below or ris

Strategy v6 TrendOscillators & momentum
Updated 9 months ago · None stated GitHub repository of MTF Trend Guardian
1 stars

Calculates the Chaikin Oscillator as the difference between a fast and a slow exponential average of the accumulation and distribution line, with defaults of 3 and 10. It plots in a separate pane around a zero line, with a colour gradient based on recent extre

Indicator v5 VolumeOscillators & momentum
Updated 9 months ago · MPL-2.0 GitHub repository of Chaikin Oscillator
1 stars

The Squeeze Momentum BB Enhanced indicator computes a momentum oscillator from close prices using linear regression or SMA. It identifies squeezes between Bollinger Bands and Keltner Channels to flag potential breakouts. Plots include colored momentum lines, f

Indicator v5 Oscillators & momentumMoving averages
Updated 9 months ago · None stated GitHub repository of Squeeze Momentum BB Enhanced

VMC Strat Hybrid Trend

by matlaenousse
1 stars

VMC Strat Hybrid Trend is a long-oriented trading strategy plotted directly on the price chart. It combines an exponential moving average trend filter with WaveTrend, RSI, Stochastic RSI, and a custom Money Flow Index calculation. Long entries trigger when Wav

Strategy v6 TrendOscillators & momentum
Updated 10 months ago · None stated GitHub repository of VMC Strat Hybrid Trend

Example Screener - 1

by NakliTechie
1 stars

This overlay indicator is an example multi-symbol screener drawn on the price chart. It exposes an RSI length plus overbought and oversold levels, and boolean switches that turn individual symbols on or off. Column width and screen number control panel placeme

Indicator v5 Oscillators & momentumScreeners & dashboards
Updated 1 year ago · MIT GitHub repository of Example Screener - 1

CVD Enhanced

by turnupdigital
1 stars

An indicator that draws cumulative volume delta as candles in a separate pane, built from lower timeframe volume for a chosen anchor period. Adjustable positive and negative threshold lines mark bullish and bearish confirmation levels, with the area between th

Indicator v6 VolumeOscillators & momentum
Updated 1 year ago · None stated GitHub repository of CVD Enhanced

Calculates standard Relative Strength Index values and identifies positive bullish divergences between price swing lows and RSI lows. The script tracks confirmed pivots using configurable left and right lookback lengths, storing historical pivot prices and ind

Indicator v5 DivergenceOscillators & momentum
Updated 1 year ago · GPL-3.0 GitHub repository of Positive RSI Divergence Detector

This indicator plots Parabolic SAR circles and a configurable exponential moving average on the price chart. It treats the average of open, high, low, and close above the EMA as bullish and below it as bearish. A buy label appears when SAR is below the low, th

Indicator v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Parabolic SAR + EMA 200 + MACD Signals

MACD Indicator

by CodeThat
1 stars

This indicator calculates and plots a standard Moving Average Convergence Divergence oscillator in a separate chart pane. It computes the fast MACD line, the slow signal line, and the histogram based on user-configurable short, long, and signal period inputs.

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

Aroon Oscillator

by munlit
1 stars

A separate-pane indicator that computes the Aroon oscillator from how recently the highest high and lowest low occurred over a set length, then smooths it with a zero-lag filter that searches for a best gain value. A second signal line is derived from it. Inpu

Indicator v5 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of Aroon Oscillator

BTC Bot

by zhuzp98
1 stars

A long-only strategy for Bitcoin-style charts that combines an RSI-based momentum signal with a trend filter using one or two simple moving averages. It buys when the smoothed RSI signal crosses above zero while price is in an uptrend, sizes positions from a s

Strategy v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of BTC Bot
1 stars

This indicator calculates multiple smoothed versions of a chosen dataset using Kalman filters with adjustable gain parameters. It plots the resulting lines on the price chart for visual comparison. The main settings allow selection of the input source and togg

Indicator v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of Kalman Gain Parameter Mechanics

Fractal Engulfing Candles

by fiji-solutions
1 stars

This indicator marks engulfing-style candles on the price chart when they also form at a ten-bar swing. A bullish mark requires a prior bearish candle, an open at or below that close, a close at or above that open, a swing low, and RSI below 30. A bearish mark

Indicator v5 Candlestick patternsOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Fractal Engulfing Candles
1 stars

This strategy implements custom trailing stop logic driven by momentum signals. It calculates first- and second-order price momentum, entering long or short via stop orders above or below the current bar when momentum is consistently positive or negative. A cu

Strategy v5 Oscillators & momentum
Updated 2 years ago · None stated GitHub repository of Trailing Stop Snippet

The Pirate Compass

by yankeexlr
1 stars

An overlay for crypto, stocks and commodities that runs two parallel sets of the same staged logic, each with its own RSI length and 21, 50, 100 and 300-period simple moving averages. The logic flags bearish candles with RSI below 20, tracks crosses above the

Indicator v5 Mean reversionOscillators & momentum
Updated 2 years ago · None stated GitHub repository of The Pirate Compass

TrendGlow

by RobACurtis
1 stars

TrendGlow is a price-chart indicator that recolors candles according to a bullish, bearish, or sideways trend. It imports a BullBear library and can combine Stochastic RSI, MACD, and SMA checks on a user-selected timeframe through request.security. Users toggl

Indicator v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of TrendGlow

RSI + Trailing Stoploss

by kritarth2121
1 stars

This strategy uses a 14-period RSI with fixed thresholds. It goes long when RSI crosses above 60 and short when it crosses below 40. Each side has a percentage trailing stop, two percent by default, that follows the close and only moves in the trade's favour;

Strategy v5 Oscillators & momentum
Updated 2 years ago · None stated GitHub repository of RSI + Trailing Stoploss

A long-only strategy that buys when the 14-bar RSI is below 30 inside a chosen date range. It closes all positions when price reaches a percentage profit target or falls to a percentage stop loss, checked on closes. The order size doubles after each close, a p

Strategy v5 Oscillators & momentumMean reversion Repaints

QQE Signals

by eduardofx
1 stars

A price-chart overlay that applies the quantitative qualitative estimation method to RSI. It smooths RSI with an exponential average, builds a fast volatility band from the average change in that line, and tracks a trailing line that flips between the upper an

Indicator v4 Oscillators & momentum
Updated 2 years ago · None stated GitHub repository of QQE Signals
1 stars

A long-only strategy designed for the 4-hour chart. It averages open, high, low and close, smooths that with a mid-term SMA and builds a relative strength line from the gap between price and the SMA. When the slope of that line turns positive it places a limit

Strategy v5 TrendOscillators & momentum
Updated 3 years ago · GPL-3.0 GitHub repository of Relative Strength Strategy (4h)

Money Printer Go BRRR 2.0

by sourdiesel1202
1 stars

A separate-pane indicator that calls an imported helper library to test SMA, MACD, RSI and DMI conditions for long and short setups, plus an ADX check. It plots a green line at 1 when all four long conditions are true and a red line at minus 1 when all four sh

Indicator v5 Oscillators & momentumTrend
Updated 3 years ago · None stated GitHub repository of Money Printer Go BRRR 2.0

This indicator calculates the Directional Movement Index, including plus DI, minus DI, and a smoothed ADX, then compares confirmed ADX pivots with price pivots to mark divergences. Users set price and ADX lookbacks, a short, medium, or long divergence range, a

Indicator v4 Oscillators & momentumDivergence
Updated 3 years ago · Apache-2.0 GitHub repository of Directional Movement Index Divergence+

Hotch Break Strat

by rajatjpatel
1 stars

A strategy that combines several filters on one chart. Components include an ignition bar marker based on a candle body retracement percentage, fractal detection, three configurable moving averages, an RSI with overbought and oversold levels, a trading range l

Strategy v5 BreakoutOscillators & momentum Repaints
Updated 4 years ago · None stated GitHub repository of Hotch Break Strat

Monitor Armónico

by micayael
1 stars

A separate-pane indicator that combines a squeeze momentum histogram with an ADX-style line. The histogram is a linear regression of price against a channel midline and is coloured by direction and strength, while cross markers on the zero line show whether Bo

Indicator v4 Oscillators & momentumVolatility & bands
Updated 4 years ago · None stated GitHub repository of Monitor Armónico

NYSE

by rosskevin
1 stars

This indicator plots NYSE market breadth in a separate pane. It requests the daily advance-decline series, smooths the average of open, high, low and close with a 15-period simple moving average, and fills the area against a zero line green when that average i

Indicator v4 Oscillators & momentumMoving averages
Updated 5 years ago · AGPL-3.0 GitHub repository of NYSE

KD指標

by TaichiS
219 stars

This script calculates and plots a Stochastic Oscillator (KD indicator) in a separate chart pane. It determines the fast stochastic value over a 9-period lookback, then applies a 3-period Simple Moving Average (SMA) to create the %K line, and a second 3-period

Indicator v4 Oscillators & momentum
Updated 5 years ago · None stated GitHub repository of KD指標
147 stars

This indicator generates trade entry signals and target levels optimized for 1-hour timeframes, designed for external signal extraction. It calculates 7-period and 16-period EMAs alongside 10-period RSI and ATR filters. Long signals occur when the fast EMA cro

Indicator v5 TrendOscillators & momentum
Updated 6 weeks ago · MIT GitHub repository of Signal Strategy 100 Candles of 1H Timeframe
114 stars

This indicator classifies the next market direction with a two-feature k-nearest neighbours model. It stores normalized historic indicator values and past directions, then compares the current point to the nearest neighbours using Euclidean or Chebyshev distan

Indicator v5 AI / machine learningOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of Machine Learning: kNN-based Strategy

This strategy draws on the price chart and combines Stochastic RSI, the Money Flow Index, and an exponential moving average to open long or short trades. Longs use the lower oscillator thresholds and shorts use the upper ones, with direction limited to longs,

Strategy v5 Oscillators & momentumMoving averages Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of 3 Indicator Strategy (StochRSI, MFI & EMA) With Safety Orders

This strategy plots the previous daily high and low on the price chart and calculates the Andean oscillator bull and bear components with an exponential moving average signal. It looks for a bull or bear cross of that signal, then confirms the setup against re

Strategy v5 Oscillators & momentumSupport & resistance Repaints
Updated 3 years ago · MIT GitHub repository of Daily High/Low and Andean Oscillator Strategy
99 stars

Calculates J. Welles Wilder's Accumulation Swing Index (ASI) to evaluate underlying price momentum and market trend strength. It computes the individual bar Swing Index based on current and previous open, high, low, and close prices relative to a maximum daily

Indicator v6 Oscillators & momentumTrend
Updated 4 weeks ago · Apache-2.0 GitHub repository of Accumulation Swing Index (ASI)

Moon Dev Lunar Sniper

by moondevonyt
92 stars

Moon Dev Lunar Sniper is a multi-indicator overlay that scores confluence across fast and slow EMAs, RSI, MACD, DMI, and BB width to fire signals only when score meets the minimum threshold. It plots buy and sell signals on the price chart, highlights cosmic b

Indicator v6 TrendOscillators & momentum Repaints
Updated 2 months ago · Custom licence GitHub repository of Moon Dev Lunar Sniper

RSI

by cryptorife
75 stars

This script calculates the Relative Strength Index (RSI) and plots it in a separate pane with enhanced visual styling options. It draws horizontal reference lines for overbought, oversold, median, and extreme boundaries, along with background fills between the

Indicator v4 Oscillators & momentum
Updated 3 years ago · GPL-3.0 GitHub repository of RSI
47 stars

This indicator calculates the rate of change of market acceleration, known as jolt, by applying three sequential linear regression slope calculations to a selected price series over a specified lookback period. It evaluates higher-order price dynamics beyond v

Indicator v6 Oscillators & momentum
Updated 8 months ago · MIT GitHub repository of Acceleration, Slope of Slope (JOLT)

MACD Histogram Percentile Rainbow calculates the standard Moving Average Convergence Divergence line, signal line, and histogram in a separate indicator pane. It evaluates the relative magnitude of histogram bars against historical data using a percentile rank

Indicator v5 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of MACD Histogram Percentile Rainbow

Advance Decline Line

by TWODS-CAPITAL
37 stars

This indicator plots an Advance Decline Line in a separate pane. It requests a combined NYSE series of advancing issues minus declining issues, divided by unchanged issues plus one. A cumulative function adds the square root of a positive difference and subtra

Indicator v5 Oscillators & momentumTrend
Updated 3 years ago · MIT GitHub repository of Advance Decline Line

SMAOffsetProtectOptV1

by viktors1982
36 stars

SMAOffsetProtectOptV1 is a long-only price-chart strategy that buys when close falls below an offset SMA or EMA and either the Elliott Wave Oscillator is above its high threshold with RSI below a limit, or the oscillator is below its low threshold. It exits wh

Strategy v4 Moving averagesOscillators & momentum Repaints
Updated 2 years ago · None stated GitHub repository of SMAOffsetProtectOptV1

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