Pine Library · 3,040 open-source scripts

Free TradingView Strategy Scripts (page 45)

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

1 stars

A Pine v4 strategy that plots VWAP with upper and lower bands set by percentage inputs. It opens a long when price opens above the upper band and a short when it opens below the lower band, and exits when the open crosses back over VWAP. It offers double entri

Strategy v4 Volume
Updated 4 years ago · None stated GitHub repository of SlimScript VWAP Bands
330 stars

This strategy plots Bollinger Bands on the chart timeframe and a second pair from a selectable higher timeframe. It averages the two upper bands and the two lower bands, then shades the space between matching bands. It opens a long when the close falls below t

Strategy v4 Volatility & bandsMean reversion Repaints
Updated 2 months ago · None stated GitHub repository of Multi Bollinger Bands [Alorse]

This strategy plots automated Fibonacci bands paired with exponential moving averages on the price chart across strong, regular, and sideways trend modes. It triggers entry orders upon price interactions with configured Fibonacci thresholds and bullish signals

Strategy v5 Support & resistanceMoving averages Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Auto Fib Golden Pocket Band - Autofib Moving Average

This strategy enters long or short when price closes beyond a Donchian channel and can require a slow moving average, called the tide, to agree with the direction. It sizes each unit from ATR risk, sets an initial ATR stop, and adds units after further ATR mov

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 5: Close-Confirmed + Tide

This strategy enters long or short when eight conditions align over the last two bars. It requires EMA 10 and EMA 55 alignment on the one-hour, four-hour and daily charts, a positive ADX slope, matching monitor direction, and price relative to a 400-bar point

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard ABCBitcoin TradingLatino B002

This strategy plots three exponential moving averages on the price chart and measures their average slope in degrees over a chosen lookback. The visible logic looks for a stacked EMA order and a close that crosses back above the shortest average after dipping

Strategy v4 TrendMoving averages
Updated 3 years ago · Apache-2.0 GitHub repository of Triple EMA + Sloping Trend Short Strategy
4 stars

This strategy plots a fast and a slow exponential moving average on the price chart and enters when they cross. A long opens when the fast average crosses above the slow average, and a short opens on a cross below unless long-only mode is on. An optional trend

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of Universal Strategy [trugurpala]

Weird Renko Strat

by wynnforthework
2 stars

Weird Renko Strat requests a traditional Renko series for the chart symbol and compares the latest Renko close with the prior close. In the default mode it enters long when that close rises and short when it falls, then closes the opposing position when the di

Strategy v5 Trend
Updated 1 year ago · None stated GitHub repository of Weird Renko Strat
1 stars

This validation strategy evaluates the execution timing of stop loss and take profit orders in Pine Script. It enters a single long position at fixed daily wall-clock times (00:00 and 12:00 UTC) whenever the strategy is flat. Stop loss and limit profit targets

Strategy v6 Volatility & bands
Updated 7 days ago · Apache-2.0 GitHub repository of Parity Probe 01 - Stop/Limit Timing

A strategy version of a structure indicator that studies how price interacts with confirmed swing zones, role-reversal levels and CUSUM change-point levels. A state machine tracks a level, impulse, pullback and higher-low or lower-high sequence, then grades th

Strategy v6 SMC / ICT / price actionSupport & resistance
Updated 8 days ago · GPL-3.0 GitHub repository of Structure Physics v4.2 Rotation Confirmation Strategy
1 stars

This strategy identifies liquidity sweeps around swing pivot levels and trades reversals aligned with higher-timeframe trend context. It enters long when price pierces a prior pivot low and closes back above it while trading above the daily 200 EMA. Short entr

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

A Pine v4 strategy that redraws candles and plots VWAP with wide, inner and tight percentage bands. It signals a long on a green non-doji candle that opens above the tight upper band or closes above the inner one, with red candles for shorts. Inputs set long a

Strategy v4 Volume
Updated 4 years ago · None stated GitHub repository of SlimScript VWAP Candles
330 stars

This strategy calculates the Qualitative Quantitative Estimation (QQE) indicator by applying exponential moving averages to a relative strength index and its ATR range. It identifies shifts between bullish and bearish momentum to generate trading signals on th

Strategy v4 Oscillators & momentumTrend
Updated 2 months ago · None stated GitHub repository of QQE Signals [Alorse]

Try Trading Future

by dearvn
257 stars

This futures trading strategy combines Fair Value Gap (FVG) detection filtered by Average True Range (ATR) with multi-timeframe Exponential Moving Averages (8, 55, and 165 lengths). It identifies entry setups during a defined intraday trading session window wh

Strategy v5 SMC / ICT / price actionMoving averages Repaints
Updated 7 weeks ago · None stated GitHub repository of Try Trading Future
228 stars

This strategy identifies trade opportunities based on candlestick wick imbalances relative to the Average True Range. It enters positions when candle wicks exceed defined thresholds and filters out doji candles using a minimum body ATR requirement. Exits are h

Strategy v6 Candlestick patternsVolatility & bands Repaints
Updated 3 months ago · None stated GitHub repository of Super Negative R:R Wick Strategy
106 stars

Automatic Grid Bot Strategy simulates a grid trading system directly on the main price chart. It sets upper and lower price range boundaries and splits the defined range into grid levels to trade long, short, or both directions simultaneously. Users can config

Strategy v5 Support & resistanceMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of Automatic Grid Bot Strategy
16 stars

Seykota Alt 6 Pure ATR Stop is a trend-following strategy based on Donchian channel breakouts and ATR volatility trailing stops. It enters trades when price breaks out beyond the Donchian lookback channel, provided optional market regime and volume filters are

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 6: Pure ATR Stop

This strategy trades long and short using TradingLatino rules as ABCBitcoin interprets them. Entries need EMA 10 crossing or aligned with EMA 55 on the one-hour, four-hour, and daily charts, agreeing ADX slope and directional monitor, and price on the matching

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Ruckard ABCBitcoin TradingLatino C003
4 stars

This strategy trades USD/JPY on the price chart during Tokyo and London sessions. It enters long when the fast EMA crosses above the slow EMA while price is above the trend EMA and RSI is above its midpoint, and it enters short on the opposite cross. Position

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of USD/JPY Carry Trend [trugurpala]

Xiao Martin

by wynnforthework
2 stars

Xiao Martin is a Martingale DCA strategy that buys long positions as price drops. It enters an initial long trade and adds subsequent orders whenever price decreases by a user-defined percentage from the last entry price, subject to a cool-down period and bar

Strategy v5 Mean reversion
Updated 1 year ago · None stated GitHub repository of Xiao Martin
1 stars

This Pine Script v6 strategy isolates and tests market structure events, specifically Break of Structure (BOS) and Change of Character (CHoCH). Using swing points calculated from configurable pivot strength settings, it tracks structural direction and triggers

Strategy v6 SMC / ICT / price actionBreakout
Updated 7 days ago · Apache-2.0 GitHub repository of Parity Probe 02 - CHoCH/BOS Isolator
1 stars

This strategy couples a moving average crossover with external macroeconomic data imported via request.seed. It calculates a 20-period SMA on the fetched macro metric to identify Risk-On, Risk-Off, or Neutral market regimes. Long entries trigger when the 12 EM

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

SlimTrades

by tseitz
1 stars

A strategy on the price chart that combines RSI zones, MACD behaviour and long rolling highest and lowest levels to open and close positions. Inputs set the RSI thresholds for opening, adding and closing, the lookback of the two rolling ranges, a maximum numbe

Strategy v4 Oscillators & momentumSupport & resistance
Updated 4 years ago · None stated GitHub repository of SlimTrades
106 stars

The Automatic Moving Average strategy computes an adaptive moving average by dynamically adjusting its length based on price touches against candle wicks and bodies. It applies Exponential Moving Average smoothing to define trend direction and plots a color-co

Strategy v5 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of Automatic Moving Average
16 stars

This strategy enters on Donchian channel breaks and can trade long, short, or both. Position size for each unit is based on a percentage of equity divided by an initial ATR stop. A chandelier stop trails a multiple of ATR from the highest high since entry for

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 7: Chandelier Trail

This strategy evaluates market signals using a combination of Trend Indicator A-V2, Supertrend, and QQE Mod along with a VWMA trend line. It generates long or short entries when a specified minimum number of sub-strategies align. Position management includes c

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Ruckard AndresAristizibal Joya A006

Game Theory EMA Strategy

by eddiebelaval
7 stars

The Game Theory EMA Strategy combines triple Exponential Moving Averages with game theory modeling to generate trade entries on price charts. It evaluates buyer and seller momentum alongside volume weighting to compute expected utility metrics and Nash equilib

Strategy v6 TrendMoving averages
Updated 3 months ago · None stated GitHub repository of Game Theory EMA Strategy

This strategy plots three exponential moving averages on the price chart and opens long trades when those averages stack upward, price closes above the shortest average, and a smoothed stochastic RSI has K above D. It also requires a rising bullish candle on a

Strategy v4 TrendMoving averages
Updated 3 years ago · Apache-2.0 GitHub repository of Triple EMA + Stochastic Long Strategy (D)
4 stars

This strategy trades USD/JPY on the price chart. It enters long when a fast EMA crosses above a slow EMA and short when the fast EMA crosses below, but only during the Tokyo or London sessions in GMT. Each entry places an ATR-based stop loss and take profit us

Strategy v6 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of USD/JPY Forex Strategy [trugurpala]

升级版的马丁 -- DCA

by wynnforthework
2 stars

This Dollar-Cost Averaging (DCA) strategy enters trades using signal triggers from MACD, MFI, RSI, or Stochastic RSI. When price moves against the position, it executes Martingale safety orders using customizable volume multipliers and step percentages. Exits

Strategy v5 Oscillators & momentumMean reversion Repaints
Updated 1 year ago · None stated GitHub repository of 升级版的马丁 -- DCA

Parity probe 03 - equity mirror

by pineforge-4pass
1 stars

This strategy mirrors TradingView strategy.equity by computing position quantity as equity divided by close at each potential entry bar. It signals long entries every Monday at 00:00 UTC when no position exists and flattens at the next bar open. The overlay=tr

Strategy v6 Sessions & time
Updated 7 days ago · Apache-2.0 GitHub repository of Parity probe 03 - equity mirror
1 stars

A strategy conversion of a supply and demand zone indicator. Zone detection, strength scoring and break detection are unchanged: pivots with set bars left and right form ATR-sized zones that can be scored and tracked as they break. A new entries section places

Strategy v6 Support & resistanceVolatility & bands Repaints
Updated 8 days ago · GPL-3.0 GitHub repository of Supply & Demand Zones XL Strategy
1 stars

This strategy calculates Global Minimum Variance Portfolio (GMVP) optimal weights across three asset symbols using matrix algebra in Pine Script v6. It fetches log returns for the specified assets, computes their covariance matrix, and inverts it to rebalance

Strategy v6 Screeners & dashboardsVolatility & bands
Updated 2 months ago · None stated GitHub repository of TN Markowitz GMVP Sovereign v6

SlimTrades 15m

by tseitz
1 stars

A strategy on the price chart with defaults aimed at a 15 minute chart. It uses RSI zones and two rolling highest and lowest ranges to open longs and optionally shorts, and can add to a position on lows or highs when RSI reaches set levels. Exits use RSI close

Strategy v4 Oscillators & momentumSupport & resistance
Updated 4 years ago · None stated GitHub repository of SlimTrades 15m
106 stars

This script calculates and plots the Average Directional Index alongside directional movement values in a separate pane. Although declared as a strategy, it only plots the indicator oscillator against customizable minimum and maximum threshold levels without d

Strategy v5 Trend Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of Average Directional Index
16 stars

This strategy enters long or short breakouts when price crosses a Donchian channel and exits with a volatility-adaptive Donchian lookback that is shorter in low volatility and longer in high volatility. It sizes each unit from a percentage of equity and an ATR

Strategy v6 TrendVolatility & bands
Updated 12 months ago · None stated GitHub repository of Seykota Alt 8: Adaptive Exit

This strategy generates long and short trade signals by combining Trend Indicator A-V2, Supertrend, and QQE Mod. It executes entries on the price chart with integrated risk management features including a default stop loss, optional take profits, trailing take

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Ruckard AndresAristizibal Joya B003

Calculates three Exponential Moving Averages (short, intermediate, long) alongside Stochastic RSI to identify short trade entries. A short position opens when the EMAs align in a downward trend, Stochastic K crosses below D, and a bearish price bar closes belo

Strategy v4 TrendOscillators & momentum
Updated 3 years ago · Apache-2.0 GitHub repository of Triple EMA + Stochastic Short Strategy

This strategy generates trading signals using a dual exponential moving average cross confirmed by the Relative Strength Index. It restricts entries to specific market session hours (09:30-18:15 UTC+3) designed for Turkish VIOP index futures. Long positions en

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · MIT GitHub repository of VİOP BIST30 Alert Strategy [trugurpala]
3 stars

This strategy generates long trade entries when a short exponential moving average crosses above a long exponential moving average. It features comprehensive position management tools including an ATR-based stop loss, a maximum percentage loss threshold, a pro

Strategy v5 TrendMoving averages Repaints
Updated 5 months ago · None stated GitHub repository of EMA Crossover ATR Strategy
1 stars

This strategy is a parity probe that enters long only when the chart is flat at Monday 00:00 UTC. Position size is left to Pine's percent-of-equity path at 99 percent of equity, with no explicit quantity argument. It closes the position on a later bar after th

Strategy v6 Sessions & time
Updated 7 days ago · Apache-2.0 GitHub repository of Parity probe 04 - percent_of_equity sizing

Sweep and Engulf Strategy

by rosijay17-cmd
1 stars

A strategy that looks for a one-bar sweep and engulf pattern: a bar that takes out the previous low and closes above the previous high is bullish, and the mirror case is bearish. By default the trades are inverted, so a bullish pattern opens a short and a bear

Strategy v6 Candlestick patternsSMC / ICT / price action
Updated 8 days ago · GPL-3.0 GitHub repository of Sweep and Engulf Strategy
1 stars

This strategy stores a rolling matrix of RSI, ATR relative to price, and rate of change, together with each bar’s close direction. It averages outcomes from historical rows inside a fixed distance and treats that score as confidence. It enters long when confid

Strategy v6 AI / machine learningOscillators & momentum
Updated 2 months ago · None stated GitHub repository of TN Matrix kNN ML Sovereign

SlimTrades 15min

by tseitz
1 stars

A Pine v4 strategy that tunes MACD and RSI rules with fast and slow rolling high and low lookbacks of four and eighteen bars. Inputs set trailing-stop percentages for longs and shorts, RSI zone levels, a highest MACD close level, adds on lows, reopening on new

Strategy v4 Oscillators & momentum
Updated 4 years ago · None stated GitHub repository of SlimTrades 15min
330 stars

Alert BB + RSI [Alorse] is a multi-symbol mean-reversion strategy designed for cryptocurrency trading. It evaluates Bollinger Bands and the Relative Strength Index (RSI) across up to 20 user-defined ticker symbols simultaneously. The strategy enters long posit

Strategy v4 Oscillators & momentumVolatility & bands
Updated 2 months ago · None stated GitHub repository of Alert BB + RSI [Alorse]
106 stars

This strategy calculates smoothed average Stochastic lines using exponential moving averages applied to traditional Stochastic values. It triggers long entries when the averaged %K crosses above averaged %D while below 20, and short entries when %K crosses bel

Strategy v5 Oscillators & momentumMean reversion
Updated 2 years ago · GPL-3.0 GitHub repository of AVG Stochastic Strategy

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