Pine Library · 3,040 open-source scripts

Free TradingView Strategy Scripts (page 31)

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

教學範例-回測

by TaichiS
219 stars

This Pine Script strategy demonstrates a basic moving average crossover backtest overlay on the main price chart. It plots a 20-period simple moving average and a 60-period simple moving average. The script enters a long position of 1,000 units when the faster

Strategy v4 Moving averagesTrend
Updated 5 years ago · None stated GitHub repository of 教學範例-回測

5 Minute Scalp

by hasnocool
106 stars

This strategy overlays three exponential moving averages on the price chart, with periods of 9, 50, and 200. It calculates a MACD histogram from a 1-minute timeframe, applies Bollinger Bands to the histogram, and tracks two RSI oscillators of different lengths

Strategy v5 ScalpingMoving averages
Updated 2 years ago · GPL-3.0 GitHub repository of 5 Minute Scalp

This strategy identifies breakout entries on low-timeframe cryptocurrency charts by combining rolling pivot support and resistance levels with a smoothed trend filter and a 3-period exponential moving average. Long and short entries trigger when price momentum

Strategy v5 TrendBreakout Repaints
Updated 2 years ago · None stated GitHub repository of V1 Binancash - Futures Strategy Futures 1M Candles

RSI/BB 1minute Study

by SammyEnigma
18 stars

This strategy calculates the Relative Strength Index (RSI) alongside Bollinger Bands to identify oversold bounce opportunities on fast timeframes. Drawn in a separate pane, it plots the RSI oscillator with customizable overbought and oversold thresholds. A lon

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

This strategy implements the classic Turtle System 1 fast breakout model on the price chart. It calculates 20-bar Donchian channel highs and lows for trade entries and 10-bar bands for exits, utilizing ATR for position sizing and trailing stops. The strategy e

Strategy v6 BreakoutTrend
Updated 12 months ago · None stated GitHub repository of Seykota Alt 1: Fast Breakout (S1)

Divergenced C002

by ruckard
13 stars

Divergenced C002 is a trading strategy that identifies entry points using price divergences against the Squeeze Momentum Indicator. It compares price moves across Squeeze Momentum color changes to trigger long or short positions. Exits are generated by Curie c

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

This strategy scaffold calculates a standard Volume Weighted Average Price (VWAP) alongside upper and lower volatility bands set 1.5 ATRs away. It generates long entry signals when a confirmed bar closes below the lower band and short entry signals when a conf

Strategy v5 Mean reversionMoving averages
Updated 2 weeks ago · Custom licence GitHub repository of Nexural VWAP Reversion Scaffold

RSI Divergence Strategy - Eterna MCP

by EternaHybridExchange
9 stars

This strategy calculates the Relative Strength Index (RSI) and identifies bullish and bearish divergences using RSI and price pivot points. It plots the RSI oscillator, overbought and oversold threshold lines, and divergence markers in a separate pane. A long

Strategy v5 Oscillators & momentumDivergence
Updated 7 months ago · MIT GitHub repository of RSI Divergence Strategy - Eterna MCP

Volume Surge (Memecoin)

by muammeryldrm42
7 stars

This strategy identifies momentum breakouts by detecting sudden volume spikes relative to a simple moving average alongside rapid bar price gains. It plots signal triangles and volume spike markers directly on the price chart. When volume and bar return exceed

Strategy v5 BreakoutVolume
Updated 3 months ago · MIT GitHub repository of Volume Surge (Memecoin)
7 stars

This strategy combines the Moving Average Convergence Divergence oscillator with an Exponential Moving Average trend filter. It enters long positions when the MACD histogram crosses above zero while price stays above the long-term EMA filter. Long trades close

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · MPL-2.0 GitHub repository of MACD EMA Filter Strategy

This strategy seeks long entries by combining moving average trend filters with VMC Cipher momentum and money flow indicators. It identifies bullish trend alignment when price trades above the 200 EMA and records recent pullbacks to the 50 EMA, confirmed by po

Strategy v4 TrendMoving averages
Updated 3 years ago · Apache-2.0 GitHub repository of 50 EMA + 200 EMA + VMC Cipher Long Strategy
3 stars

This strategy evaluates price movement over a specified lookback period against custom percentage or price change thresholds. It generates buy or sell signals when movement rules are met, overlaid directly on the price chart. Users can customize entry criteria

Strategy v5 BreakoutOscillators & momentum
Updated 5 months ago · None stated GitHub repository of Bars%Move Strategy

Alper

by avatar-lavventura
2 stars

Alper is a separate-pane momentum trading strategy that combines WaveTrend oscillator crossovers with dual RSI divergence. It calculates fast and slow RSI metrics alongside WaveTrend indicator lines to identify momentum shifts. The strategy enters long positio

Strategy v4 Oscillators & momentum
Updated 7 months ago · None stated GitHub repository of Alper

My First Indicator

by wynnforthework
2 stars

This strategy plots EMA 25 in yellow and EMA 100 in green on the price chart. It generates buy signals on EMA 25 crossing above EMA 100 when ATR length 14 rises over two prior bars and volume exceeds prior bar. It opens a long position of 1 unit on signal. It

Strategy v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of My First Indicator

MACD Cross Strategy

by Web3Degenerate
2 stars

This strategy executes trades based on the initial MACD line crossover in the direction of the long-term trend defined by a 200 EMA filter. Position risk is calculated using a lookback swing high or low padded by an ATR multiple. The trade features a dual take

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of MACD Cross Strategy

This strategy overlays Parabolic SAR, linear regression channels, and Supertrend directly on the price chart. It identifies directional momentum shifts when Parabolic SAR flips, issuing buy and sell signals. Position exits are controlled using customizable per

Strategy v4 TrendSupport & resistance
Updated 4 years ago · MIT GitHub repository of Paraboic SAR + Regression Channels + Supertrend

Donchian Channel Breakout

by pineforge-4pass
1 stars

This strategy tracks price breakouts using Donchian Channels calculated from the highest highs and lowest lows over configurable lookback periods. It plots the upper, lower, and mid entry channels directly on the price chart. A long entry triggers when the bar

Strategy v6 TrendBreakout
Updated 7 days ago · Apache-2.0 GitHub repository of Donchian Channel Breakout

Over Buy Sell Strategy

by tthanhvu002sgu
1 stars

A momentum strategy on the price chart that combines RSI, MACD histogram, ADX with directional lines and a large-candle test against ATR. Bullish and bearish momentum states require all of these to agree and exclude overbought or oversold readings. It also rea

Strategy v5 Oscillators & momentumTrend
Updated 3 months ago · None stated GitHub repository of Over Buy Sell Strategy
1 stars

This strategy combines trend, volatility, and multi-oscillator filters to generate directional trades. It calculates an Arnaud Legoux Moving Average (ALMA), Keltner Channels, Bollinger Band width, the Chande Momentum Oscillator (CMO), Money Flow Index (MFI), a

Strategy v5 TrendOscillators & momentum
Updated 4 months ago · MIT GitHub repository of Channel Momentum Suite
1 stars

This strategy combines two Supertrend indicators with different factors and periods to identify trend direction on the price chart. The primary Supertrend (factor 3, period 10) signals flips for entries, confirmed optionally by a faster Supertrend (factor 2, p

Strategy v5 TrendVolatility & bands
Updated 8 months ago · None stated GitHub repository of Supertrend - Dynamic Trend Follower

Strategy Template

by zhuzp98
1 stars

An unfinished strategy template on the price chart. It sizes positions from a share of equity and sets up long and short entries with a stop loss and take profit placed as percentages of the entry price, defaulting to 3 and 30. The indicator, input and conditi

Strategy v5
Updated 1 year ago · None stated GitHub repository of Strategy Template

Supertrend

by akash-yellgetti
1 stars

A Pine v4 strategy built on the classic ATR Supertrend, with the ATR calculated either by Wilder's method or a simple moving average. It plots up and down trend lines with buy and sell labels, optional highlight fills, and alert conditions for direction change

Strategy v4 TrendVolatility & bands
Updated 2 years ago · None stated GitHub repository of Supertrend

ETHUSDT Binance 3m

by tseitz
1 stars

A Pine v4 strategy built on a session VWAP with percentage bands above and below. It enters long on a green candle opening above VWAP and short on a red one opening below it, ignoring doji candles through a body-size precision setting. A long that reaches the

Strategy v4 VolumeScalping
Updated 4 years ago · None stated GitHub repository of ETHUSDT Binance 3m
106 stars

This strategy places buy-stop and sell-stop orders around the opening-session high and low, offset by a user-defined pip gap, and only allows those orders during a separate trading session. It exits with a fixed or ATR-based stop loss and a matching take-profi

Strategy v5 Sessions & timeBreakout Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of 50 Pips A Day Strategy - Kaspricci

RSI/BB 1minute Study

by SammyEnigma
18 stars

This strategy plots an RSI line in a separate pane and calculates Bollinger Bands and band width without showing those plots. It enters long when price crosses under the lower band and RSI is at or below the buy level. When price crosses the upper band and RSI

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

This strategy executes trend-following breakout trades using asymmetric parameters for long and short directions. It calculates Donchian channels and ATR (N) to adapt to directional market speeds. Long positions utilize a longer entry lookback and tighter ATR

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 20: Asymmetric Long/Short

Divergenced D002

by ruckard
13 stars

Divergenced D002 is a trading strategy designed to identify entries based on price and Squeeze Momentum indicator divergences. It triggers long or short positions when histogram color transitions conflict with price higher highs or lower lows. Position exits a

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

SMA Crossover (50/200) - Eterna

by EternaHybridExchange
9 stars

This strategy plots a fast and a slow simple moving average on the price chart and enters long when the fast average crosses above the slow average, or short when it crosses below. Opposite crosses reverse the position. Inputs change the two lengths, leverage,

Strategy v5 TrendMoving averages
Updated 7 months ago · MIT GitHub repository of SMA Crossover (50/200) - Eterna
8 stars

MA+ATR+ADX+PP Strategy is a trend-following system that plots a simple moving average with an ATR-based envelope directly on the main price chart. It changes trend state to bullish when the low exceeds the upper envelope, and bearish when the high breaks below

Strategy v4 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of MA+ATR+ADX+PP Strategy

VWAP + Volume

by muammeryldrm42
7 stars

The VWAP + Volume strategy trades crossovers of the Volume Weighted Average Price confirmed by volume surges. It enters long or short positions when the closing price crosses above or below the VWAP line while volume exceeds its 20-period simple moving average

Strategy v5 VolumeBreakout
Updated 3 months ago · MIT GitHub repository of VWAP + Volume

Moving Average Cross

by SynergOps
7 stars

This strategy plots a short and a long exponential moving average on the price chart and compares them. It enters long after the short average stays above the long average for ten bars, and enters short after the opposite holds for ten bars. It tries to close

Strategy v5 TrendMoving averages
Updated 1 year ago · MPL-2.0 GitHub repository of Moving Average Cross

Cerebr

by jerryinyang
5 stars

This strategy combines optional Hull moving average, SuperTrend, and MACD conditions in a separate pane. It marks HMA rising or falling over a chosen period and SuperTrend long or short direction, and it treats MACD above or below its signal line as buy or sel

Strategy v4 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Cerebr

This strategy executes short trades based on trend confirmation and momentum exhaustion. It calculates a 50-period and 200-period EMA, requiring price to trade below the 200 EMA with a recent upward pullback through the 50 EMA. Short entries are further filter

Strategy v4 TrendMoving averages
Updated 3 years ago · Apache-2.0 GitHub repository of 50 EMA + 200 EMA + VMC Cipher Short Strategy
4 stars

This multi-mode trading strategy executes trades on the price chart using selectable technical models, including RSI-2 mean reversion, SuperTrend, MACD crossovers, Triple EMA, Bollinger Bands, or a combined multi-indicator approach. It filters trade entries us

Strategy v6 TrendOscillators & momentum
Updated 2 days ago · None stated GitHub repository of Simpleton KIMI – Enhanced
4 stars

This strategy calculates fast and slow exponential moving averages alongside an Average True Range value. It enters a long position when the fast EMA crosses above the slow EMA, and enters a short position on a cross under unless long-only mode is active. Stop

Strategy v6 Moving averagesTrend
Updated 2 months ago · MIT GitHub repository of EMA Cross Strategy [trugurpala]

My Strategy Name [Lab]

by mitchell-917
4 stars

This Pine Script v5 strategy calculates a simple moving average of a configurable source over a user-defined length. It generates long entries when close crosses above the moving average and short entries when close crosses below it. The strategy draws on the

Strategy v5 Moving averagesTrend
Updated 11 months ago · Custom licence GitHub repository of My Strategy Name [Lab]
4 stars

This strategy plots a fast, a slow and a derived average moving average on the price chart, each selectable as an EMA or SMA. A long entry requires a recent fast-over-slow cross outside the last four bars, price above the fast and the longer trend average, and

Strategy v4 TrendMoving averages Repaints
Updated 1 year ago · None stated GitHub repository of 3 EMA/SMA + Cross Strategy

Simple Alert Strategy

by augustoerni
3 stars

Simple Alert Strategy is a moving-average crossover system designed for automated webhook alerting. It computes a 3-period simple moving average on closing prices directly on the main chart. The strategy enters a long position when the price crosses above the

Strategy v5 Moving averagesTrend
Updated 2 years ago · None stated GitHub repository of Simple Alert Strategy

Alper

by avatar-lavventura
2 stars

Alper is a Pine Script v4 strategy that plots a WaveTrend oscillator in a separate pane and colors bars when the two WaveTrend lines cross. It requests one-minute Binance DOGE perpetual prices, builds fast and slow RSI values, and enters long or short only ins

Strategy v4 Oscillators & momentumScalping
Updated 7 months ago · None stated GitHub repository of Alper

NEODCA

by wynnforthework
2 stars

NEODCA is a Dollar Cost Averaging (DCA) strategy that combines MACD oscillators with volume-weighted moving average (VWMA) filters to execute trades. It supports long and short modes, placing base orders followed by up to eight safety orders scaled by multipli

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

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