Pine Library · 656 open-source scripts

Free Candlestick Pattern Pine Scripts

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

About Candlestick patterns Scripts

Pattern scripts scan each bar for shapes such as an engulfing candle, a hammer or an inside bar and label them on the chart.

A pattern is only complete when its last candle closes. Scripts that label patterns on the live bar can show a pattern that disappears by the close, so prefer ones that confirm on close.

81 of these 656 scripts are marked Repaints, or read higher-timeframe data with lookahead on.

Before You Use One

Candlestick patterns: Indicators, Strategies and Libraries

575 stars

The indicator plots ICT displacement candles on the price chart and can switch to retracement scanning. Displacement requires a move larger than a set share of the 14-bar average high-low range, lasting at least a chosen number of bars, with optional close, pr

Indicator v6 SMC / ICT / price actionCandlestick patterns
Updated 1 year ago · MPL-2.0 GitHub repository of ICT Displacement Candles Indicator

All Candlestick Patterns

by shunjizhan
292 stars

All Candlestick Patterns detects and highlights a wide range of bullish, bearish, and neutral candlestick patterns directly on the price chart. It features optional trend filtering using either a 50-period simple moving average or a combination of 50-period an

Indicator v4 Candlestick patternsTrend
Updated 3 years ago · None stated GitHub repository of All Candlestick Patterns
285 stars

Mean Reversion Strategy is an overlay strategy that identifies pullbacks using a long-term EMA, RSI, and candlestick patterns. It generates long signals when a bullish engulfing candle forms below the EMA while RSI is oversold, and short signals when a bearish

Strategy v4 Mean reversionCandlestick patterns
Updated 3 years ago · None stated GitHub repository of Mean Reversion Strategy

Body Mass Indicator

by harryguiacorn
220 stars

The Body Mass Indicator highlights candles with exceptionally large body ranges relative to recent price movement. It calculates the absolute distance between open and close prices. When enabled, it identifies bars where the body range achieves a new high over

Indicator v5 Volatility & bandsCandlestick patterns
Updated 1 year ago · None stated GitHub repository of Body Mass Indicator

Tester

by rapmd73
123 stars

Generates simulated order signals and tracks dollar-cost averaging (DCA) cycles to test webhook execution software. It marks buy signals on bearish candles and sell signals on bullish candles, with optional DCA logic that requires lower consecutive entries and

Indicator v5 Candlestick patterns
Updated 2 months ago · LGPL-2.1 GitHub repository of Tester

Strat Assistant

by rickyzcarroll
90 stars

The Strat Assistant indicator identifies candlestick patterns from the STRAT methodology on the price chart. It detects inside bars, 2-candle directional bars, 3-candle outside bars, and sequences like 212 and 222 for continuations and reversals. Shapes such a

Indicator v4 Candlestick patternsSupport & resistance
Updated 5 years ago · None stated GitHub repository of Strat Assistant
32 stars

Ghost Channels fits dynamic parallel trend channels over a configurable lookback window using linear regression or pivot swing methods. It layers confirmation signals onto the channel geometry, detecting candlestick pattern reactions at the rails, volume-confi

Indicator v6 TrendBreakout
Updated 3 days ago · MIT GitHub repository of Ghost Channels [mph1nance]

Stocks - Bullish Engulfing

by LouisLetcher
23 stars

This Pine Script strategy identifies classic bullish engulfing candlestick patterns to open long positions, deploying 100 percent of equity. It calculates a short-term Relative Strength Index to determine exits, closing open long positions when the RSI exceeds

Strategy v6 Candlestick patternsOscillators & momentum
Updated 3 months ago · Custom licence GitHub repository of Stocks - Bullish Engulfing

Marubozu Finder

by Tikam02
20 stars

Marubozu Finder identifies classic bullish and bearish Marubozu candlestick patterns based on the previous completed bar. It detects a bullish Marubozu when the previous bar's high equals its close and its low equals its open. Conversely, a bearish Marubozu is

Indicator v5 Candlestick patterns
Updated 2 years ago · Apache-2.0 GitHub repository of Marubozu Finder

Engulfing Patterns

by shibisuriya
18 stars

This indicator identifies and plots bullish and bearish engulfing candlestick formations directly on the price chart. It checks standard body-engulfing criteria using prior and current bar open and close values, with optional stricter filters for wick engulfme

Indicator v4 Candlestick patterns
Updated 4 years ago · None stated GitHub repository of Engulfing Patterns

This indicator detects bullish and bearish engulfing candlestick patterns on the main price chart based on configurable bar fullness and height filters. It identifies specific pattern variations, including 3-Strike reversals and 180-degree turnarounds, marking

Indicator v5 Candlestick patternsMoving averages
Updated 2 years ago · None stated GitHub repository of Bull & Bear Engulfing - 3 Strike and 180 Candles X EMA
15 stars

This indicator plots Bollinger Bands and smoothed HAMA candles on the price chart. It builds each candle from separate moving averages of open, high, low and close, using selectable EMA, SMA or WMA lengths. A simple moving average forms the band basis, and an

Indicator v5 Candlestick patternsMoving averages
Updated 4 months ago · Apache-2.0 GitHub repository of NSDT HAMA Candles with Bollinger Bands

Fractal Reclaim Strength

by selimgrsoy0-commits
12 stars

The indicator tracks four-bar fractal sweep and reclaim setups on chart timeframes of 15 minutes and above. It calculates Reclaim Strength based on where C2 closes relative to C1's range and plots level lines for the swept C1 extreme and C2 extreme. An on-scre

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 7 weeks ago · None stated GitHub repository of Fractal Reclaim Strength

ICT HTF Candles (fadi)

by dbruce1990
12 stars

ICT HTF Candles displays higher timeframe candle structures directly on the price chart using customized boxes and lines. It tracks up to six user-defined higher timeframes, plotting historical body, wick, and imbalance zones alongside optional price level tra

Indicator v6 SMC / ICT / price actionCandlestick patterns
Updated 1 year ago · None stated GitHub repository of ICT HTF Candles (fadi)

Pinbar strategy

by samgozman
11 stars

This strategy detects bullish and bearish pinbar candles on the price chart and opens a long or short position when the pattern appears and no trade is open. Take profit and stop loss are set from the signal candle's range using separate multipliers, and trail

Strategy v5 Candlestick patterns Repaints
Updated 3 years ago · None stated GitHub repository of Pinbar strategy

Calculates adaptive arithmetic candles by blending price data with Kaufman Efficiency Ratio smoothing and a linear regression anchor. It measures trend health using a zero-to-hundred Quality Score derived from market efficiency, regression slope, and normalize

Indicator v6 TrendCandlestick patterns
Updated 2 days ago · MIT GitHub repository of Adaptive Arithmetic Candles + Quality Score [WavesUnchained]
9 stars

This indicator implements Chanlun (Zen Theory) structural concepts directly on the main price chart. It identifies top and bottom fractals using five-bar pivot conditions and dynamically tracks high and low arrays to plot strokes (Bi) and segments. Traders can

Indicator v5 Support & resistanceCandlestick patterns
Updated 12 months ago · None stated GitHub repository of Chanlun Buy Sell Points Indicator

Markov Strategy

by Rohanom
9 stars

Markov Strategy is a mean-reversion quantitative strategy inspired by streak-based Markov chain analysis. Applied directly to the price chart, it monitors price action for consecutive downward closes. The strategy enters a long position after detecting six con

Strategy v5 Mean reversionCandlestick patterns
Updated 1 year ago · MIT GitHub repository of Markov Strategy

Bullish Engulfing Low

by chargersfan47
7 stars

Bullish Engulfing Low is an overlay indicator that marks a two-candle pattern: a bullish bar whose close is above the prior bar open and whose low stays above the prior low, after a bearish bar. When that condition is true it draws a right-extended horizontal

Indicator v6 Candlestick patternsSupport & resistance Repaints
Updated 5 months ago · None stated GitHub repository of Bullish Engulfing Low

BPA [yohtza]

by forecho
5 stars

This indicator plots key session-based price action reference levels on the price chart. It calculates and displays the current session open, previous day close, Globex session high and low, weekly open, and higher-timeframe boundaries. It also supports bar co

Indicator v6 Sessions & timeSupport & resistance
Updated 8 weeks ago · None stated GitHub repository of BPA [yohtza]
5 stars

This indicator screens many symbols for close-to-close inside bars, a stricter inside bar that also requires the close to continue in the prior candle's direction. It scans either a pasted symbol list or one page of a preset Nifty index list, with a hard limit

Indicator v6 Candlestick patternsScreeners & dashboards
Updated 3 months ago · MPL-2.0 GitHub repository of Close-to-Close (C2C) Inside Bar Screener

CTF Raid Indicator

by jerryinyang
5 stars

This indicator detects stop hunts, liquidity raids, and Rob Hoffman Inventory Retracement Bar breakouts directly on the main price chart. It tracks bullish and bearish retracement bars using dynamic arrays, identifying when incoming price action breaks these s

Indicator v5 SMC / ICT / price actionBreakout
Updated 2 years ago · None stated GitHub repository of CTF Raid Indicator
4 stars

JoppanFX Candlestick Patterns identifies classic single-candle and multi-candle price patterns directly on the main price chart. It checks for bullish patterns (Hammer, Inverted Hammer, Bullish Engulfing) and bearish patterns (Shooting Star, Hanging Man, Beari

Indicator v6 Candlestick patterns
Updated 3 weeks ago · None stated GitHub repository of JoppanFX | Candlestick Patterns

SHODAN9 Katana

by Narymunt
4 stars

SHODAN9 Katana is a trend-following strategy that generates trading signals using Heikin-Ashi candle color transitions. It enters long positions on the first green Heikin-Ashi candle after a series of red candles and enters short positions on the first red can

Strategy v6 TrendCandlestick patterns
Updated 5 months ago · BSD-3-Clause GitHub repository of SHODAN9 Katana
4 stars

This indicator recolors price candles from recent volume and range. It marks climax bars when current volume times range exceeds the prior ten-bar peak or volume is at least twice a ten-bar average, and rising bars at one and a half times that average. Bullish

Indicator v5 VolumeCandlestick patterns
Updated 9 months ago · None stated GitHub repository of Price-Volume Analysis

GainzAlgo V2 [Alpha]

by krishnandank
4 stars

This indicator generates buy and sell signals based on engulfing candlestick patterns, a candle stability ratio relative to true range, RSI thresholds, and a multi-bar price momentum condition. It draws visual signal labels on the chart alongside suggested tak

Indicator v5 Candlestick patternsOscillators & momentum
Updated 1 year ago · None stated GitHub repository of GainzAlgo V2 [Alpha]
3 stars

This strategy plots Bollinger Bands on the price chart and enters long only when flat. It buys on a strong bullish close above the middle band or on a small-body pullback that tags the middle band with a long lower wick. The stop sits below the signal bar by a

Strategy v5 Volatility & bandsBreakout
Updated 2 days ago · None stated GitHub repository of H4 布林ATR型態多單策略

Traffic Light Strategy

by Pa1-Tiwari
3 stars

The Traffic Light Strategy is a breakout trading system overlaid on the main price chart. It detects momentum transitions whenever two consecutive candles have opposing colors (bullish followed by bearish, or vice versa). Upon detection, it marks the combined

Strategy v6 BreakoutCandlestick patterns
Updated 10 months ago · MIT GitHub repository of Traffic Light Strategy

Brahmāstra

by HelloMoto069
3 stars

Brahmāstra plots a fixed 10-period exponential moving average on the price chart and marks candles that sit entirely beyond it. A red candle whose low is above the average gets a cross, and a later green candle that opens below and closes above that candle's h

Indicator v5 Moving averagesCandlestick patterns
Updated 1 year ago · None stated GitHub repository of Brahmāstra

Pivot Points

by roshaneforde
3 stars

The Pivot Points indicator plots horizontal lines on the price chart to mark bullish and bearish pivot points. It identifies shifts from bullish to bearish or vice versa by scanning the last 100 candles by default. Buy lines appear in blue and sell lines in re

Indicator v6 Support & resistanceTrend
Updated 1 year ago · MIT GitHub repository of Pivot Points
3 stars

This indicator detects and highlights Doji candlestick patterns directly on the price chart. It checks whether the absolute difference between the candle's open and close prices falls below a user-defined threshold relative to the closing price. The script dif

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Doji (Candlestick Pattern)

Combined Script

by maxits
3 stars

Strategy combining EMA and SMA trend alignment with pin bar candle patterns and moving average piercing. It triggers trades in the direction of the moving average fan when a pin bar forms, managing positions using an ATR-based stop loss, pip-based profit targe

Strategy v4 Moving averagesCandlestick patterns
Updated 4 years ago · None stated GitHub repository of Combined Script

Btc Version5pine

by WMW333
3 stars

This strategy detects volume-based trading signals on Bitcoin perpetual futures. It calculates volume spikes on green and red candles along with ATR for volatility filtering. Long entries trigger on red candles with high volume and specific spike conditions wh

Strategy v5 VolumeVolatility & bands
Updated 4 years ago · None stated GitHub repository of Btc Version5pine

MomGulfing

by rasimandiran
3 stars

MomGulfing is a momentum strategy that identifies trade setups using multi-bar engulfing candlestick patterns paired with volume confirmation. It triggers long or short entries when price breaks key candle bounds across one to three bars while volume expands.

Strategy v5 Candlestick patternsOscillators & momentum
Updated 4 years ago · MIT GitHub repository of MomGulfing

Sell-Only Strategy

by karma659
2 stars

This short-only strategy identifies sell setups by combining a 3-period RSI overbought condition with a bearish engulfing candlestick pattern. It triggers short entries when the open RSI exceeds 70 and momentum turns downward alongside a bearish engulfing bar.

Strategy v5 Oscillators & momentumCandlestick patterns
Updated 10 days ago · None stated GitHub repository of Sell-Only Strategy
2 stars

This indicator implements a streaming bar-by-bar port of the Chanlun theory decomposition pipeline directly on the price chart. It processes raw price action through Algorithm N containment normalization, identifies top and bottom fractals, connects them into

Indicator v5 Support & resistanceSMC / ICT / price action
Updated 3 months ago · None stated GitHub repository of Chanlun (chanlun-v1 port)
2 stars

This overlay approximates order-book liquidity from intrabar OHLCV buckets because true depth-of-market data is unavailable. It paints a decaying volume heatmap around price and labels absorption, exhaustion, rejection, and momentum when wick, body, delta, and

Indicator v6 VolumeSupport & resistance
Updated 4 months ago · None stated GitHub repository of Bookmap Liquidity Mapper [TReset]
2 stars

Strong Wealth Magnet is an overlay indicator that scores price action and draws selected narrative layers on the price chart. Up to three modes can run together, including a Pro layout and a Six Eyes view that reviews past signals over a chosen window and labe

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 6 months ago · None stated GitHub repository of Strong Wealth Magnet
2 stars

This indicator detects institutional candles where the body exceeds a multiple of the rolling average body size. It creates and draws supply and demand zone boxes directly on the price chart, validating them over subsequent bars to discard invalidated zones. W

Indicator v6 Support & resistanceSMC / ICT / price action
Updated 6 months ago · None stated GitHub repository of Ghost Zone v8 - Institutional Zones
2 stars

The LSD-15 indicator detects liquidity sweeps on 15-minute crypto charts by identifying price movements that exceed a threshold from swing highs and lows. It plots swing high and low lines on the price chart and highlights sweep candles in color. Multiple conf

Indicator v5 ScalpingSupport & resistance Repaints
Updated 7 months ago · None stated GitHub repository of LSD-15 Liquidity Sweep Detector

This indicator automatically detects and plots support and resistance areas on the price chart. It identifies reversal patterns using candlestick spikes, pivot points, and trend analysis while applying noise filtering for small candles. Areas get shaded with c

Indicator v6 Support & resistanceTrend
Updated 1 year ago · None stated GitHub repository of Trend Areas - Support/Resistance

15M

by etnt
2 stars

15M is an intraday chart overlay designed for 15-minute timeframes. It plots a volume-weighted moving average (VWMA) alongside a simulated 5-day moving average calculated from user-defined daily trading hours. The script detects several classic candlestick pat

Indicator v6 Moving averagesCandlestick patterns
Updated 1 year ago · MPL-2.0 GitHub repository of 15M

Advanced Scalping EMA & RSI Strategy is an overlay indicator that combines fast and smooth moving averages with RSI levels and candlestick patterns to generate scalping signals. Users can select calculation methods for moving averages, such as SMA, EMA, WMA, o

Indicator v5 TrendOscillators & momentum
Updated 2 years ago · MIT GitHub repository of Advanced Scalping EMA & RSI Strategy

IB & EMA

by jvalen01
2 stars

This TradingView indicator plots three exponential moving averages of 10, 21, and 50 periods on the price chart. Users toggle visibility of each EMA via a group input. It also colors bars yellow when an inside day forms, defined by the current bar's high and l

Indicator v5 Moving averagesCandlestick patterns
Updated 3 years ago · None stated GitHub repository of IB & EMA

BarUpDn Strategy

by jaabari
2 stars

BarUpDn Strategy is a lightweight indicator that identifies basic price momentum by comparing consecutive closing prices. It calculates the difference between the current close and the previous bar's close. When the close is higher, it displays an upward green

Indicator v5 Oscillators & momentumCandlestick patterns
Updated 3 years ago · None stated GitHub repository of BarUpDn Strategy

24hr High/Low/Mid

by codeGetFish
2 stars

This indicator calculates and plots rolling high, low, and midpoint levels over 24-hour, 48-hour, and 7-day lookback periods directly on the price chart. It projects standard Fibonacci retracement levels based on the 7-day range and detects doji candlestick pa

Indicator v5 Support & resistanceCandlestick patterns
Updated 3 years ago · None stated GitHub repository of 24hr High/Low/Mid

More Pine Script Categories

Browse the whole Pine Library

Related on ForexR

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.

Trade Your Charts With a Regulated Broker

Compare regulated brokers on platforms, spreads, minimum deposit and leverage.

Compare brokers