Pine Library · 3,040 open-source scripts

Free TradingView Strategy Scripts (page 58)

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

106 stars

This strategy scans the price chart for a large set of classic candlestick patterns and lets the user enable or disable each pattern. It classifies setups as bullish, bearish, or both, and can require price to be above or below an SMA 50, or aligned with both

Strategy v4 Candlestick patternsTrend
Updated 2 years ago · GPL-3.0 GitHub repository of All Candlestick Patterns Strategy

MTF EFI Strategy

by g-moe
3 stars

This strategy uses Elder Force Index on the price chart, combining price change with volume and a chosen moving-average smoother. Separate buy and sell thresholds can be enabled on up to seven timeframes, with 15, 30, 60 and 120 minutes on by default. Higher-t

Strategy v5 Oscillators & momentumVolume Repaints
Updated 5 months ago · None stated GitHub repository of MTF EFI Strategy

This strategy detects market regime state transitions based on pivot high and low break levels. It calculates pivot highs and lows using a specified strength setting and updates the market state when the close price breaks above the last pivot high or below th

Strategy v6 TrendBreakout
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe Market Shift Probe 03 Shift Driven Entry
1 stars

This strategy calculates dynamic upper and lower boundaries over a specified lookback period alongside expanding mathematical spiral levels. It monitors price rejections where candles penetrate the upper or lower spiral bounds but close back within them. When

Strategy v5 Support & resistanceMean reversion
Updated 7 weeks ago · None stated GitHub repository of Spiral Symmetric Strategy

All in One Strategy

by hasnocool
106 stars

This strategy overlays multiple switchable trading models onto the main price chart, allowing the user to select between standard RSI crossing, Connors RSI, MACD, EMA, or Stochastic signals. Entries execute in long, short, or bidirectional modes when the selec

Strategy v4 Oscillators & momentumMoving averages Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of All in One Strategy
1 stars

This strategy maintains a market regime state based on breaks through recent pivot highs and lows. It tracks pivot levels with user-set strength and flips from neutral to bull on price closing above the last pivot high or to bear on closing below the last pivo

Strategy v6 TrendSupport & resistance
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe Market-Shift-Probe-01-Shift-State
1 stars

TnSovereignSignalForgeV20 is a price-chart strategy that combines seven directional votes from RSI, EMA, MACD, volume, VWAP, Bollinger Bands, and a volume oscillator. A long condition requires the vote total to meet a minimum agreement setting. A thermodynamic

Strategy v6 Oscillators & momentumMoving averages
Updated 2 months ago · None stated GitHub repository of TnSovereignSignalForgeV20
106 stars

This multi-indicator strategy provides selectable trading engines based on crossing RSI, Connors RSI, MACD, EMA crossovers, or Stochastic oscillators. It enters long, short, or bidirectional positions within a specified date window when the selected indicator

Strategy v4 Oscillators & momentumMoving averages Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of All in One Strategy no RSI Label

Revers Demo

by be-thomas
65 stars

Demonstrates basic strategy position reversal mechanics during the first 100 bars of historical data. The strategy enters a long position of size four when market position is non-positive, and reverses into a short position of size six when market position is

Strategy v4
Updated 5 days ago · GPL-3.0 GitHub repository of Revers Demo

This Pine Script strategy computes rolling highest and lowest prices over a user-set window. It draws reference levels on the price chart and issues long signals on close crossing the prior rolling low plus short signals on close crossing the prior rolling hig

Strategy v6 TrendSupport & resistance
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe market-shift-probe-02-rolling-extreme
1 stars

This strategy plots on the price chart and combines seven scored models into a weighted composite. It scores RSI extremes, volume spikes against a 20-bar average, price versus VWAP, EMA 9 and 21 alignment, MACD direction, Bollinger band location, and an estima

Strategy v6 Oscillators & momentumMoving averages
Updated 2 months ago · None stated GitHub repository of TnSovereignSignalForgeV6

All-time-high

by hasnocool
106 stars

This strategy tracks the highest price on the chart and plots that all-time high plus bands at 90, 80, and 70 percent of it. It enters a long when the close falls below a user-set fraction of the high, defaulting to 80 percent, using full equity. It closes the

Strategy v4 Support & resistanceMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of All-time-high
1 stars

This strategy composes confirmed pivot breaks, a rolling price extreme, and a state-edge detector into overlay entries on the price chart. Market state turns bullish when close breaks the latest confirmed pivot high and bearish on a break of the latest pivot l

Strategy v6 Support & resistanceBreakout
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe market-shift-probe-integration
1 stars

This strategy plots on the price chart and measures fractal efficiency over 10, 20, and 40 bars. It multiplies those efficiencies into a connectivity score and requires a volume z-score above a threshold. A long opens when connectivity is high, the 10-bar aver

Strategy v6 TrendVolume
Updated 2 months ago · None stated GitHub repository of TnSovereignTopologicalSutureV6
106 stars

Calculates the correlation coefficient and covariance between the current crypto asset and a reference market index, such as CRYPTOCAP:TOTAL2, using higher-timeframe data. It tracks percentage price changes in rolling arrays to compute correlation alongside a

Strategy v4 TrendMoving averages Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Altcoin Correlation Meter
1 stars

This strategy enters trades based on EMA crossovers and manages exits with tight tick-based bracket orders on the price chart. It calculates fast and slow Exponential Moving Averages, triggering long entries on bullish crossovers and short entries on bearish c

Strategy v6 Moving averagesScalping
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe Scalping Tight TP SL Points
106 stars

This strategy executes long-only entries based on moving average pullbacks relative to a 504-period high. It enters when price dips between the 13 and 21 EMAs while remaining within ten percent of the recent high. The script plots green markers on new highs an

Strategy v4 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of AMRS LongOnly PartTimer
1 stars

This strategy plots a fast and a slow exponential moving average on the price chart and flips position when they cross. A crossover of the fast EMA above the slow EMA enters one unit long, and a crossunder enters one unit short. There is no stop loss, take pro

Strategy v6 Moving averagesScalping
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe scalping-probe-02-fast-ma-trigger
1 stars

The strategy calculates the point of control and value area from the volume profile using a lookback of 150 bars and 24 rows. It applies a fast EMA trend filter, a V18 coherence resonance check with minimum threshold of 1.6, and an ATR volatility filter requir

Strategy v6 VolumeSupport & resistance
Updated 2 months ago · None stated GitHub repository of TnSovereignVolumeProfileScalpV6

Aphrodite

by hasnocool
106 stars

This Pine Script strategy overlays signals directly on the price chart, combining pseudo-random normal distribution calculations with price primeness detection. It sizes positions using a fixed percentage of equity and accumulates long entries with heavy pyram

Strategy v4 TrendSupport & resistance
Updated 2 years ago · GPL-3.0 GitHub repository of Aphrodite
1 stars

This strategy combines a three-tier EMA stack, RSI momentum filtering, and channel breakout rules to generate trend-following entries on the price chart. It detects swing highs and swing lows to draw connecting trend lines across pivot points. Entries trigger

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe Trendmaster Integration

This overlay strategy builds two moving averages from a selectable EMA, WMA, or SMA and plots the faster one on the price chart. A buy signal is a crossover of the fast average above the slow average, and a sell signal is the opposite cross. It colors the aver

Strategy v4 TrendMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of Arch1tect's New Toy (Strategy Tester Version)
1 stars

PF Probe Trendmaster Trend Line Projection is a Pine Script strategy designed to evaluate trend line projections and slope math. It identifies swing pivot highs and lows using a configurable pivot strength setting and draws trend lines directly on the price ch

Strategy v6 TrendSupport & resistance
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe Trendmaster Trend Line Projection
1 stars

TnSovereignVwapRegimeV6 is a mean-reversion strategy designed to trade price exhaustion away from the volume-weighted average price (VWAP). It calculates standard deviation bands around a session VWAP and tracks price deviation in normalized standard deviation

Strategy v6 Mean reversionVolatility & bands
Updated 2 months ago · None stated GitHub repository of TnSovereignVwapRegimeV6
106 stars

This strategy calculates the Aroon Oscillator along with the Relative Strength Index (RSI) to generate long trading signals. It opens an initial long position when the Aroon Oscillator crosses above the zero line, and pyramids into the position if price dips b

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · GPL-3.0 GitHub repository of Aroon Oscillator Strategy
1 stars

This strategy tracks a three-tier exponential moving average (EMA) stack to identify trend alignment regimes. It defines a bullish state when fast EMA is above mid and mid is above slow, and a bearish state when inverted. Orders execute strictly on state trans

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe trendmaster-probe-02-multi-tier-ma
1 stars

Calculates the classic WaveTrend oscillator using exponential moving averages and absolute deviations of typical price. Entries trigger on momentum reversals across timeframe-specific overbought and oversold thresholds, filtered through configurable quality ga

Strategy v6 Oscillators & momentumMean reversion
Updated 2 months ago · None stated GitHub repository of TnSovereignWaveTrendV4
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

My Strategy

by g-moe
3 stars

This strategy calculates the average closing price from a lower 3-minute timeframe and plots the result in a separate pane using array sum on multi-bar aggregate data. It fetches lower-timeframe data via security lower tf and includes commented out crossover c

Strategy v5 Moving averages
Updated 5 months ago · None stated GitHub repository of My Strategy
1 stars

This strategy detects long and short signals using a fast EMA crossing above or below a slow EMA. Entries only trigger when a recent pivot exists for anchoring. Long entries place a stop loss at the last pivot low and a take profit at 2R distance using the ent

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe trendmaster-probe-03-pivot-tp-sl

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

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
1 stars

This strategy identifies volatility compression and corridor breakouts on the price chart. It detects squeeze conditions where Bollinger Bands compress inside Keltner Channels, combined with Donchian Channel range boundaries. Long trades trigger on an upward s

Strategy v6 Volatility & bandsBreakout
Updated 2 months ago · None stated GitHub repository of Zzc Corridor Sovereign v6
106 stars

An intraday trading strategy that calculates daily pivot points, support and resistance levels, previous day high/low, and typical price. Designed around specific trading sessions like Indian market hours (09:15 to 15:30), it draws key reference levels directl

Strategy v4 Support & resistanceSessions & time Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of ARR-Pivote-India-Stategy
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

PF probe wunder-scalper-probe-02-alert-message-templates is a strategy that generates long and short signals using a fast EMA of 5 crossing above a slow EMA of 13 on the price chart. It places fixed-size entries of 1 share on each crossover signal and emits al

Strategy v6 Moving averagesTrend
Updated 6 days ago · Apache-2.0 GitHub repository of PF probe wunder-scalper-probe-02-alert-message-templates

ZZC Market Structure Sovereign v6 is a trend-following strategy that combines directional pivot tracking with Keltner-style volatility corridors. It calculates pivot highs and lows alongside an EMA baseline bounded by ATR corridors. A long entry is triggered w

Strategy v6 TrendVolatility & bands
Updated 2 months ago · None stated GitHub repository of ZZC Market Structure Sovereign v6

This strategy implements a custom Parabolic SAR algorithm modified with Average True Range (ATR) to measure volatility steps. It calculates the SAR line, acceleration factors, and extreme points directly on the price chart. When a trend reversal occurs and per

Strategy v4 TrendVolatility & bands
Updated 2 years ago · GPL-3.0 GitHub repository of ATR Parabolic SAR Strategy [QuantNomad]
1 stars

Calculates fast and slow Exponential Moving Averages (EMAs) to identify trend shifts on the price chart. When the fast EMA crosses above the slow EMA, any open short position is closed before opening a long trade. When the fast EMA crosses below, any open long

Strategy v6 TrendMoving averages
Updated 6 days ago · Apache-2.0 GitHub repository of PF Probe Wunder-Scalper-Probe-Integration

ATR Stop Buy Strategy

by hasnocool
106 stars

This strategy calculates breakout thresholds around the previous bar's close using a 14-period Average True Range multiplier. It plots dynamic upper buy lines and lower stop-loss lines directly on the price chart. Long entries trigger when price breaches the u

Strategy v4 Volatility & bandsBreakout Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of ATR Stop Buy Strategy

Test

by be-thomas
65 stars

This strategy is a TradingView documentation example named Test. For the first one hundred bars it submits a long entry of ten units when the position is flat or short, and a short entry of ten units when the position is long. It has no inputs, no stop loss, a

Strategy v4
Updated 5 days ago · GPL-3.0 GitHub repository of Test
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

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