Pine Library · 3,035 open-source scripts

Free Oscillator and Momentum Pine Scripts (page 60)

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

106 stars

The Aroon Strategy Long Only is a trend-following strategy that combines the Aroon indicator with a Least Squares Moving Average filter. It enters long positions when the Aroon Up line crosses above the Aroon Down line while the closing price trades above the

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

Single Conditions

by be-thomas
65 stars

This educational indicator calculates a 20-period Relative Strength Index (RSI) to demonstrate various visual debugging techniques in Pine Script. When the RSI falls below the 30 threshold, it illustrates six different signal visualization methods: dynamically

Indicator v4 Oscillators & momentum
Updated 5 days ago · GPL-3.0 GitHub repository of Single Conditions
2 stars

Calculates buying and selling pressure by evaluating high and low movements relative to a two-bar price range. Bull and bear pressures are averaged using weighted moving averages with optional pre-smoothing, and net pressure is derived through an additional sm

Indicator v5 Oscillators & momentumTrend
Updated 8 months ago · None stated GitHub repository of RedK Trader Pressure Index (TPX)

ARR VWAP Intraday

by hasnocool
106 stars

This strategy plots VWAP on the price chart and trades only between a start hour and an end hour. It enters long when VWAP is rising and RSI is above a threshold, and short when VWAP is falling and RSI is below a threshold. If the reversal option is on, it clo

Strategy v4 Oscillators & momentumVolume Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of ARR VWAP Intraday
65 stars

This strategy calculates a 20-period Relative Strength Index (RSI) and generates entry orders based on crossovers and crossunders of the 50 level. When RSI crosses above 50, it places a long stop entry at the current high price with a custom alert message. Whe

Strategy v4 Oscillators & momentum
Updated 5 days ago · GPL-3.0 GitHub repository of Strategy Using Alert Message

RedK Volume-Accelerated Directional Energy Ratio (VADER) measures directional momentum accelerated by volume activity. It calculates price change relative to the average bar range, limits the ratio, and scales it using relative, raw, or static volume weighting

Indicator v5 VolumeOscillators & momentum
Updated 8 months ago · None stated GitHub repository of RedK Volume-Accelerated Directional Energy Ratio

This strategy evaluates a triple-confluence entry gate combining trend, momentum, and structure filters on the price chart. It enters long when a fast exponential moving average is above a slow exponential moving average, RSI exceeds a defined threshold, and t

Strategy v6 TrendOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe Trendmaster-Probe-04 Trend Entry Gate
65 stars

This Pine Script strategy generates trading signals using a 20-period Relative Strength Index (RSI) relative to the 50 level. It enters a long position when the RSI crosses above 50 and a short position when it crosses below 50. While in an active trade, the s

Strategy v4 Oscillators & momentum
Updated 5 days ago · GPL-3.0 GitHub repository of Strategy with Selective Alert Calls

Opening Range

by g-moe
3 stars

The Opening Range indicator combines multiple technical analysis tools onto the main price chart. It calculates MACD momentum sequences alongside Stochastic oscillator limits to generate buy and sell triangle shapes. Additionally, it evaluates trend alignment

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

Opening Range

by g-moe
3 stars

This indicator overlays a Directional Sentiment Line ribbon on the price chart using moving averages of high, low, open, and close prices. It combines higher-timeframe MACD and RSI filters with standard deviation volume heatmap thresholds to assess directional

Indicator v5 TrendOscillators & momentum Repaints
Updated 5 months ago · None stated GitHub repository of Opening Range
1 stars

A test strategy from a reference corpus that fills orders at the close of the signal bar. It goes long when a 9-period EMA crosses above a 21-period EMA while RSI is below 70, and closes the long when the EMAs cross back down. One unit is traded, with no stop

Strategy v6 Moving averagesOscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PF Process Orders 02 On Close True

RSI Bar Chart v2

by regalouisei
2 stars

This indicator plots multiple RSI oscillators calculated from various price sources and timeframes in a separate pane. It renders the RSIs as customizable lines with different colors, widths, and styles. Colored bars highlight overbought and oversold zones bas

Indicator v5 Oscillators & momentum Repaints
Updated 8 months ago · None stated GitHub repository of RSI Bar Chart v2
1 stars

This strategy serves as a validation probe to test default order execution timing where orders are processed on the open of the following bar. It implements a simple long-only system using a 9-period and 21-period exponential moving average crossover filtered

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PF process-orders 01 - on_close=false

V4 Essential Alerts 11

by be-thomas
65 stars

This script calculates a 14-period Relative Strength Index (RSI) based on closing prices and plots the oscillator in a separate indicator pane. It tracks when the RSI crosses above the 50 level to detect a potential bullish shift. The indicator configures a bu

Indicator v4 Oscillators & momentum
Updated 5 days ago · GPL-3.0 GitHub repository of V4 Essential Alerts 11

RSI direction bias - JD

by regalouisei
2 stars

This indicator calculates an RSI and holds a directional bias until the oscillator crosses the opposite threshold. A regular RSI uses the selected source and length, while the future-smoothed option uses a projected Heikin Ashi open. Bias turns long above the

Indicator v5 Oscillators & momentum Repaints
Updated 8 months ago · None stated GitHub repository of RSI direction bias - JD
1 stars

This strategy tests deferred position flips under pyramiding. It enters long at market when a 9-period EMA crosses above a 21-period EMA and RSI stays below 70, and it queues short stop entries when RSI crosses under 50, with the stop placed a quarter of ATR b

Strategy v6 Oscillators & momentumMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PF Pyramid carry 01 - deferred flip

ATR+EOM+Vortex Strat

by hasnocool
106 stars

This strategy combines ATR, Ease of Movement, and the Vortex indicator on the price chart. It enters long when ATR is above its EMA, Ease of Movement is positive, and the average of the Vortex lines is above one. It closes that long when ATR is below its EMA,

Strategy v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of ATR+EOM+Vortex Strat
2 stars

This indicator analyzes and visualizes the statistical price impact following specific Relative Strength Index (RSI) trigger conditions. When the RSI crosses over or under a defined threshold level, the script measures post-trigger price movements across a spe

Indicator v5 Oscillators & momentumVolatility & bands
Updated 8 months ago · None stated GitHub repository of RSI Impact Heat Map [Trendoscope]

Parabolic SAR

by g-moe
3 stars

Parabolic SAR is a price-chart strategy that reads Commodity Channel Index and Parabolic SAR values from four user-selected timeframes. It opens a long when every timeframe’s CCI is above the entry level and price is below every SAR, and it closes that long wh

Strategy v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Parabolic SAR

RSI Past

by regalouisei
2 stars

RSI Past is an indicator that plots the bar difference between the last overbought and oversold readings of a custom RSI. It calculates the distance in bars from the most recent time the RSI crossed above the overbought threshold to the last time it dropped be

Indicator v5 Oscillators & momentum
Updated 8 months ago · None stated GitHub repository of RSI Past

Atrend by OTS

by hasnocool
106 stars

Atrend by OTS combines MACD histogram crossovers, RSI threshold crosses, and an ATR-based trailing trend indicator on the main price chart. The strategy triggers long entries when the MACD signal delta crosses above zero or when RSI crosses above the oversold

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

Parabolic SAR

by g-moe
3 stars

This strategy overlays a smoothed moving average on price and combines it with Aroon, Chaikin Money Flow and a Chaikin oscillator to define long and short conditions. Relative Vigor Index and Parabolic SAR values are calculated for exits. Entries can be limite

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

This Pine Script strategy calculates the accumulation/distribution line with ta.accdist and its 21-period EMA. It plots these in a separate pane. The strategy issues long entries on ta.crossover of the accumulation/distribution line above its EMA and short ent

Strategy v6 VolumeMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA isolate - accdist EMA(21) cross
1 stars

This validation strategy calculates a 9-period Chande Momentum Oscillator (CMO) on the closing price to isolate zero-line crossing behavior. It enters a long position when the CMO crosses above zero and opens a short position when it crosses below zero, revers

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA isolate - CMO(9) zero cross
1 stars

This strategy calculates the Ehlers Center of Gravity oscillator of length 10 on close and an exponential moving average of length 5 of that oscillator. It enters long when the oscillator crosses above the signal and enters short when it crosses below. Positio

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA isolate - COG(10) signal cross

Pivot Trendlines

by g-moe
3 stars

This strategy overlays two SMA lines with a cloud fill to show trend direction. It detects band reversals with Bollinger Bands and uses RSI for mean-reversion signals. Long entries trigger when the trend is bullish, price touches the lower band, and RSI is bel

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

This strategy calculates a 14-period Money Flow Index using typical price and volume data. It triggers a long entry when the indicator crosses above the oversold threshold of 20 and a short entry when it crosses below the overbought threshold of 80. Displayed

Strategy v6 Oscillators & momentumVolume
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA isolate - MFI(14) bands 20/80

This strategy implements the B-Xtrender indicator, calculating short-term and long-term momentum oscillators using RSI applied to moving average spreads and smoothings. It plots the momentum oscillators as colored histograms in a separate pane. Trades are filt

Strategy v4 Oscillators & momentumTrend
Updated 2 years ago · GPL-3.0 GitHub repository of B-Xtrender [Backtest Edition] @QuantTherapy
99 stars

This indicator calculates and plots the Minus Directional Indicator (-DI) in a separate pane to measure downward price movement. It computes negative directional movement and true range using Wilder's smoothing with warmup compensation, ensuring stable values

Indicator v6 TrendOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Minus Directional Indicator (-DI)

Andean Oscillator

by regalouisei
2 stars

The Andean Oscillator measures trend strength by calculating distinct bullish and bearish components using modified exponential envelopes applied to open and close prices. It computes variance-like metrics to estimate directional volatility and tracks momentum

Indicator v5 TrendOscillators & momentum
Updated 8 months ago · None stated GitHub repository of Andean Oscillator
99 stars

Calculates and plots the Minus Directional Movement (-DM) component of J. Welles Wilder's directional movement system. It measures downward price momentum by comparing the current low to the previous low and applying Wilder's RMA smoothing with warmup compensa

Indicator v6 TrendOscillators & momentum
Updated 4 weeks ago · Apache-2.0 GitHub repository of Minus Directional Movement (-DM)
1 stars

This strategy plots the Rank Correlation Index of close over a fixed 14-bar window in a separate pane. It enters long when RCI crosses above zero and short when RCI crosses below zero, reversing with a fixed quantity of one. There is no stop loss, take profit,

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA isolate - RCI(14) zero cross
106 stars

This strategy calculates a custom Signal-to-Noise ratio derived from logarithmic aggregation of inverse close prices and compares it against a Simple Moving Average. It plots both lines in a separate pane and alters price bar colors based on signal direction.

Strategy v4 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Backtest Signal To Noise

PF TA isolate - WPR(14) bands

by pineforge-4pass
1 stars

This strategy plots the Williams %R oscillator in a separate pane and generates long entries when it crosses above -80 while generating short entries on crossunder below -20. It uses fixed position sizing of one unit per signal with no stop loss and allows pyr

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA isolate - WPR(14) bands
106 stars

This strategy simulates a 3Commas dollar-cost averaging (DCA) bot directly on the price chart. It opens long or short deals based on configurable conditions such as immediate execution, RSI-7 thresholds, or TradingView technical presets. As price moves against

Strategy v4 Oscillators & momentumMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of Backtesting 3commas DCA Bot v2
1 stars

This strategy calculates a 14-period RSI of close and places mean-reversion entries at fixed outer bands. It enters long when RSI crosses up through 30 and enters short when RSI crosses down through 70. Position size is a fixed quantity of one, with commission

Strategy v6 Oscillators & momentumMean reversion
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA isolate 02 - RSI(14) bands 30/70

Momentum (MOM)

by mihakralj
99 stars

This indicator calculates momentum as the difference between the selected source and the same source a set number of bars earlier, measuring the rate of price change. It plots a single MOM line in a separate pane. Length sets the lookback, with a minimum of on

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

The MACD indicator calculates the difference between two exponential moving averages with fast and slow periods to identify momentum shifts in the market. It plots the MACD line, signal line, and histogram bars in a separate pane below the price chart. The his

Indicator v6 Oscillators & momentumMoving averages
Updated 4 weeks ago · Apache-2.0 GitHub repository of Moving Average Convergence Divergence (MACD)
2 stars

Christmas Toolkit [LuxAlgo] draws a decorative Christmas tree, garland, stars, and a moving deer on the price chart using labels. Width, offset, and garland rotations change the tree layout, while Static Tree and Deer Speed control whether the tree stays fixed

Indicator v5 Screeners & dashboardsOscillators & momentum Repaints
Updated 8 months ago · None stated GitHub repository of Christmas Toolkit [LuxAlgo]
1 stars

This validation strategy tests continuous-state entry and exit logic using a standard 14-period Relative Strength Index (RSI). It opens a long position whenever RSI is above 50 and closes the position whenever RSI drops to or below 50. The script operates in a

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA isolate 06 - RSI(14) > 50 Continuous

BB + ADX Strategy

by hasnocool
106 stars

The BB + ADX Strategy triggers entries when price crosses Bollinger Bands during low-trend market conditions as filtered by the Average Directional Index (ADX). It enters long when price crosses above the lower band and short when price crosses below the upper

Strategy v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of BB + ADX Strategy

CM MacD Ult MTF V2.1

by regalouisei
2 stars

This indicator plots a customizable MACD in a separate pane. It calculates the MACD line from fast and slow SMA or EMA values, a signal line, and a histogram of their difference. An optional indicator timeframe can use another chart resolution. Users can show

Indicator v5 Oscillators & momentumMoving averages
Updated 8 months ago · None stated GitHub repository of CM MacD Ult MTF V2.1
1 stars

This validation strategy evaluates a continuous-state MACD trend condition rather than a crossover event trigger. It calculates standard MACD line, signal line, and histogram values on the closing price using 12, 26, and 9 periods. The strategy enters a long p

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA Isolate 07 - MACD > Sig Continuous

BB+RSI+OBV

by hasnocool
106 stars

This strategy combines Bollinger Bands, the Relative Strength Index (RSI), and On-Balance Volume (OBV) to generate trade signals directly on the price chart. Long entries trigger when price is above the middle SMA band, RSI is over 50, and OBV is rising. Short

Strategy v4 Volatility & bandsOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of BB+RSI+OBV

This overlay indicator plots three moving averages chosen from EMA, SMA, HMA, VWMA, or RMA. Inputs also configure Stochastic RSI and RSI lengths, buy and sell thresholds, and an optional RSI divergence filter with its own lookback. A session window can restric

Indicator v5 TrendOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Pivot Trendlines with Divergence Scanner

This Pine Script strategy calculates a standard 14-period Relative Strength Index (RSI) to generate simple momentum-based trading signals. It executes a long entry of one fixed unit when the RSI rises above 55 while flat. Open positions close entirely once the

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA isolate 09 - RSI>60 entry, RSI<45 exit

BB-strategy

by hasnocool
106 stars

This strategy executes trades based on Bollinger Bands with optional filter conditions from RSI and MACD oscillators. It overlays on the price chart and plots MACD lines directly across the bars. Entries trigger according to band interactions combined with mom

Strategy v4 Volatility & bandsOscillators & momentum Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of BB-strategy
1 stars

PF TA Isolate 10 - Typed-Matrix UTC is a Pine Script v6 strategy designed for engine parity validation. It populates a 24-by-7 boolean matrix tracking high-RSI hours and days using an explicit UTC timezone specification. The matrix is transposed twice to check

Strategy v6 Oscillators & momentum
Updated 6 days ago · Apache-2.0 GitHub repository of PF TA Isolate 10 - Typed-Matrix UTC

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