Pine Library · 4,643 open-source scripts

Free Pine Script v5 Scripts (page 30)

Scripts written for Pine Script version 5. They still run in TradingView as they are, and the Pine Editor can convert them to version 6.

Pine scripts4,643
Code shown here2,378open licence
Updated in a year2,687
No repaint flag4,051

Pine Script v5: Indicators, Strategies and Libraries

Candle Strategy

by zhuzp98
1 stars

This Pine Script strategy identifies candlestick patterns such as engulfing, doji, hammer and star formations on the price chart. It applies SMA trend filters with fast and slow periods to confirm direction before plotting labels for bullish and bearish signal

Strategy v5 Candlestick patternsMoving averages
Updated 1 year ago · None stated GitHub repository of Candle Strategy
1 stars

A Pine v5 overlay, with Spanish labels, that plots smart money concepts on the price chart. It marks market structure breaks, optional structure mapping, strong and weak highs and lows, liquidity sweeps and bubbles, plus the most recent order blocks and breake

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 1 year ago · None stated GitHub repository of Smart Money Concepts

Fractal Engulfing Candles

by fiji-solutions
1 stars

The Fractal Engulfing Candles indicator identifies bullish and bearish engulfing candlestick patterns occurring near 10-period swing highs or swing lows. It plots green upward triangles below bullish engulfing bars at swing lows and red downward triangles abov

Indicator v5 Candlestick patternsSupport & resistance
Updated 2 years ago · None stated GitHub repository of Fractal Engulfing Candles

Moving Average Exponential

by Hurairahengg
1 stars

Calculates an Exponential Moving Average (EMA) and displays visual buy and sell trend signals directly on the price chart. The indicator calculates a 125-period EMA line by default and monitors crossover conditions between price and the EMA threshold. When pri

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of Moving Average Exponential
1 stars

An overlay that finds pivot highs and lows over an adjustable lookback, stores them, and tries to draw blue trend lines between consecutive pivots. It then marks Buy or Sell labels when a line has been touched within one percent for the chosen number of recent

Indicator v5 Support & resistanceMean reversion
Updated 2 years ago · None stated GitHub repository of Custom Trend Line Indicator

algo-trade-indian

by akash-yellgetti
1 stars

A strategy-type script for the price chart that marks the high, low and midpoint of the first part of each session, set by start hour and minute inputs, with alerts for price crossing above the high or below the low. It also plots VWAP, pivot-based support and

Strategy v5 Sessions & timeSupport & resistance
Updated 2 years ago · None stated GitHub repository of algo-trade-indian

Tweezer Lyfe

by RobACurtis
1 stars

Tweezer Lyfe is a TradingView strategy that identifies Tweezer reversal patterns on the price chart. It plots Bollinger Bands with RSI and stochastic indicators for momentum confirmation. Bullish signals require a prior bearish candle closing near the lower ba

Strategy v5 TrendOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Tweezer Lyfe
1 stars

This strategy calculates the Supertrend using ATR period and factor inputs, then plots green lines for up direction and red lines for down direction on the price chart. It signals long entries when Supertrend changes to positive and short entries when changing

Strategy v5 TrendMoving averages
Updated 2 years ago · MPL-2.0 GitHub repository of Hello World, Supertrend
1 stars

This long-only strategy buys when a short 3-period RSI crosses back above an oversold level of 35, provided the 14-period RSI is above 40 and price is above a 150-period EMA. It closes the position when price crosses under a 9-period EMA or falls below an 89-p

Strategy v5 Mean reversionOscillators & momentum
Updated 2 years ago · None stated GitHub repository of RSI 14 and 3 Mean Reversion Strategy
1 stars

A price chart overlay that combines an SSL channel system with ATR bands around the close. It offers a baseline, a first SSL line, a continuation line and an exit line, each with a selectable moving average type such as HMA, JMA, TEMA, Kijun or McGinley. Bars

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of SSL + QQE + RSI Indicator

This indicator plots Support and Resistance levels on the price chart. Support is drawn as a green line at the highest high over the specified length, and Resistance as a red line at the lowest low. An optional Directional Projection Trend line can be shown us

Indicator v5 Support & resistanceTrend
Updated 3 years ago · MIT GitHub repository of Woverine - Support & Resistance

Money Printer Go BRRRRRR

by sourdiesel1202
1 stars

A separate-pane indicator that sums scored readings from an imported helper library covering a moving average, ADX, DMI, MACD and on-balance volume into one combined value. That value is plotted as a blue line against reference levels at zero, 100 and minus 10

Indicator v5 Oscillators & momentumTrend
Updated 3 years ago · None stated GitHub repository of Money Printer Go BRRRRRR

ATR Filter

by JohnsonHsiao
1 stars

The ATR Filter indicator calculates the difference between two Average True Range (ATR) values calculated over short and long lookback periods. It subtracts the long-period ATR from the short-period ATR to determine relative volatility momentum. The script plo

Indicator v5 Volatility & bands
Updated 3 years ago · None stated GitHub repository of ATR Filter
1 stars

A strategy framework that provides switches for ATR bands, a trading session, a trend filter, three moving averages and take profit and stop loss levels. It has a session and weekday filter, backtest start and stop dates, and a long, short or both setting. Tak

Strategy v5 Sessions & timeVolatility & bands Repaints
Updated 4 years ago · None stated GitHub repository of Hotch Break Strat (Template)

This indicator turns Bollinger Bands, Keltner Channels or the average of both into a single normalised line in a separate pane, computed from Heikin Ashi close prices over a 200-bar window by default. The line is coloured lime above a bullish breakout level, r

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

This strategy divides a fixed price range between an upper and a lower limit into equally spaced grid levels and plots them on the price chart. It marks a buy when price crosses down through a grid and a sell when price crosses up through a grid, using either

Strategy v5 Support & resistanceMean reversion Repaints
Updated 2 months ago · None stated GitHub repository of Grid Bot Simulator [Alorse]

Mojito v3 Strategy

by namuan
318 stars

The Mojito v3 Strategy indicator evaluates volatility term structure by calculating the ratio between front-month and second-month VIX futures contracts. It smooths this ratio using a configurable median filter and compares the result against user-defined uppe

Indicator v5 Volatility & bands
Updated 2 months ago · MIT GitHub repository of Mojito v3 Strategy

ArrayGenerate

by ricardosantos79
261 stars

ArrayGenerate is a Pine Script v5 helper library that provides utility functions for array generation. It includes methods to build integer or floating-point sequence arrays over specified ranges and step sizes. It also features a function to extract historica

Library v5
Updated 4 years ago · None stated GitHub repository of ArrayGenerate

Flip Flop

by harryguiacorn
220 stars

Flip Flop is an overlay indicator that analyzes candle data over a customizable lookback period to track structural market extremes. It locates key levels, including the low of the highest bullish candle and the high of the lowest bearish candle within the win

Indicator v5 Support & resistanceVolatility & bands
Updated 1 year ago · None stated GitHub repository of Flip Flop

Test

by agutinbaigo28
147 stars

This utility script serves as a minimal testing tool designed to verify data flow within the backtest kit framework. It reads the current closing price and outputs a constant zero position state, sending both series directly to the TradingView Data Window with

Indicator v5
Updated 6 weeks ago · MIT GitHub repository of Test
114 stars

This indicator applies a k-Nearest Neighbors machine learning algorithm to predict market direction based on historical indicator patterns. It calculates normalized values from selected technical indicators, such as RSI, ROC, CCI, and volume, across short and

Indicator v5 AI / machine learningOscillators & momentum Repaints
Updated 1 year ago · None stated GitHub repository of Machine Learning: kNN-based Strategy

3C QFL Mean Reversal

by hasnocool
106 stars

3C QFL Mean Reversal is a strategy based on the Quickfinger Luc (QFL) trading methodology. It identifies breakdown buying opportunities below established price base levels and enters mean-reversion trades. The strategy includes multi-safety order DCA scaling,

Strategy v5 Mean reversionSupport & resistance Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of 3C QFL Mean Reversal

This strategy combines Linear Regression Candles with UT Bot trailing stop signals to generate trading setups. It calculates smoothed linear regression open, high, low, and close values alongside a signal line, while computing an ATR-based trailing stop. Long

Strategy v5 TrendMoving averages
Updated 3 years ago · MIT GitHub repository of Linear Regression Candles and UT Bot Strategy

Barcolor Example

by be-thomas
65 stars

This indicator evaluates candlestick relationships to identify inside bars and outside bars based on recent high and low price action. It draws directly on the price chart by altering the color of qualified bars. Inside bars are colored yellow, bullish outside

Indicator v5 Candlestick patterns
Updated 6 days ago · GPL-3.0 GitHub repository of Barcolor Example

Price of Apple

by PythonForForex
64 stars

This simple educational indicator requests and plots the daily closing price of Apple Inc. (AAPL) in a separate pane on the chart. It demonstrates the use of Pine Script security functions to pull data from an external symbol regardless of the current chart sy

Indicator v5
Updated 4 years ago · None stated GitHub repository of Price of Apple

Day Trading

by iamc1oud
56 stars

This indicator plots global forex trading sessions, opening ranges, and opening channels for Sydney, Tokyo, Frankfurt, London, and New York markets. It calculates and draws daily reference levels based on Average True Range (ATR) multipliers from the day open

Indicator v5 Sessions & timeSupport & resistance Repaints
Updated 2 months ago · None stated GitHub repository of Day Trading

Range Box

by milocaetano
48 stars

The Range Box indicator identifies the price bounds over a user-defined period and renders a visual rectangular box on the main price chart. It calculates the highest high and lowest low across a specified lookback length and updates a single dynamic box objec

Indicator v5 Support & resistance
Updated 3 days ago · MIT GitHub repository of Range Box

Calculates normalized moving average trend strength, historical volatility, and volatility-adjusted position sizing in a separate pane. It computes the percentage distance between fast and slow EMAs relative to price, evaluates standard deviation of daily retu

Indicator v5 Moving averagesVolatility & bands
Updated 1 year ago · None stated GitHub repository of Risk-Based Position Size Calculator

This strategy overlays the ETHUSDT perpetual price chart and is labeled for the five-minute timeframe. It calculates a smoothed stochastic oscillator from the open, high, and low, with adjustable K, D, and smoothing lengths plus overbought and oversold levels.

Strategy v5 Oscillators & momentumTrend Repaints
Updated 2 years ago · None stated GitHub repository of ETHUSDTPERP-5M - No repaint 2023

Turtle MACD Time-Zone Filter

by skywalker0803r
42 stars

This strategy enters long when price closes above the prior Donchian high and short when it closes below the prior Donchian low, only while flat and inside a Taipei-hour window. It exits on a MACD histogram reversal or through an ATR stop and a percentage take

Strategy v5 BreakoutOscillators & momentum
Updated 2 months ago · None stated GitHub repository of Turtle MACD Time-Zone Filter

Advance Decline Ratio

by TWODS-CAPITAL
37 stars

This indicator calculates and plots the ratio of advancing stocks to declining stocks on the New York Stock Exchange. It requests close prices from the USI:ADVN.NY and USI:DECL.NY ticker symbols using the security function and divides advances by declines. The

Indicator v5 Oscillators & momentum
Updated 3 years ago · MIT GitHub repository of Advance Decline Ratio

WaveTrend 3D

by nersent
29 stars

WaveTrend 3D is a redesigned oscillator that implements the classic WaveTrend algorithm with kernel-based regression for trend reversal confirmation and multi-timeframe support. It calculates a smoothed oscillator line and displays a symmetrical three-dimensio

Indicator v5 Oscillators & momentumDivergence
Updated 11 months ago · Custom licence GitHub repository of WaveTrend 3D
24 stars

This overlay indicator maps Smart Money Concepts on the price chart. It labels internal and swing breaks of structure and changes of character, marks bullish and bearish order blocks, equal highs and lows, fair value gaps, and premium, equilibrium, and discoun

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 12 days ago · Custom licence GitHub repository of Smart Money Concepts [LuxAlgo] test C

Benso RSI

by benso87
24 stars

This indicator calculates a Relative Strength Index using Wilder or Cutler calculation methods, accompanied by an optional smoothing moving average and a signal line. Plotted in a separate pane, it features defined bull and bear control and critical threshold

Indicator v5 Oscillators & momentumDivergence
Updated 4 years ago · MPL-2.0 GitHub repository of Benso RSI

This indicator computes a modified version of John F. Ehlers' Even Better Sinewave oscillator in a separate pane. It filters price data using a high-pass filter, smooths the output with a weighted FIR filter, and normalizes the amplitude using a three-bar powe

Indicator v5 Oscillators & momentum
Updated 1 year ago · None stated GitHub repository of John F. Ehlers - Even Better Sinewave Modified

HalfTrend + EMA

by msongkiet
16 stars

This indicator combines the HalfTrend trend-following algorithm with five exponential moving averages overlayed directly on the price chart. HalfTrend determines directional bias by evaluating local high and low price extrema over a selectable amplitude alongs

Indicator v5 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of HalfTrend + EMA

Crossing EMAs B

by ruckard
13 stars

Crossing EMAs B is a moving average crossover strategy designed as an example for Zignaly bot signal integration. It monitors a 14-period and a 28-period simple moving average on close prices, entering long when the short average crosses above the long average

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of Crossing EMAs B

Bte Strat

by f-cksociety
11 stars

Bte Strat provides a backtesting and trading engine framework implemented as an indicator on the price chart. It evaluates trade signals using selectable entry rules, technical filters like volume and moving averages, and dynamic exit strategies. The script pl

Indicator v5 TrendOscillators & momentum
Updated 4 years ago · MPL-2.0 GitHub repository of Bte Strat

Donchian Channel Breakout - Eterna

by EternaHybridExchange
9 stars

This strategy plots Donchian Channel bands, a middle line, and breakout signals directly on the price chart. It opens long positions when price breaks above the upper band and short positions when price breaks below the lower band, evaluated after confirmation

Strategy v5 TrendBreakout
Updated 7 months ago · MIT GitHub repository of Donchian Channel Breakout - Eterna

Ichimoku

by PipC
8 stars

This indicator plots the standard Ichimoku Kinko Hyo components directly onto the price chart. It calculates the Tenkan-sen and Kijun-sen midpoints, shifts the Chikou Span backward, and projects the Senkou Span A and Senkou Span B ahead to form the colored Kum

Indicator v5 TrendSupport & resistance
Updated 4 years ago · None stated GitHub repository of Ichimoku

Ichimoku Breakout

by muammeryldrm42
7 stars

This strategy executes trades based on Ichimoku Kinko Hyo breakouts combined with Tenkan-sen and Kijun-sen crosses. A long position triggers when price closes above the cloud top while the Tenkan-sen crosses above the Kijun-sen within a bullish cloud. A short

Strategy v5 TrendBreakout
Updated 3 months ago · MIT GitHub repository of Ichimoku Breakout
7 stars

This strategy plots a customizable Bollinger Band basis using selectable moving average types such as HMA, SMA, EMA, or others. It draws the basis line, multiple standard deviation levels, and fills the region between L1 and L6 on the price chart. Buy signals

Strategy v5 Volatility & bandsMoving averages
Updated 4 months ago · None stated GitHub repository of Bollinger Bands Strategy

ATR Bands

by SynergOps
7 stars

This indicator plots upper and lower bands around price using a scaled average true range. It offsets the bands from the close and lets the user set the ATR period and multiplier. Optional opposite bands mark take-profit zones at a separate scale factor. An op

Indicator v5 Volatility & bandsSupport & resistance
Updated 1 year ago · MPL-2.0 GitHub repository of ATR Bands

This strategy plots a 90-period exponential moving average from the weekly and daily charts plus a daily session VWAP on the price chart. It enters long when the weekly VWAP is above the weekly average and the daily VWAP crosses above the daily average, and en

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

FX Market Sessions

by itmakesyousick
7 stars

This overlay indicator draws up to three named trading sessions, defaulting to London, New York, and Tokyo, as colored boxes on the price chart. It uses a selectable timezone and optional history, and each session can be extended, given Fibonacci levels, or gi

Indicator v5 Sessions & timeSupport & resistance
Updated 3 years ago · None stated GitHub repository of FX Market Sessions

Confluence

by trsdn
6 stars

The Confluence indicator combines Bollinger Bands, RSI and MACD to generate signals on the price chart. It plots the upper Bollinger Band in green, lower Bollinger Band in red, the middle basis in blue, the RSI value and the MACD line with signal. A confluence

Indicator v5 TrendOscillators & momentum
Updated 7 days ago · MIT GitHub repository of Confluence

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