Pine Library · 3,040 open-source scripts

Free TradingView Strategy Scripts (page 49)

Open-source Pine Script strategies: scripts that place simulated trades, so TradingView's Strategy Tester can report how the rules did on past data.

Pine scripts3,040
Code shown here1,833open licence
Updated in a year1,781
No repaint flag2,645

Strategies: All

The strategy uses RSI(14) on closing prices to detect upward crossovers above 50 for long entries and downward crossovers below 50 for exits. A protective stop loss is placed at the midpoint between open and high on the entry bar to handle mid-bar fills via ma

Strategy v6 Oscillators & momentumMean reversion
Updated 7 days ago · Apache-2.0 GitHub repository of PF Magnifier Dist Probe 08a - Endpoints RSI Cross
1 stars

This strategy detects liquidity sweeps and break of structure events using SMC concepts. It plots BOS labels, sweep markers, and matrix floor ceiling lines on the price chart. The SMC structure sensitivity setting adjusts lookback for scalping, standard, or sw

Strategy v6 SMC / ICT / price actionBreakout
Updated 2 months ago · None stated GitHub repository of TN SMC Matrix Sovereign v6
1 stars

A Pine v4 strategy that plots a 22-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of XRPBTC EMA Cross Strategy

This strategy combines Larry Williams' Vix Fix synthetic volatility indicator with Bollinger Bands. It calculates standard and inverted Williams Vix Fix metrics, displaying them as histogram columns with standard deviation bands in a separate pane. Long entrie

Strategy v4 Volatility & bandsOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Williams Vix Fix Strategy [Alorse]
106 stars

This script tracks daily on-chain whale holdings across various cryptocurrencies using IntoTheBlock metric feeds. It applies Bollinger Bands to day-to-day asset changes to identify statistically significant outlier movements based on a user-selected standard d

Strategy v5 VolumeVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Big Whale Purchases and Sales
13 stars

This strategy plots a Noro trend ribbon on the price chart and uses ribbon side changes to choose long or short bias. It builds a corridor from recent high and low prices. A long opens when price is below that corridor during a long bias, and a short opens whe

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon
2 stars

This strategy enters long positions when the Relative Strength Index drops into oversold territory on a confirmed bar. It exits when RSI rises back to a target sell level, provided an optional minimum profit percentage threshold is satisfied. At trade entry, a

Strategy v4 Oscillators & momentumMean reversion
Updated 2 years ago · None stated GitHub repository of RSI Mean Reversion Strategy 2021
1 stars

A test strategy from a reference corpus that checks how intrabar fills behave with the bar magnifier on. It goes long when a 9-period EMA crosses above a 21-period EMA, places a protective stop halfway between the bar open and high, and closes the long when th

Strategy v6 Moving averages
Updated 7 days ago · Apache-2.0 GitHub repository of PF Magnifier Dist Probe Endpoints

TN SMC Sovereign

by raybird
1 stars

TN SMC Sovereign identifies Smart Money Concepts structural changes, Order Blocks, and Fair Value Gaps on the price chart. It determines market direction by tracking swing highs and lows for Break of Structure events. Long entries occur when the structure is b

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · None stated GitHub repository of TN SMC Sovereign
1 stars

A Pine v4 strategy that plots a 36-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of XTZBTC EMA Cross Strategy

Bitfinex Shorts Strat

by hasnocool
106 stars

This strategy calculates a 7-period Relative Strength Index (RSI) on external Bitfinex Bitcoin short position data to execute trades on the price chart. It enters a long position when the short-position RSI drops below a low threshold, and enters a short posit

Strategy v5 Oscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Bitfinex Shorts Strat
13 stars

Ruckard Noro TrendRibbon A006 is a trend-following strategy based on Noro's trend ribbon concept using moving averages. It features customizable moving average types, lengths, and price sources to generate entry and exit signals, displayed directly on the pric

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon A006

PF Max Contracts Held Gate

by pineforge-4pass
1 stars

A test strategy from a reference corpus that checks the highest contract count a strategy has held. At the start of each hour it adds one long unit, up to a pyramiding limit of ten, but stops adding once the all-time maximum held reaches five contracts. Every

Strategy v6 Sessions & time
Updated 7 days ago · Apache-2.0 GitHub repository of PF Max Contracts Held Gate

P_ver_when_param

by GammaExpansion
1 stars

This strategy enters a long position when the bar close is above its open. It has no inputs, no exit rules, and no stop loss or take profit. Position size is plotted in a separate pane rather than on the price chart. The script is a minimal parser fixture, so

Strategy v6 Candlestick patterns
Updated 7 days ago · MIT GitHub repository of P_ver_when_param

TN Sovereign

by raybird
1 stars

A strategy on the price chart that scores each setup from 0 to 4 using volume against its average, higher-timeframe EMA trend, bar movement against an ATR noise level and fast versus slow EMA alignment. Long entries are linked to a fast EMA crossing above the

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign

YFI XBT Binance 1m

by tseitz
1 stars

This strategy plots a close VWAP and percentage-offset high and low VWAP bands on the price chart. It enters long when the bar opens above the high band, optionally only on a green candle, and short when the bar opens below the low band, optionally only on a r

Strategy v4 VolumeBreakout Repaints
Updated 4 years ago · None stated GitHub repository of YFI XBT Binance 1m
106 stars

This overlay strategy enters a long position when the relative strength index rises by more than five points, stays below 70, and a 9-period exponential moving average crosses above a 50-period average, provided the bar is on or after 1 January 2020. It closes

Strategy v5 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Bitpanda Coinrule Template
13 stars

Ruckard Noro TrendRibbon E003 is a trend-following strategy that combines Noro TrendRibbon directional bias with a high and low moving average price corridor. It enters long positions when the trend ribbon is bullish and price drops below the lower corridor th

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon E003

This strategy plots dual moving average clouds and a long-term trend filter directly on the price chart alongside Heikin Ashi data. It triggers long and short entry signals using moving average alignments and pivot trendline levels, with optional filtering via

Strategy v5 TrendMoving averages
Updated 5 months ago · None stated GitHub repository of Heikin Ashi with Pivot Trendlines Strategy
1 stars

This strategy evaluates a multi-timeframe moving average setup by requesting a 6-period exponential moving average computed on a monthly calendar timeframe. It operates directly on the price chart and triggers trade executions when the current bar close crosse

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of PF MTF Isolate - Monthly EMA(6) Cross

Risk limits probe r2

by GammaExpansion
1 stars

This strategy probes TradingView risk-limit behavior in a separate pane. It cycles timed entries in a chosen direction, then closes and cancels orders on a fixed bar schedule. A mode input activates one of drawdown cash, drawdown percent, intraday cash loss, i

Strategy v6
Updated 7 days ago · MIT GitHub repository of Risk limits probe r2
1 stars

A strategy that changes its entry type with volatility and uses a 200 EMA as a direction gate, long above and short below. When ATR is below its average it fades moves beyond the prior range. When ATR is expanding it takes range breakouts that close with a str

Strategy v6 Volatility & bandsBreakout
Updated 2 months ago · None stated GitHub repository of TN Sovereign Adaptive Regime
1 stars

A Pine v4 strategy that plots a 21-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of YFIXBT EMA Cross Strategy

Bjorgum Double Tap

by hasnocool
106 stars

Bjorgum Double Tap is a price-chart strategy that detects double-bottom and double-top patterns from pivots. It enters long or short when those patterns form, and it can flip into the opposite direction while a position is open. Targets and stops are Fibonacci

Strategy v5 Support & resistanceBreakout
Updated 2 years ago · GPL-3.0 GitHub repository of Bjorgum Double Tap

MACD Strategy

by TWODS-CAPITAL
37 stars

This strategy plots on the price chart and builds a MACD line as the difference between a fast and a slow exponential moving average of close, then smooths that line into a signal. The histogram is their difference. It opens a long when the histogram crosses a

Strategy v5 Oscillators & momentumMoving averages
Updated 3 years ago · MIT GitHub repository of MACD Strategy
13 stars

This strategy combines Noro Trend Ribbon directional shifts with High and Low moving average price corridors and ADX momentum filtering. It evaluates market strength using configurable ADX key levels to filter trades during choppy or weak trend conditions. Use

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon F005

This strategy calculates double-smoothed Heikin Ashi candles and plots them directly on the price chart alongside a smoothed Relative Strength Index. It evaluates market conditions against external volatility data from an inverse symbol, generating long and sh

Strategy v5 Candlestick patternsOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Heikin Ashi with Session Wicks Strategy
1 stars

PF MTF probe - weekly SMA(10) cross is a multi-timeframe trend-following strategy designed to test weekly moving average interactions. It calculates a 10-period Simple Moving Average on a weekly timeframe using request.security without lookahead bias. When the

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of PF MTF probe - weekly SMA(10) cross

RSI Reversal

by GammaExpansion
1 stars

This long-only strategy calculates an RSI and a long exponential moving average. It enters when RSI crosses above the oversold level while price is above the trend average and no position is open. It closes when RSI crosses the midline or a mirrored overbought

Strategy v6 Oscillators & momentumMoving averages
Updated 7 days ago · MIT GitHub repository of RSI Reversal
1 stars

A swing strategy on the price chart that takes long signals when a 9 EMA crosses above a 21 EMA with RSI above 50, and shorts on the opposite cross. An optional multi-timeframe filter checks a weekly EMA trend and four-hour RSI momentum before accepting a sign

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign Adv Swing
1 stars

A Pine v4 strategy that plots a 33-period exponential moving average of the close in orange on the price chart. It goes long when a green candle opens above the average and short when a red candle opens below it, closing each position when the opposite signal

Strategy v4 Moving averagesTrend
Updated 4 years ago · None stated GitHub repository of ZECBTC EMA Cross Strategy
114 stars

This strategy plots two Hull Moving Average variations on the main price chart, optionally smoothed with an adaptive Kalman filter algorithm. It enters long positions when the faster moving average crosses above the slower moving average and enters short posit

Strategy v4 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Hull Trend with Kahlman Strategy

Boftei's Strategy

by hasnocool
106 stars

Boftei's Strategy plots the difference between the log of the current close and the close a chosen number of bars earlier in a separate pane. It draws positive and negative histogram bars, a thin line of the same value, and dotted threshold lines. Crosses of t

Strategy v5 Oscillators & momentumMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Boftei's Strategy
13 stars

This strategy evaluates market trend direction using a Noro TrendRibbon and creates a price corridor based on recent moving-average extremes, plotting directly on the price chart. It executes long entries when price dips below the corridor during an upward tre

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon G004

This strategy plots smoothed Heikin Ashi candlesticks directly on the price chart. It filters entries using CCI and Stochastic crossovers calculated on a separate higher timeframe. Long signals trigger on CCI crossing above 60 and Stochastic crossing above its

Strategy v5 Candlestick patternsSessions & time Repaints
Updated 5 months ago · None stated GitHub repository of Heikin Ashi with Session Wicks Strategy
1 stars

This strategy is a multi-timeframe parity probe that plots on the price chart. It requests the 60-minute close with lookahead off and treats a change in that value as a higher-timeframe close roll. On each roll it enters one long unit. On the next bar after a

Strategy v6
Updated 7 days ago · Apache-2.0 GitHub repository of PF MTF probe 01 — 60m close roll

S Exit Brackets

by GammaExpansion
1 stars

A backtesting verification strategy designed to test bracket exit order execution rules in Pine Script v6. It automatically triggers long and short entries at predetermined bar index cycles, applying tight and mixed exit brackets using absolute price stops, li

Strategy v6
Updated 7 days ago · MIT GitHub repository of S Exit Brackets
1 stars

A strategy that enters on a 9 and 21 EMA crossover, optionally confirmed by RSI above 40 for longs or below 60 for shorts. Trades must agree with a 200 EMA market filter and a weekly 20 EMA taken from the previous completed week. Position size is set so the di

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign Advanced Swing

Boilerplate

by hasnocool
106 stars

Boilerplate is a foundational framework designed for automated strategy development. It integrates multi-timeframe Exponential Moving Average (EMA) and Average Directional Index (ADX) filters to avoid trading counter-trends or choppy markets, along with a sess

Strategy v5 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of Boilerplate
13 stars

This strategy pairs the Noro Trendribbon directional filter with price corridors formed by high and low moving averages. In an uptrend, it initiates long trades when price pulls below the upper band corridor, while in a downtrend it enters short positions when

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon H005
1 stars

This strategy monitors two higher timeframes of 60 minutes and 240 minutes. It calculates whether the close on each timeframe exceeds the prior bar close, then checks if both are rising. When both conditions hold and no position exists, it enters a long trade

Strategy v6 Trend
Updated 7 days ago · Apache-2.0 GitHub repository of PF MTF probe 02 — dual TF closes
1 stars

This strategy tests and demonstrates TradingView risk management using strategy.risk.max_intraday_filled_orders. It tracks the bar count within each day, triggering long entries and position exits across the initial bars of a trading session. Once the maximum

Strategy v6
Updated 7 days ago · MIT GitHub repository of S Risk Max Intraday Filled Orders
1 stars

This strategy calculates fast and slow exponential moving averages alongside the Average Directional Index. It plots both moving averages on the price chart and displays an on-screen table tracking trend strength, directional bias, and volatility. A long posit

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of Tn Sovereign ADX Trend

A strategy based on Bollinger Bands that enters long positions when price crosses above the lower band and short positions when price crosses below the upper band. Take-profit, stop-loss, and scale-in price levels are dynamically calculated from the position a

Strategy v5 Volatility & bandsMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of Bollinger Band Strategy with Split, Limit, Stop
13 stars

A trend-following strategy that combines the Noro TrendRibbon direction filter with high and low moving average corridors. It determines the dominant market direction from the trend ribbon and opens positions when price moves outside the corridor, taking long

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard Noro TrendRibbon I002

PF MTF probe 03 — 60m SMA(20)

by pineforge-4pass
1 stars

The strategy computes the 20-period SMA on the 60-minute timeframe using request.security to obtain the HTF series. It generates long signals on SMA crossovers where the HTF close crosses above the SMA from below and exits long positions on downward crossovers

Strategy v6 Moving averagesTrend
Updated 7 days ago · Apache-2.0 GitHub repository of PF MTF probe 03 — 60m SMA(20)

S Trailing

by GammaExpansion
1 stars

S Trailing is a Pine Script v6 strategy that applies trailing stops to periodic cycle-based entries. It divides the bar index into cycles of 40 bars and activates at specific phases: long entry with trailing price stop at phase 0, short entry at phase 14, plus

Strategy v6 Mean reversionScalping
Updated 7 days ago · MIT GitHub repository of S Trailing

TN Sovereign Audit

by raybird
1 stars

A strategy on the price chart that scores each bar from 0 to 4 using four checks: volume against its average, price against a higher-timeframe EMA, bar movement against an ATR noise level, and a fast EMA above a slow EMA. The score maps to signal grades, and a

Strategy v6 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of TN Sovereign Audit

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