Pine Library · 3,035 open-source scripts

Free Oscillator and Momentum Pine Scripts (page 30)

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

Super Trend + MACD

by akash-yellgetti
1 stars

A strategy script that combines a custom ATR-based Supertrend calculation with MACD line and signal crossovers. It draws green triangles for MACD bullish crosses, red triangles for bearish crosses, and separate triangles for the Supertrend direction on the pri

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Super Trend + MACD
1 stars

This indicator draws a stochastic momentum oscillator in a separate pane. It measures how far the close sits from the midpoint of the highest high and lowest low over the Percent K length, then double-smooths that relative distance and the full range with nest

Indicator v4 Oscillators & momentum
Updated 2 years ago · None stated GitHub repository of UCS Stochastic Momentum Index

Total Divergence+

by krosenfeld7
1 stars

Total Divergence+ is a price-chart indicator that looks for divergences between price and several oscillators. It can show RSI, Stochastic RSI, Stochastic, ADX, MACD, and Price Volume Trend divergences, each with its own display switch. Lookback lengths set ho

Indicator v4 DivergenceOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of Total Divergence+
1 stars

A Pine v4 indicator in a separate pane that combines several market breadth and sentiment readings into one smoothed oscillator. It draws on the S&P 500, the VIX, percent-of-stocks-above-average breadth series, a put-call ratio, an RSI and momentum of the inde

Indicator v4 Oscillators & momentumVolatility & bands
Updated 3 years ago · None stated GitHub repository of Tykhe Sentiment Indicator

DMI & ADX

by JohnsonHsiao
1 stars

This indicator computes and plots the Directional Movement Index and Average Directional Index using Pine Script's built-in DMI function. It renders the positive directional indicator (+DI), negative directional indicator (-DI), and the ADX line in a separate

Indicator v5 TrendOscillators & momentum
Updated 3 years ago · None stated GitHub repository of DMI & ADX
330 stars

This strategy plots a multi-timeframe exponential moving average on the price chart while evaluating momentum using the Relative Strength Index. It enters long positions when price exceeds the moving average by at least one percent and RSI crosses above the ov

Strategy v5 Oscillators & momentumMoving averages
Updated 2 months ago · None stated GitHub repository of RSI + 1200 Strategy [Alose]

ADX Histogram

by harryguiacorn
220 stars

This indicator calculates and displays the Average Directional Index (ADX) as a column histogram in a separate pane. It evaluates market trend strength by calculating directional movement metrics based on specified smoothing and DI length inputs. When the ADX

Indicator v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of ADX Histogram

Aroon Oscillator

by mihakralj
99 stars

Aroon Oscillator calculates the difference between Aroon Up and Aroon Down across a user-defined lookback period. It plots the resulting oscillator line between -100 and +100 in a separate pane, alongside horizontal reference levels at 0 and plus or minus 50,

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

MS+MACD Enhanced Tests

by iamrichardD
57 stars

This script implements an enhanced testing framework for the Market Structure MACD 4H strategy. It defines test cases with pass rates and includes mock functions simulating advanced market structure detection, MACD sensitivity analysis across trending and chop

Strategy v6 TrendOscillators & momentum
Updated 1 year ago · Apache-2.0 GitHub repository of MS+MACD Enhanced Tests
55 stars

The script calculates and plots Parabolic SAR with default parameters on the price chart. It also computes Stochastic RSI using a 14-period RSI and 14-period Stoch with 3-period smoothing. Buy signals occur when Stochastic RSI crosses above its signal line fro

Indicator v6 Oscillators & momentumMoving averages
Updated 6 months ago · Apache-2.0 GitHub repository of Parabolic SAR + Stoch RSI

Center of Gravity (CG)

by mihakralj
47 stars

This indicator calculates John Ehlers' Center of Gravity oscillator, which measures the balance point of price over a lookback window to identify cycle turning points with low lag. It computes a weighted price distribution ratio normalized around a zero center

Indicator v6 Oscillators & momentum
Updated 8 months ago · MIT GitHub repository of Center of Gravity (CG)

Stochastic

by Zettt
43 stars

This indicator plots a smoothed stochastic oscillator in a separate pane. It calculates percent K from the high, low, and close, smooths that value, and derives percent D as a moving average of percent K. Lines draw thicker when a value is above the upper thre

Indicator v4 Oscillators & momentum
Updated 1 year ago · None stated GitHub repository of Stochastic

HG Strat

by benso87
24 stars

This strategy implements an ADX trend-following system with moving average pullbacks. It identifies strong market momentum when the Average Directional Index exceeds a chosen threshold, then monitors price retests of an exponential or simple moving average. Lo

Strategy v5 TrendOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of HG Strat

RSI/BB 1minute Study

by SammyEnigma
18 stars

This 1-minute strategy combines the Relative Strength Index (RSI), Bollinger Bands, and Bollinger Band Width to trigger trades. It plots the RSI curve and custom buy or sell threshold lines in a separate pane. Long entries trigger when price and RSI drop below

Strategy v4 Oscillators & momentumVolatility & bands
Updated 6 years ago · None stated GitHub repository of RSI/BB 1minute Study

Divergenced B004

by ruckard
13 stars

Divergenced B004 is a Pine Script strategy that plots on the price chart and looks for divergences in the Squeeze Momentum Indicator. It shorts when a green-section squeeze value falls while price rises, and longs when a red-section squeeze value rises while p

Strategy v5 DivergenceOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Divergenced B004

Renko Acceleration

by f-cksociety
11 stars

Calculates the time elapsed between consecutive bars to measure market speed and volatility, designed primarily for Renko chart blocks where bar duration varies. In Momentum mode, it contrasts the current duration against a 100-period moving average baseline,

Indicator v4 Volatility & bandsOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of Renko Acceleration
9 stars

This indicator draws a currency-strength view in a separate pane. It requests the current close and the previous daily close for major forex pairs plus gold crosses, using a broker prefix of OANDA, FX, or FOREXCOM. The pair-set input switches between an overal

Indicator v4 Screeners & dashboardsOscillators & momentum
Updated 5 years ago · None stated GitHub repository of |AG| 4th Dimension Currency Strength

CM MacD Ult MTF

by PipC
8 stars

This indicator plots a multi-timeframe Moving Average Convergence Divergence (MACD) oscillator with a signal line and customizable histogram in a separate pane. It features a four-color histogram that reflects whether momentum is accelerating or decelerating a

Indicator v4 Oscillators & momentum
Updated 4 years ago · None stated GitHub repository of CM MacD Ult MTF
7 stars

This strategy generates trading signals based on a triple confluence of Exponential Moving Averages (EMA), the Relative Strength Index (RSI), and MACD histogram momentum. Long entries require a fast EMA above a slow EMA, price above the fast EMA, RSI between 5

Strategy v5 TrendOscillators & momentum
Updated 3 months ago · MIT GitHub repository of Triple Confluence (EMA+RSI+MACD)

RSI Strategy

by suyons
7 stars

Calculates relative strength index values across up to four configurable timeframes to compare short-term and long-term momentum. Generates long and short entry signals when lower-timeframe RSI crosses key thresholds, conditioned on higher-timeframe RSI levels

Strategy v5 Oscillators & momentumTrend Repaints
Updated 4 months ago · None stated GitHub repository of RSI Strategy
5 stars

This indicator plots RSI(14) on the price chart along with regular and hidden bullish and bearish divergences. It detects divergences by comparing price highs and lows to RSI values using pivot points with configurable lookback bars. Signals appear as triangle

Indicator v4 Oscillators & momentumDivergence
Updated 2 years ago · None stated GitHub repository of CB RSI (Divergence and OB/OS)
5 stars

This indicator plots 50-period and 200-period exponential moving averages on the price chart while calculating money flow index and WaveTrend oscillators in the background. Long signals trigger when price trends above the 200 EMA with a recent 50 EMA pullback,

Indicator v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of 50 EMA + 200 EMA + VMC Cipher B

Elton's Screener

by eltonaguiar
4 stars

Elton's Screener is an indicator that runs in a separate pane and scores one of twenty selectable strategies, or auto-selects a route from the symbol type. It filters signals by a minimum confidence level and a higher-timeframe EMA trend alignment. ATR multipl

Indicator v6 Screeners & dashboardsOscillators & momentum Repaints
Updated 2 days ago · None stated GitHub repository of Elton's Screener

Relative Liquidity Index

by InNoobWeTrust
4 stars

The Relative Liquidity Index measures market volatility and liquidity dynamics by calculating the Relative Strength Index (RSI) of the Average True Range (ATR). Displayed in a separate pane, it highlights low and high liquidity states based on configurable thr

Indicator v6 Volatility & bandsOscillators & momentum
Updated 2 days ago · None stated GitHub repository of Relative Liquidity Index

NYSA-Trend Kanali

by Kalumur
4 stars

NYSA-Trend Kanali combines Parabolic SAR, higher-timeframe exponential moving averages, and weekly MACD signals on the price chart. It calculates Parabolic SAR to highlight trend shifts with visual buy and sell labels, plots weekly 8-period and 13-period EMAs,

Indicator v5 TrendMoving averages Repaints
Updated 2 years ago · None stated GitHub repository of NYSA-Trend Kanali
4 stars

This indicator draws an on-screen dashboard table tracking market structure and technical metrics across higher timeframes such as 2-hour and 4-hour intervals. It uses higher-timeframe data to evaluate swing highs, swing lows, RSI levels, support and resistanc

Indicator v5 Screeners & dashboardsSupport & resistance
Updated 4 years ago · None stated GitHub repository of SnagProfit Logic 2H 4H

Fisher Transform

by gocaman
3 stars

This indicator calculates and plots the Fisher Transform oscillator alongside its trigger line in a separate pane to highlight extreme price moves and potential reversals. It identifies bullish signals when the Fisher line crosses above its trigger line from o

Indicator v5 Oscillators & momentumScreeners & dashboards
Updated 2 days ago · None stated GitHub repository of Fisher Transform
3 stars

This indicator detects price movements over a configurable number of lookback bars based on percentage or price distance thresholds. It plots buy and sell signals directly on the price chart and can invert signals for counter-trend entries. Users can filter si

Indicator v5 Oscillators & momentumBreakout
Updated 5 months ago · None stated GitHub repository of Bars%Move Indicator

RSI Lib

by augustoerni
3 stars

This library exports a function that calculates the Relative Strength Index from the close price. It measures bar-to-bar change, separates gains and losses, smooths both with a running moving average, and returns the standard 100-scale RSI. Callers pass the lo

Library v5 Oscillators & momentum
Updated 2 years ago · None stated GitHub repository of RSI Lib
3 stars

The Long Term Alpha Indicator computes a weighted alpha from price change (close minus average of high low close) multiplied by volume and smoothed via simple moving average. It produces EMAs of this weighted alpha at fixed lengths of 110 30 and 8. Each EMA is

Indicator v5 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Long Term Alpha Indicator

Currency Strength Chart

by itmakesyousick
3 stars

This indicator plots the comparative relative strength of major currencies in a separate pane below the price chart. It calculates strength metrics based on raw price or momentum oscillators including RSI, CCI, and Stochastics, smoothed using various moving av

Indicator v5 Screeners & dashboardsOscillators & momentum
Updated 4 years ago · None stated GitHub repository of Currency Strength Chart

MA Spread Histogram

by piecioshka
2 stars

MA Spread Histogram calculates the difference between two configurable moving averages and plots the result as a color-coded column histogram in a separate pane. The histogram bars highlight expanding or contracting momentum across the zero line. When the shor

Indicator v6 Oscillators & momentumMoving averages
Updated 12 days ago · MIT GitHub repository of MA Spread Histogram
2 stars

This indicator calculates RSI and identifies regular and hidden bullish and bearish divergences against price swing pivots in a separate pane. It features an early signal mode that uses a shorter lookback to detect provisional divergence earlier, tracking whet

Indicator v6 Oscillators & momentumDivergence
Updated 4 weeks ago · Custom licence GitHub repository of RSI Divergence Indicator MP v3
2 stars

WaveTrend Oscillator Pro calculates WT1 and WT2 lines derived from exponentially smoothed typical price channels and moving averages. Displayed in a separate pane, it visualises momentum alongside customizable overbought and oversold bands. Crossover signals b

Indicator v6 Oscillators & momentumDivergence
Updated 2 months ago · Custom licence GitHub repository of WaveTrend Oscillator Pro [Vantrade]

Alper

by avatar-lavventura
2 stars

This strategy combines the WaveTrend oscillator with Bollinger Bands and Keltner Channels squeeze momentum calculations in a separate pane. It displays WaveTrend signal lines, oscillator difference areas, threshold levels, and crossover points directly in the

Strategy v4 Oscillators & momentumVolatility & bands
Updated 7 months ago · None stated GitHub repository of Alper
2 stars

This strategy plots a custom SuperTrend Polyfactor Oscillator in a separate pane using ATR, adjustable factors, and normalization options on the chosen indicator source. It generates long, short, or both direction signals based on the oscillator values with mu

Strategy v5 Oscillators & momentumTrend
Updated 1 year ago · None stated GitHub repository of Multi-Step FlexiSuperTrend - Strategy

Z-Score Highlighter

by ryangaraygay
2 stars

Calculates the Z-score of closing prices over a specified moving average period and standard deviation length. It identifies potential statistical outliers by checking if the Z-score breaches positive or negative threshold levels during a user-configurable tra

Indicator v5 Oscillators & momentumVolatility & bands
Updated 1 year ago · MIT GitHub repository of Z-Score Highlighter

MACD Cross Strategy

by Web3Degenerate
2 stars

This strategy generates buy and sell signals on the price chart using MACD crossovers. It applies an EMA 200 filter requiring price to trade above or below the EMA. Only the first MACD crossover is used after the filter condition is met. Stop loss is calculate

Strategy v5 Oscillators & momentumMoving averages
Updated 2 years ago · None stated GitHub repository of MACD Cross Strategy

Solar Winds

by ankurksoni
1 stars

A separate-pane momentum oscillator that places each bar's midpoint within the highest-high to lowest-low range of a chosen period, default 35 bars. That position is smoothed twice and passed through a Fisher transform to sharpen turning points. It plots a his

Indicator v6 Oscillators & momentum
Updated 3 days ago · None stated GitHub repository of Solar Winds

DEPV2 B2 · DEVISSO RATIO

by YuceSezar89
1 stars

This indicator plots a Devisso ratio in a separate pane and is meant to run on the daily chart. It accumulates signed close-to-close percent changes into a running total, applies RSI to that total, then takes the absolute change in RSI divided by the change in

Indicator v6 Oscillators & momentum
Updated 13 days ago · None stated GitHub repository of DEPV2 B2 · DEVISSO RATIO

Mean Deviation Loop

by vedkanani123
1 stars

A separate-pane oscillator based on mean absolute deviation. It offers two signal modes: Bollinger-style bands around a chosen moving average of the deviation, or a for-loop score summed across a range of lookbacks and compared with long and short thresholds.

Indicator v6 Oscillators & momentumVolatility & bands
Updated 2 months ago · None stated GitHub repository of Mean Deviation Loop

Reload Ranger Strategy

by GreyssonEnterprises
1 stars

A Pine v5 strategy that trades reversal setups inside a Fibonacci retracement zone taken from a higher timeframe, combining W and M pattern matching with Williams %R, MACD, RSI and OBV filters. Risk per trade starts at a base percentage with an increment and a

Strategy v5 Support & resistanceOscillators & momentum
Updated 3 months ago · MIT GitHub repository of Reload Ranger Strategy

Momentum Swing

by rubbermetal
1 stars

Momentum Swing is an indicator, not a strategy, that marks Long and Short signals when a MACD cross coincides with an oversold or overbought RSI reading and ADX above 25. It plots fast and slow EMAs, colors bars when volume exceeds a multiple of its 50-bar ave

Indicator v6 Oscillators & momentumTrend
Updated 4 months ago · MPL-2.0 GitHub repository of Momentum Swing
1 stars

This strategy calculates a rolling price-change momentum score using a custom iterative loop function combined with exponential moving averages. It measures net price movement across six bars alongside a 9-period and 21-period EMA crossover. Long positions are

Strategy v5 Oscillators & momentumMoving averages
Updated 4 months ago · MIT GitHub repository of Block Function Loop Score
1 stars

A separate-pane indicator that ranks four user-chosen ETFs, preloaded with gold, Nasdaq, ChiNext and Nikkei funds, by momentum over a set number of weeks, and tracks a rotation into the top few. Settings choose the weekday that ends each week, rebalance at the

Indicator v6 Oscillators & momentumScreeners & dashboards
Updated 7 months ago · None stated GitHub repository of ETF Rotation (Weekly Momentum)

Trend Surfer

by gabriel-klettur
1 stars

Trend Surfer is a multi-timeframe trend-following indicator overlay. It calculates short and long Exponential Moving Averages from a configurable higher timeframe to determine the main market trend direction. The indicator highlights current-interval RSI overb

Indicator v6 TrendMoving averages
Updated 7 months ago · None stated GitHub repository of Trend Surfer

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