Pine Library · 3,040 open-source scripts

Free TradingView Strategy Scripts (page 23)

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

Lab-Doi-04

by theteelek
1 stars

This strategy plots on the price chart and uses daily EMA crossovers to generate signals for opening long positions in crypto trading. It activates between user-defined start and end dates and enters long trades when the fast EMA exceeds the slow EMA with bar

Strategy v6 Oscillators & momentumMoving averages
Updated 1 year ago · None stated GitHub repository of Lab-Doi-04

Parabolic SAR

by Studentcodee
1 stars

The Parabolic SAR strategy calculates the Parabolic SAR value to detect trend reversals on the price chart. It starts with a given acceleration factor and adjusts it dynamically between start and maximum values based on price movements. Long entries occur when

Strategy v6 TrendVolatility & bands
Updated 1 year ago · None stated GitHub repository of Parabolic SAR
1 stars

A strategy that trades with a short and a long EMA. A long entry needs price above the short EMA, which is above the long EMA, plus RSI below a level or price within a tolerance of a pivot low. Shorts mirror this in a downtrend near pivot highs. Each entry get

Strategy v6 TrendSupport & resistance
Updated 1 year ago · None stated GitHub repository of Profit Factor Optimized Strategy

TOTAL MTPI

by Mikelkulla
1 stars

This strategy calculates the TOTAL MTPI using a combination of multiple indicators including Trend Sniper, EMA, MAMA, Kijun Sen, Supertrend and others to determine the overall direction of the cryptocurrency market cap index. It signals long entries when the c

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of TOTAL MTPI

This strategy uses two simple moving averages, 10 and 20 periods by default. It enters long when the fast average crosses above the slow one and enters short on the opposite cross. Each trade is paired with an ATR-based stop loss and take profit, using separat

Strategy v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Moving Average Crossover Strategy

MA Cross Strategy

by mkdir700
1 stars

A simple long-only strategy for the price chart built on two simple moving averages. It buys when the fast average crosses above the slow one and closes the position when the fast crosses back below. A stop loss and a take profit, entered as numeric inputs, ar

Strategy v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of MA Cross Strategy

algo-trade-indian-commodity

by akash-yellgetti
1 stars

A strategy-type script for the price chart that draws the high, low and midpoint of the first part of each session, set by start hour and minute inputs, with alerts when price crosses the high or low. It adds VWAP and a SuperTrend with adjustable ATR period, m

Strategy v5 Sessions & timeTrend
Updated 2 years ago · None stated GitHub repository of algo-trade-indian-commodity
1 stars

This strategy plots the Supertrend indicator directly on the price chart using an Average True Range period and factor multiplier. It generates long entry orders when the Supertrend turns upward and short entry orders when it turns downward, simultaneously dis

Strategy v5 TrendVolatility & bands
Updated 2 years ago · MPL-2.0 GitHub repository of Hello World, Supertrend

Stochastic RSI MTF

by kritarth2121
1 stars

This strategy computes a smoothed Stochastic RSI and compares it with a signal line taken from the four-hour timeframe. It goes long when the four-hour reading is above its signal, the chart reading crosses up through 30 and price is above an exit EMA. It goes

Strategy v5 Oscillators & momentumMean reversion
Updated 2 years ago · None stated GitHub repository of Stochastic RSI MTF

ZigZag PA Strategy

by merdunal
1 stars

This strategy builds a zigzag from candle direction flips, optionally on an alternate timeframe (60 by default) or Heikin Ashi candles. From the last five zigzag points it measures XABCD ratios to flag harmonic patterns such as Bat, Butterfly and ABCD, and plo

Strategy v5 Support & resistanceBreakout Repaints
Updated 2 years ago · None stated GitHub repository of ZigZag PA Strategy

Hotch Build File

by rajatjpatel
1 stars

A strategy template rather than a finished system. It provides a session filter, weekday selection, backtest start and stop dates, a long, short or both direction setting, and plots for stop loss, take profit and entry price while a trade is open. The long and

Strategy v5 Sessions & time Repaints
Updated 4 years ago · None stated GitHub repository of Hotch Build File
1 stars

This Pine v5 strategy compares a 20-period EMA with a 50-period SMA. It enters long when the EMA is above the SMA and short when below, and also contains a second set of pullback entries and crossover-based closes. The code mixes two overlapping rule sets, so

Strategy v5 TrendMoving averages Archived
Updated 4 years ago · None stated GitHub repository of Moving Average Strategy

This strategy builds a normalised band reading from Bollinger Bands, Keltner Channels or the average of both, using Heikin Ashi closes over a 200-bar window by default, with an optional EMA smoothing. Bullish and bearish breakout levels at one and zero define

Strategy v5 Volatility & bandsBreakout
Updated 4 years ago · None stated GitHub repository of Breakout Bollinger Band and Keltner Channel Strategy
1 stars

A Pine v4 strategy that plots a session VWAP with an upper and lower band offset by a percentage of the high and low. It opens a long when a bar opens above the upper band, optionally only on green candles, and a short below the lower band on red candles, clos

Strategy v4 VolumeScalping
Updated 4 years ago · None stated GitHub repository of BTC USDT Binance 1m
330 stars

This strategy enters long when the MACD line crosses above its signal after RSI has been oversold within the last ten bars, and enters short on a MACD cross under after a recent overbought RSI. Each side can be switched off. Default stop loss and take profit a

Strategy v5 Oscillators & momentum
Updated 2 months ago · None stated GitHub repository of MACD Long Strategy [Alorse]
257 stars

This strategy calculates dynamic support and resistance levels using pivot highs and lows alongside a custom smoothed trend filter and a 3-period EMA. It identifies entry opportunities when price breaks out relative to the trend filter and short-term EMA cross

Strategy v5 TrendSupport & resistance Repaints
Updated 7 weeks ago · None stated GitHub repository of 30s - ES 1m Strategy Candle Bar

3Commas Bot

by hasnocool
106 stars

This strategy overlays moving averages on the price chart to generate long and short trade signals compatible with 3Commas bot automation. It sets stop losses relative to recent swing pivots buffered by an ATR multiplier, while exits are handled by a risk-to-r

Strategy v5 Moving averagesTrend
Updated 2 years ago · GPL-3.0 GitHub repository of 3Commas Bot
104 stars

This overlay strategy combines a machine-learning distance model with a MACD oscillator to open trades on the price chart. It compares recent history using cosine similarity or Euclidean and Lorentzian distance, then filters direction with selectable moving-av

Strategy v5 AI / machine learningOscillators & momentum
Updated 3 years ago · MIT GitHub repository of MLCEL and MACD Strategy

SMA RSI Strategy

by PythonForForex
64 stars

This strategy evaluates simple moving averages and the Relative Strength Index to generate trading signals. It calculates a 10-period SMA, a 30-period SMA, and a 14-period RSI. Long positions are entered when the fast SMA crosses above the slow SMA while RSI i

Strategy v5 TrendOscillators & momentum
Updated 4 years ago · None stated GitHub repository of SMA RSI Strategy

EMA Ribbon MACD

by iamrichardD
57 stars

This strategy combines an EMA ribbon with MACD confirmation and plots in a separate pane. It enters when ribbon alignment, optional MACD zero or signal crosses, volume, smart-money, and multi-timeframe filters agree, then exits with percentage stop loss and ta

Strategy v6 TrendMoving averages
Updated 1 year ago · Apache-2.0 GitHub repository of EMA Ribbon MACD
53 stars

This strategy trades EUR/USD on the price chart using a fast and slow exponential moving average crossover filtered by RSI. It enters long when the fast EMA crosses above the slow EMA while RSI is above 50 and below the overbought level, and enters short on th

Strategy v6 TrendMoving averages
Updated 2 months ago · MPL-2.0 GitHub repository of EUR/USD EMA9-21 + RSI Scalping Strategy
43 stars

This strategy calculates support and resistance pivot levels based on short-term open price extremes and combines them with multi-timeframe open prices and MACD indicators. It executes trades with user-defined percentage-based stop-loss and take-profit targets

Strategy v5 Support & resistanceOscillators & momentum Repaints
Updated 2 years ago · None stated GitHub repository of Futures - New Script

Greeffer BB Strategy

by SammyEnigma
18 stars

Greeffer BB Strategy is a mean-reversion strategy that combines Bollinger Bands with the Relative Strength Index. It enters long positions when price crosses below the lower band with RSI above 30, and enters short positions when price crosses above the upper

Strategy v4 Oscillators & momentumVolatility & bands
Updated 6 years ago · None stated GitHub repository of Greeffer BB Strategy
16 stars

This strategy implements a trend-following Donchian breakout system with pullback-based pyramiding. It initiates trades on Donchian channel breakouts and sizes positions based on ATR volatility risk. Instead of immediately adding units when the trend advances

Strategy v6 TrendBreakout
Updated 12 months ago · None stated GitHub repository of Seykota Alt 14: Pullback Pyramid

Crossing EMAs C

by ruckard
13 stars

Crossing EMAs C is an overlay strategy designed to demonstrate moving average crossover signals integrated with Zignaly alert triggers. Despite its name, the script calculates 14-period and 28-period simple moving averages. It enters a long position when the f

Strategy v5 Moving averagesTrend
Updated 1 year ago · None stated GitHub repository of Crossing EMAs C

Time and schedule

by JoelPasapera
11 stars

This strategy opens a long or short position on a chosen weekday when the chart hour falls inside a user-defined start and end window. With the buy toggle on, it enters long near the window start and short near the window end; turning the toggle off reverses t

Strategy v6 Sessions & time Repaints
Updated 5 months ago · Apache-2.0 GitHub repository of Time and schedule

Test Swing Screener

by TPCharts
10 stars

This script functions as a multi-symbol swing screener calculating the Relative Strength Index across up to 40 user-selected stock tickers using security calls. It evaluates whether each symbol's RSI exceeds a specified overbought threshold level. Inputs allow

Strategy v4 Screeners & dashboardsOscillators & momentum
Updated 5 years ago · GPL-3.0 GitHub repository of Test Swing Screener

EMA Ribbon (9/21/55) - Eterna

by EternaHybridExchange
9 stars

EMA Ribbon (9/21/55) is a TradingView strategy that calculates three exponential moving averages with periods 9, 21 and 55. It plots the EMAs on the price chart and colors the background ribbon according to bullish or bearish alignment. The strategy enters lon

Strategy v5 TrendMoving averages
Updated 7 months ago · MIT GitHub repository of EMA Ribbon (9/21/55) - Eterna
8 stars

This strategy identifies trend retracements and breakout entries using an adjustable moving average ribbon alongside higher-timeframe anchored moving averages, fractal pivots, and support and resistance level extensions. Bar colors can be customized using a 3-

Strategy v5 TrendMoving averages
Updated 4 years ago · None stated GitHub repository of Pullback Trading Tool ALT

Inducement

by muammeryldrm42
7 stars

This strategy identifies Smart Money Concepts (SMC) liquidity sweeps around recent pivot highs and lows. It monitors recent candles for false breakouts where price wicks beyond a swing level but closes back within the range. When confirmed by a strong directio

Strategy v5 SMC / ICT / price actionSupport & resistance
Updated 3 months ago · MIT GitHub repository of Inducement

This strategy overlays a 90-period simple moving average from the one-hour and four-hour charts with a daily session VWAP on the price chart. It buys when VWAP is at or above the four-hour average and crosses above the one-hour average, and sells short in the

Strategy v5 TrendMoving averages Repaints
Updated 3 years ago · MIT GitHub repository of 4h Bullish Buy 1h Bearish Sell Session

Simpleton v0.01_Claude is a multi-strategy trading engine designed for crypto markets that plots directly on the main price chart. It allows traders to execute individual strategies or combine signals into a multi-consensus model from up to twelve systems, inc

Strategy v6 TrendOscillators & momentum
Updated 2 days ago · None stated GitHub repository of Simpleton v0.01_Claude [12-Strategy Engine]

SMA Crossover

by DexWilder
4 stars

This strategy plots a fast and a slow simple moving average on the price chart. It enters long when the fast average crosses above the slow average and closes any open short at the same time. It closes the long and enters short when the fast average crosses be

Strategy v5 TrendMoving averages
Updated 3 days ago · None stated GitHub repository of SMA Crossover

RSI Mean Reversion

by latentwill
4 stars

This strategy calculates a short-term Relative Strength Index (RSI) oscillator to identify mean-reverting conditions. It triggers a long entry when the RSI drops below a customizable oversold threshold and a short entry when it rises above an overbought level.

Strategy v5 Oscillators & momentumMean reversion
Updated 8 days ago · None stated GitHub repository of RSI Mean Reversion

BTC Trend Pullback

by trugurpala
4 stars

This strategy enters long when price and a fast EMA sit above a slower trend EMA and RSI crosses back above a pullback level. Shorts use the opposite RSI cross only when long-only mode is off. It sizes each order as a percentage of equity and places an ATR-bas

Strategy v6 TrendOscillators & momentum
Updated 2 months ago · MIT GitHub repository of BTC Trend Pullback

PropFirm Ultra Strategy - QuantAlgo

by thesenegalesehitch
4 stars

This strategy overlays the price chart and combines Smart Money Concepts with prop-firm account limits. It scores setups using break of structure, fair value gaps, order blocks, volume spikes, and optional London or New York killzones. Entries use a minimum sc

Strategy v6 SMC / ICT / price actionSessions & time
Updated 4 months ago · Custom licence GitHub repository of PropFirm Ultra Strategy - QuantAlgo
4 stars

This long-only strategy overlays a slow simple moving average and Bollinger bands on the price chart and uses RSI as a filter. It enters when the close is at or below the lower band and RSI is at or below the oversold input, and it closes when the close is at

Strategy v6 Mean reversionVolatility & bands
Updated 5 months ago · None stated GitHub repository of Tetrad Elektro BB (Long Only)

动量策略-连续开单

by YooooungLee
4 stars

This strategy pairs dual exponential moving averages with a price momentum calculation to identify trend direction. It initiates long entries when the fast EMA trades above the slow EMA while momentum is positive, and enters short positions when the fast EMA f

Strategy v6 TrendOscillators & momentum
Updated 10 months ago · Apache-2.0 GitHub repository of 动量策略-连续开单

Inside Candle Detector

by might-tree
4 stars

The Inside Candle Detector identifies inside bar candlestick patterns where the current bar's high is lower than the previous bar's high and its low is higher than the previous bar's low. It categorizes inside candles as bullish or bearish based on the bar's o

Strategy v5 Candlestick patterns
Updated 3 years ago · None stated GitHub repository of Inside Candle Detector

This strategy combines Williams Vix Fix calculations with Stochastic and RSI indicators to identify potential market bottoms. It calculates synthetic volatility using standard deviation Bollinger Bands and percentile thresholds on the Williams Vix Fix. Long en

Strategy v4 Volatility & bandsOscillators & momentum
Updated 6 years ago · Apache-2.0 GitHub repository of Vix FIX / StochRSI Strategy

TQQQ MA+TSI

by yalili8521
2 stars

The TQQQ MA+TSI strategy executes trades based on triple simple moving average alignment combined with True Strength Index (TSI) divergence or momentum filters. Designed primarily for intraday stock trading, it evaluates price accumulation across fast, mid, an

Strategy v6 TrendOscillators & momentum
Updated 9 days ago · None stated GitHub repository of TQQQ MA+TSI

MATIC 2H ZEGUELA DEMABOT

by danielvm-git
2 stars

This strategy calculates up to three Double Exponential Moving Averages (DEMA) to determine trade entries directly on the price chart. It generates long signals on DEMA crossovers and short signals on crossunders, with conditional logic depending on active len

Strategy v4 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of MATIC 2H ZEGUELA DEMABOT

XAUUSD Strategy V4.17 is a Pine Script strategy that plots buy and sell signals on the gold price chart using Stochastic oscillator, RSI, EMA trend filters, Fibonacci zones, and ATR-based risk management. It supports confirm-only, confirm+scalp, or scalp-only

Strategy v5 Oscillators & momentumMoving averages

Lakshmi Strategy v1

by voletiramu
2 stars

This strategy draws supply and demand zones on the price chart based on manual inputs. It executes trades when price reaches zone levels and fires decoded signals from the Ghost Trade Pro methodology. Entries use percent-of-equity position sizing with a defaul

Strategy v6 Support & resistanceSMC / ICT / price action
Updated 6 months ago · None stated GitHub repository of Lakshmi Strategy v1

CTC Comet Strategy 7.2024.1

by wynnforthework
2 stars

This strategy executes trades based on dual exponential moving average trend alignment, customizable Bollinger Bands, and normalized ATR volatility thresholds. It enters positions in the direction of the moving average trend and manages risk using a dynamic st

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of CTC Comet Strategy 7.2024.1

Breakout Strategy

by Web3Degenerate
2 stars

This strategy identifies breakouts above or below a higher-timeframe reference level (daily by default) and executes trades with automated position sizing based on risk percentage. Entries occur when the close crosses the reference high or low for the first ti

Strategy v5 BreakoutSupport & resistance Repaints
Updated 2 years ago · None stated GitHub repository of Breakout 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