Pine Library · 656 open-source scripts

Free Candlestick Pattern Pine Scripts (page 7)

Open-source Pine scripts that find candlestick patterns: engulfing bars, pin bars, doji, inside bars, Heikin Ashi and multi-candle patterns.

Pine scripts656
Code shown here386open licence
Updated in a year368
No repaint flag575

Candlestick patterns: Indicators, Strategies and Libraries

This strategy identifies bullish and bearish Three Line Strike candlestick patterns combined with a dual moving average cloud and Volume Spread Analysis (VSA). It triggers long or short entries when a strike formation confirms in alignment with the moving aver

Strategy v5 Candlestick patternsTrend Repaints
Updated 2 years ago · GPL-3.0 GitHub repository of 3LS 3 Line Strike Strategy [Kintsugi Trading]

Zen Inside Bar

by Zen-Tim
29 stars

This indicator identifies inside bars on the price chart. An inside bar is a candle whose high is at or below the previous high and whose low is at or above the previous low. Matching bars are recolored with a user-selected color, defaulting to yellow, while o

Indicator v6 Candlestick patterns
Updated 2 weeks ago · MIT GitHub repository of Zen Inside Bar
26 stars

Feature Matrix - strategy is a minimal Pine Script v6 strategy designed to verify basic strategy execution functionality. It evaluates whether the closing price is higher than the opening price on the current bar. When a bullish candle forms, the script trigge

Strategy v6 Candlestick patterns
Updated 2 months ago · AGPL-3.0 GitHub repository of Feature Matrix - strategy

Spinning Top Finder

by shibisuriya
18 stars

This indicator detects Spinning Top candlestick patterns based on body thickness relative to the candle range. It calculates upper and lower limits using the candle length, half candle, and user-defined range percentage. When a candle's body falls within the m

Indicator v4 Candlestick patterns
Updated 4 years ago · None stated GitHub repository of Spinning Top Finder

DI Engulfing B002

by ruckard
13 stars

This strategy identifies trend-following engulfing setups filtered by a 200 EMA on the price chart. Long trades require price to be above the 200 EMA following three consecutive bearish candles engulfed by a bullish candle. Short entries mirror this structure

Strategy v5 TrendCandlestick patterns
Updated 1 year ago · None stated GitHub repository of DI Engulfing B002
6 stars

Institutional CRT Framework is an overlay indicator that highlights candlestick patterns including 2-candle rejection, 3-candle classic, inside bar consolidation, and outside bar ranges directly on the price chart. It offers optional time-session filtering acr

Indicator v6 Candlestick patternsSMC / ICT / price action
Updated 7 months ago · None stated GitHub repository of Institutional CRT Framework

TheStrat Suite

by 345-strategies
5 stars

This indicator implements Rob Smith's TheStrat price action methodology across up to six configurable timeframes. It classifies candles into inside, directional, and outside bars, identifies patterns like hammers, shooters, and failed 2s, and calculates magnit

Indicator v6 Candlestick patternsSupport & resistance Repaints
Updated 3 days ago · MPL-2.0 GitHub repository of TheStrat Suite

PIN BAR

by ryangaraygay
2 stars

The PIN BAR indicator identifies strong and weak pin bar candlestick patterns, including hammers and shooting stars, directly on the price chart. It evaluates pattern validity using major and minor wick-to-bar ratios, ATR volatility filters, volume thresholds,

Indicator v5 Candlestick patterns
Updated 1 year ago · MIT GitHub repository of PIN BAR

HTF Candles & Pivots

by itmakesyousick
2 stars

This indicator plots higher-timeframe candles and pivot point levels directly on the main price chart. It visualizes multi-timeframe price action through custom candle bodies, wicks, and central pivot range zones. As an analytical overlay, it provides visual r

Indicator v5 Support & resistanceCandlestick patterns
Updated 3 years ago · None stated GitHub repository of HTF Candles & Pivots

Engulfing Candles

by jayadevrana
1 stars

The Engulfing Candles indicator automatically identifies and highlights bullish and bearish engulfing candlestick patterns directly on the price chart. It checks whether the current bar fully wraps around the body of the previous bar and exceeds a customizable

Indicator v6 Candlestick patterns
Updated 3 days ago · MPL-2.0 GitHub repository of Engulfing Candles
24 stars

This indicator plots a Cipher B-style oscillator in a separate pane and can source its calculations from Heikin Ashi candles when that option is on. It draws WaveTrend lines with optional buy, gold, sell, and divergence dots, plus overbought and oversold level

Indicator v5 Oscillators & momentumDivergence
Updated 4 years ago · MPL-2.0 GitHub repository of Cipher B Heikin Ashi

DI Engulfing C003

by ruckard
13 stars

This strategy trades bullish and bearish body engulfing patterns on the price chart. It allows longs only when price is above the 200-period exponential moving average and shorts only when price is below it. A long needs three consecutive red candles followed

Strategy v5 Candlestick patternsTrend
Updated 1 year ago · None stated GitHub repository of DI Engulfing C003

Candle Pressure & Response (JMA) evaluates price action dynamics by calculating bidirectional candle pressure, upper and lower wick rejection fractions, body efficiency, and range expansion metrics relative to ATR. Each output series is smoothed using a Jurik

Indicator v6 Candlestick patternsVolatility & bands
Updated 2 days ago · MIT GitHub repository of Candle Pressure & Response (JMA)

LuckyFX RBtrader strategy

by MeridianAlgo
9 stars

LuckyFX RBtrader strategy is a price-chart candle filter. It marks a bullish condition when the current candle is bullish, the previous candle is bearish, and optional checks pass: body size between a minimum and maximum share of the previous body, prior candl

Indicator v6 Candlestick patterns
Updated 4 months ago · MIT GitHub repository of LuckyFX RBtrader strategy

TheStrat Suite

by 345-strategies
5 stars

TheStrat Suite is a multi-timeframe price action indicator implementing Rob Smith's TheStrat methodology. It calculates bar classifications for inside bars, hammers, shooters, failed 2s and outside bars across configurable timeframes. The indicator detects sig

Indicator v6 SMC / ICT / price actionCandlestick patterns Repaints
Updated 3 days ago · MPL-2.0 GitHub repository of TheStrat Suite

HTF Candles & Pivots

by itmakesyousick
2 stars

The HTF Candles & Pivots indicator plots higher timeframe candles alongside traditional pivot points, support and resistance levels on the current price chart. It calculates open, high, low, and close values from a user-selected timeframe and displays them wit

Indicator v5 Candlestick patternsSupport & resistance
Updated 3 years ago · None stated GitHub repository of HTF Candles & Pivots

MM Trap Pro

by Alaamo7
1 stars

MM Trap Pro is an overlay indicator that detects volume-backed bull and bear trap patterns on the price chart. It calculates a simple moving average of volume and identifies high-volume candles with significant body percentages that fail to break previous high

Indicator v6 VolumeCandlestick patterns
Updated 2 months ago · Custom licence GitHub repository of MM Trap Pro

Three Bar Reversal Pattern

by feliperazeek
1 stars

This strategy detects three-bar reversal patterns in normal, enhanced or both forms, derives support and resistance from them as levels or zones, and trades the reversals on the price chart. An optional trend filter uses a moving average cloud, Supertrend or D

Strategy v5 Candlestick patternsSupport & resistance
Updated 1 year ago · None stated GitHub repository of Three Bar Reversal Pattern

Wick Power Shift

by harryguiacorn
220 stars

Wick Power Shift calculates and plots the smoothed average sizes of upper and lower candlestick wicks in a separate pane. It measures lower wick length (distance from the lower body to the low) and upper wick length (distance from the upper body to the high),

Indicator v5 Candlestick patterns
Updated 1 year ago · None stated GitHub repository of Wick Power Shift

Zen rEMA

by Zen-Tim
29 stars

Zen rEMA is an overlay indicator that calculates an exponential or simple moving average and an ATR-normalized slope angle over a chosen lookback. Optional markers show an always-in state that turns long after two bull bars close above the average and short af

Indicator v6 Moving averagesTrend
Updated 2 weeks ago · MIT GitHub repository of Zen rEMA
12 stars

This overlay indicator assigns a next-candle bias from the prior candle: previous-candle high, previous-candle low, an inside-bar version of that bias, or none. Outside bars clear the bias. After each confirmed bar it records whether price tags the prior high

Indicator v5 SMC / ICT / price actionCandlestick patterns
Updated 1 year ago · None stated GitHub repository of Simplified Next Day Bias Model

The Candle Pressure Index measures buying versus selling pressure from candle geometry and relative volume. Each bar combines close location, body ratio, and volume rank into a raw pressure value. An exponential moving average of that pressure forms the CPI os

Indicator v6 Oscillators & momentumVolume
Updated 2 days ago · MIT GitHub repository of Candle Pressure Index [WavesUnchained]

Whiplash

by Anderson-ALGO
9 stars

Whiplash is a separate-pane indicator that smooths the difference between close and open with a user-selected moving average, then converts that series into a Z-score over a fixed lookback. Small candle bodies near zero are treated as chop, while readings beyo

Indicator v4 Candlestick patternsOscillators & momentum
Updated 5 years ago · None stated GitHub repository of Whiplash

This indicator identifies institutional Candle Range Theory (CRT) patterns directly on the main price chart. It detects two-candle rejection patterns, three-candle classic setups, inside bars, and outside bars. Users can enable time-anchored 4-hour CRT schedul

Indicator v6 Candlestick patternsSMC / ICT / price action

TheStrat Suite

by 345-strategies
5 stars

TheStrat Suite is a multi-timeframe price-action indicator for TradingView that implements Rob Smith's TheStrat methodology using Pine Script v6. It detects patterns including inside bars, hammers, shooters, failed 2s and outside bars across six configurable t

Indicator v6 SMC / ICT / price actionCandlestick patterns Repaints
Updated 3 days ago · MPL-2.0 GitHub repository of TheStrat Suite

Inside Bars

by etnt
2 stars

This indicator marks inside bars, candles whose high and low sit entirely inside an earlier parent bar’s range, including nested sequences of inside bars. It stores the parent bar’s high and low when a new inside-bar sequence starts and draws those levels on t

Indicator v5 Candlestick patternsSupport & resistance
Updated 1 year ago · MPL-2.0 GitHub repository of Inside Bars

VGF Price-Volume TEMA

by ryangaraygay
2 stars

This indicator colors chart bars based on a Triple Exponential Moving Average (TEMA) applied to candle body volume (candle body multiplied by volume). It categorizes market flow into trending bullish, trending bearish, or non-trending messy conditions based on

Indicator v5 VolumeCandlestick patterns
Updated 1 year ago · MIT GitHub repository of VGF Price-Volume TEMA

HTF Candles & Pivots

by itmakesyousick
2 stars

HTF Candles & Pivots is an indicator that overlays high time frame candles and pivot points on the price chart. It plots customizable candles with options for thickness, wicks, fill, history shift, and labels including day, average, and TD sequence. The script

Indicator v5 Candlestick patternsSupport & resistance
Updated 3 years ago · None stated GitHub repository of HTF Candles & Pivots

Candlestick Structure [LuxAlgo] detects multiple classic bullish and bearish candlestick patterns in the context of broader market structure. It evaluates patterns such as hammers, engulfing candles, stars, haramis, tweezers, and three-method formations agains

Indicator v5 Candlestick patternsTrend
Updated yesterday · Custom licence GitHub repository of Candlestick Structure [LuxAlgo]

This Pine Script indicator identifies liquidity sweeps and confirms signals using a close-back candle pattern directly on the price chart. It tracks recent swing highs and lows over a customizable lookback period. A bullish signal forms when a prior bar sweeps

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 2 months ago · MPL-2.0 GitHub repository of Liquidity Sweep + Close-Back Confirmation

30 min Pivot

by ChartsLector
41 stars

30 min Pivot is an overlay indicator that plots an exponential moving average (EMA) calculated from a specified timeframe (default 30 minutes) and flags specific multi-bar candle setups. It checks the relative distance between price and the higher-timeframe EM

Indicator v5 Moving averagesCandlestick patterns
Updated 3 days ago · None stated GitHub repository of 30 min Pivot

The Candle Story Engine evaluates multi-candle price action dynamics, analyzing pressure, sequence persistence, deceleration, and structural exhaustion across a customizable lookback window. Incorporating optional trend context via exponential moving averages,

Indicator v6 Candlestick patternsBreakout
Updated 2 days ago · MIT GitHub repository of Candle Story Engine [WavesUnchained]
7 stars

Multi-Ticker Anchored Candles overlays up to three user-selected symbols on the price chart as candles anchored to a chosen period, which defaults to the daily timeframe. Each symbol has its own color and an on or off toggle. Optional drawings mark session bre

Indicator v6 Candlestick patternsSessions & time
Updated 3 months ago · None stated GitHub repository of Multi-Ticker Anchored Candles

TheStrat Suite

by 345-strategies
5 stars

TheStrat Suite is a multi-timeframe price-action indicator that implements Rob Smith's TheStrat on the price chart. It classifies bars, marks inside bars, hammers, shooters, Failed 2s and outside bars, and plots magnitude and exhaustion targets plus stop level

Indicator v6 Candlestick patternsSupport & resistance Repaints
Updated 3 days ago · MPL-2.0 GitHub repository of TheStrat Suite
4 stars

This indicator detects the bullish Upside Tasuki Gap candlestick pattern on the price chart. It looks for a long green candle, a smaller gapped green candle, and a red candle that closes inside the gap without filling it, while an optional trend filter require

Indicator v5 Candlestick patternsTrend
Updated 1 year ago · None stated GitHub repository of Upside Tasuki Gap - Bullish

Price Action Toolkit

by TamTH-Dev
2 stars

The Price Action Toolkit is an indicator that combines several price action tools on the chart. It calculates the ATR with user-defined length and shows it in a table. It plots multiple Kaufman Adaptive Moving Averages (KAMA) with different lengths and sources

Indicator v6 TrendSupport & resistance
Updated 5 weeks ago · None stated GitHub repository of Price Action Toolkit
2 stars

Plots timeframe-adaptive moving averages and technical overlays directly on the price chart. It displays standard daily moving averages, weekly trends, or intraday averages depending on the active timeframe. The 200-period simple moving average dynamically shi

Indicator v5 Moving averagesVolatility & bands
Updated 1 year ago · MPL-2.0 GitHub repository of Key Moving Averages

HTF Candles & Pivots

by itmakesyousick
2 stars

This indicator overlays higher-timeframe candles and pivot levels on the price chart. It draws HTF candle bodies and optional wicks or hollow fills, plus vertical time-division lines. Labels can show the timeframe, an average, the weekday, and a TD sequential

Indicator v5 Candlestick patternsSupport & resistance
Updated 3 years ago · None stated GitHub repository of HTF Candles & Pivots

BTMM Pattern Detection

by jcortes254
3 stars

This overlay indicator marks bearish M patterns and bullish W patterns on the price chart, with optional structure lines and labels. It also detects evening and morning stars, railroad tracks, and cordofwoods, and can draw order blocks, fair value gaps, and br

Indicator v5 Candlestick patternsSMC / ICT / price action
Updated 1 year ago · None stated GitHub repository of BTMM Pattern Detection

This indicator identifies Shooting Star and Inverted Hammer candlestick patterns overlayed directly on the price chart. It evaluates candle body weakness, upper shadow length, and lower shadow proportions in combination with a trend lookback calculation. A Sho

Indicator v5 Candlestick patternsTrend
Updated 2 years ago · None stated GitHub repository of Shooting Star and Inverted Hammer Pattern

HTF Candles & Pivots

by itmakesyousick
2 stars

The script plots higher timeframe candles and pivot points directly on the price chart. Higher timeframe candles can display in Open-Close or High-Low style with adjustable thickness and wick visibility. They support multiple history access modes including new

Indicator v5 Candlestick patternsSupport & resistance
Updated 3 years ago · None stated GitHub repository of HTF Candles & Pivots

Despite the name, an indicator that combines many studies on the price chart: RSI overbought and oversold signals, MACD, Bollinger Bands, ATR, Stochastic, ADX trend strength, VWAP with bands, pivot-based support and resistance levels, simple candlestick patter

Indicator v5 Oscillators & momentumVolatility & bands
220 stars

This indicator identifies High Of Low Price (HOLP) and Low Of High Price (LOHP) candlestick setups based on price extremes over a specified lookback period. A HOLP signal triggers when the current bar closes above the high of a recent session low, whereas a LO

Indicator v5 Candlestick patternsBreakout
Updated 1 year ago · None stated GitHub repository of Candlestick Patterns - HOLP-LOHP

Reversal Breakout System

by TamaraKGreen
46 stars

This indicator detects inside candles inside larger parent candles on the price chart. It plots colored boxes around inside and parent candles, fills them with user-adjustable transparency, draws Fibonacci retracement lines and mother candle range lines, and d

Indicator v6 Candlestick patternsBreakout
Updated 7 weeks ago · None stated GitHub repository of Reversal Breakout System
43 stars

The Candle Bar - No Repaint indicator plots candlestick bars on the price chart. It sets the high and low to the maximum and minimum open prices from the previous three bars. The close of the bar is taken as the current open. The bar color turns blue when the

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Candle Bar - No Repaint

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