Pine Library · 656 open-source scripts

Free Candlestick Pattern Pine Scripts (page 3)

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

Candle Breaks 1v1 L+S

by chargersfan47
7 stars

This indicator detects 1v1 candle break setups for both long and short directions directly on the price chart. It identifies when the current candle closes beyond the open of the prior opposite-color candle, calculates a 1.618 Fibonacci extension target based

Indicator v6 BreakoutCandlestick patterns
Updated 5 months ago · None stated GitHub repository of Candle Breaks 1v1 L+S
7 stars

This strategy combines Ichimoku Kinko Hyo components, a Stochastic oscillator, and specific candlestick patterns to generate trade signals. It identifies Kumo twists and range breakouts while evaluating candle body shapes using Fibonacci threshold filters. Tra

Strategy v4 TrendOscillators & momentum
Updated 2 years ago · MIT GitHub repository of Soulevement / Ressaut Strategy

PA Indicators

by forecho
5 stars

This indicator plots price action tools directly on the main price chart. It shades candles according to Internal Bar Strength (IBS) and optional wick-length thresholds to differentiate trend bars from trading ranges. The script tracks session bar counts durin

Indicator v6 Candlestick patternsMoving averages
Updated 8 weeks ago · None stated GitHub repository of PA Indicators

TradeKit

by tanishq-rocks
5 stars

TradeKit is an all-in-one technical analysis indicator that consolidates multiple chart overlays into a single script on the price chart. It plots up to four customizable moving averages (SMA, EMA, SMMA, WMA, or VWMA), Bollinger Bands, VWAP, and reference leve

Indicator v6 Moving averagesCandlestick patterns
Updated 3 months ago · MPL-2.0 GitHub repository of TradeKit
5 stars

This indicator calculates and plots virtual daily candlestick OHLC values shifted forward by several hours relative to the current time. By aggregating four-hour bar data from higher-timeframe requests, it constructs custom 24-hour periods and renders them as

Indicator v6 Candlestick patternsSessions & time
Updated 7 months ago · MIT GitHub repository of Day Candle Closed Hour(s) Ago

HTF Raid Indicator

by jerryinyang
5 stars

HTF Raid Indicator plots higher timeframe candle overlay boxes and tracks liquidity raids directly on the price chart. It calculates higher timeframe open, high, low, and close values using a custom tracking function and renders the higher timeframe candles us

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 2 years ago · None stated GitHub repository of HTF Raid Indicator
5 stars

This indicator scans price bars for four Pivot Boss candlestick reversal setups and plots markers on the price chart. Extreme reversal compares a trigger bar with average lookback size and body coverage. Outside reversal looks for an engulfing bar larger than

Indicator v4 Candlestick patterns
Updated 3 years ago · None stated GitHub repository of [CP] Pivot Boss Candlestick Scanner
4 stars

This indicator plots a Heikin Ashi style oscillator built from RSI values in a separate pane. It calculates candles from a chosen source and RSI length, with optional smoothing of the candle open. Users can also show a separate RSI line, an RSI histogram, a st

Indicator v4 Oscillators & momentumCandlestick patterns
Updated 4 years ago · None stated GitHub repository of Heikin Ashi RSI Oscillator

JINADA Up

by cathxrsys
3 stars

JINADA Up is an all-in-one chart overlay indicator that combines support and resistance zones, multiple moving averages, candlestick body and wick ratio analysis, and dynamic stop levels. It identifies support and resistance levels across user-defined lookback

Indicator v6 TrendMoving averages
Updated 9 months ago · GPL-3.0 GitHub repository of JINADA Up
2 stars

Session Extreme Revisit identifies the highest supply candle and lowest demand candle formed during London and New York sessions and draws extended reaction zones on the price chart. It evaluates candidate candles using size, wick ratio, and displacement filte

Indicator v5 Sessions & timeSupport & resistance
Updated 5 months ago · None stated GitHub repository of Session Extreme Revisit — Pro
2 stars

Ghost Zone v9 plots chart overlay signals and key structural levels derived from reverse-engineered price action, volume spread analysis, and momentum filters. It identifies specific trading patterns including Low Volume Test (LVT), Signal Test (ST), Bull Trap

Indicator v6 VolumeCandlestick patterns
Updated 6 months ago · None stated GitHub repository of Ghost Zone v9 - GTI Signals v18a
2 stars

The script detects pin bar candlestick patterns by comparing each candle's body size to its total range and measuring the relative lengths of its upper and lower shadows. A bullish pin bar forms when the body is small, the lower shadow is at least twice as lon

Indicator v5 Candlestick patterns
Updated 10 months ago · None stated GitHub repository of Pin Bar Detector | Algobid

HTF Candles & Pivots

by itmakesyousick
2 stars

This indicator overlays higher-timeframe candles and traditional pivot levels on the price chart. It draws open-close or high-low candle bodies, optional wicks, and history modes that include shifting the previous higher-timeframe candle onto the current one.

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

Smart Money Concepts [LuxAlgo]

by srinivas-yarramsetti
2 stars

This indicator plots Smart Money Concepts elements on the price chart including internal and swing order blocks, bullish and bearish structures with BOS and CHoCH breaks, fair value gaps, equal highs and lows, and swing points. It can color candles according t

Indicator v5 SMC / ICT / price actionCandlestick patterns Repaints
Updated 3 years ago · None stated GitHub repository of Smart Money Concepts [LuxAlgo]
1 stars

This indicator overlays rolling cost anchors, volatility-derived GetDelta bands, and liquidity provider ranges onto the price chart alongside pinbar candlestick detection. It calculates market valuation zones, shading discount and premium areas while tracking

Indicator v6 Candlestick patternsVolatility & bands
Updated yesterday · AGPL-3.0 GitHub repository of BL-ESW Pinbar Market Lab Pro

Fibonacci SR Strategy

by moonyroy
1 stars

This strategy identifies bullish and bearish Pin Bar or Engulfing candlestick patterns interacting with Fibonacci levels calculated from a 1,440-bar lookback range. It enters long or short positions when a valid candlestick pattern crosses a Fibonacci level. E

Strategy v6 Support & resistanceCandlestick patterns
Updated 3 weeks ago · None stated GitHub repository of Fibonacci SR Strategy

Inside Bar Breakout

by JACKZHOU0521
1 stars

The Inside Bar Breakout indicator identifies inside bar patterns and detects subsequent price breakouts beyond the mother bar boundaries. It marks inside bars with diamonds, plots mother bar high and low reference lines, and generates close-confirmed breakout

Indicator v6 BreakoutCandlestick patterns
Updated 5 weeks ago · None stated GitHub repository of Inside Bar Breakout

An extended version of a Bollinger Band wick marker that labels candles with wicks beyond the bands on the 15-minute timeframe. It adds RSI overbought and oversold alerts, an RSI divergence check, a repeated-wick warning, shooting star and engulfing candle det

Indicator v6 Volatility & bandsCandlestick patterns
Updated 6 weeks ago · MIT GitHub repository of Bollinger Band Wick Marker with RSI Alerts

GrimmArty Strategy

by GreyssonEnterprises
1 stars

A Pine v5 strategy version of a candle and moving average indicator. It draws four smoothed moving averages (21, 50, 100 and 200), a trend fill against the 200 average, three line strike markers and engulfing-style candle markers, and can shade a time-zone tra

Strategy v5 Moving averagesCandlestick patterns
Updated 2 months ago · MIT GitHub repository of GrimmArty Strategy
1 stars

A variant of the Elephant Bars overlay that considers only one-bar retracements. It flags candles whose body is at least a set multiple of the average body, then marks a following bar as a retracement when its body is small relative to the elephant bar and its

Indicator v5 Candlestick patternsMoving averages
Updated 3 months ago · None stated GitHub repository of Elephant Bars Single Retracement

Candle Counter

by unemployedrabi
1 stars

Counts consecutive candles of the same colour and shows the running count as labels on the price chart. It also builds a table that records how often each streak length occurred and what followed. The price basis can be regular candles or Heikin Ashi. An alert

Indicator v5 Candlestick patterns
Updated 4 months ago · MIT GitHub repository of Candle Counter

Bears and Bulls

by rubbermetal
1 stars

An overlay candlestick pattern detector that marks bullish and bearish patterns on the price chart. Patterns are grouped into single, double, triple and multi-candle categories that can each be switched on or off, and each is coloured by reliability level. An

Indicator v6 Candlestick patterns
Updated 4 months ago · MPL-2.0 GitHub repository of Bears and Bulls
1 stars

This strategy trades reversal candlestick patterns such as hammer, doji, engulfing, stars, harami, piercing line and shooting star on the price chart. Pattern strength, ratios and size are adjustable, and optional filters use volume, a trend EMA, RSI, moving a

Strategy v5 Candlestick patterns
Updated 6 months ago · Apache-2.0 GitHub repository of Advanced Candlestick Pattern Strategy
1 stars

This Pine Script strategy detects ICT smart money concepts including order test zones, fair value gaps, and wicks on BTC and XAUUSD price charts. It calculates swings using pivot high and low. Signals enter long or short when the order test zone is hit with su

Strategy v5 SMC / ICT / price actionCandlestick patterns
Updated 6 months ago · None stated GitHub repository of ICT v4-weinkya BTC Improved

15m Reversal Detector

by caizongxun
1 stars

A separate-pane tool that looks for potential reversals by combining momentum, volume and candle shape. It uses RSI, MACD and a stochastic reading for momentum, volume spikes and dry-ups against a volume average, Bollinger Band extremes, wick rejection and eng

Indicator v5 Oscillators & momentumDivergence
Updated 8 months ago · MIT GitHub repository of 15m Reversal Detector

ARC EngulfingAlgo

by Tradehook-org
1 stars

A Pine v5 strategy that trades engulfing candle patterns on the price chart. A pattern needs the current body to cover a set percentage of the previous body, with options for opposite color, doji handling and a maximum previous body size in ATR. Optional confi

Strategy v5 Candlestick patternsTrend
Updated 8 months ago · None stated GitHub repository of ARC EngulfingAlgo

All Candlestick Patterns

by Chris2035nku
1 stars

This Pine v4 indicator detects a large set of bullish, bearish and neutral candlestick patterns and labels them on the price chart. Each pattern, such as Hammer, Engulfing, Morning Star, Three White Soldiers or Dragonfly Doji, can be switched on or off. Trend

Indicator v4 Candlestick patterns
Updated 10 months ago · None stated GitHub repository of All Candlestick Patterns
1 stars

Labels four single-candle reversal patterns on the price chart: bullish hammer, inverted hammer, hanging man and shooting star. Detection compares wick length to body size, using a wick-to-body ratio setting and a Strict, Normal or Relaxed sensitivity multipli

Indicator v6 Candlestick patterns
Updated 11 months ago · Custom licence GitHub repository of Hammer & Inverted Hammer Patterns
1 stars

Advanced ICT Theory - A-ICT identifies institutional market structure patterns based on Smart Money Concepts directly on the price chart. It detects displacement candles, order blocks, fair value gaps, trap zones, and reversal zones, tracking their mitigation

Indicator v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 11 months ago · None stated GitHub repository of Advanced ICT Theory - A-ICT

Sell Spike

by dsjrego
1 stars

A simple overlay that prints a red sell label above a bar when two conditions occur together. The bar's upper wick must be longer than its body and longer than half of a 14-period ATR, and the bar's high must pierce the upper Bollinger Band. The band length an

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

CandleAnalysis

by MarcosACH
1 stars

CandleAnalysis is a Pine Script library providing exportable helper functions for detailed candlestick analysis in custom scripts. It evaluates whether a specified bar is bullish, bearish, or break-even, and computes metrics including body size, top wick size,

Library v5 Candlestick patterns
Updated 1 year ago · None stated GitHub repository of CandleAnalysis

Dojis

by fiji-solutions
1 stars

This indicator identifies and plots bullish and bearish Doji candlestick patterns directly on the price chart. It defines a Doji by comparing body size to the total candle range and ensuring upper and lower wicks are balanced within a customizable ratio. Signa

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Dojis

Grail Only Shorts

by Wendigooor
1 stars

A short-only strategy that combines a slow SMA, medium and fast EMAs, a pin bar test, a stochastic filter, an MFI filter on a separate timeframe and a stochastic momentum index. Exits use a trailing stop plus a hard stop expressed in pips. Inputs include stop

Strategy v5 TrendCandlestick patterns Repaints
Updated 2 years ago · None stated GitHub repository of Grail Only Shorts

Barbwire v2.0.0

by itmakesyousick
1 stars

Finds barbwire zones, runs of bars with small bodies or ranges, and draws boxes around them on the price chart. The bar size source can be Heikin-Ashi open to close, high to low, a hybrid or open to close. Detection can use rank, stochastic or rate of change m

Indicator v5 Candlestick patternsVolatility & bands
Updated 4 years ago · None stated GitHub repository of Barbwire v2.0.0

Candlestick Kicker Pattern

by harryguiacorn
220 stars

This indicator plots green circles below bars and red circles above bars on the price chart to signal Candlestick Kicker patterns. It identifies upward kickers when the prior bar is bearish with body percentage above the left threshold, the current bar is bull

Indicator v5 Candlestick patternsBreakout
Updated 1 year ago · None stated GitHub repository of Candlestick Kicker Pattern
104 stars

Candlestick Pattern Strategy 1 is a scalping strategy designed for short-term timeframes. It evaluates two-bar candlestick price action patterns to generate entry signals directly on the price chart. When a bullish or bearish setup is detected, the strategy ex

Strategy v5 Candlestick patternsScalping
Updated 3 years ago · MIT GitHub repository of Candlestick Pattern Strategy 1

Bgcolor Example

by dcaoyuan
55 stars

Bgcolor Example is a minimal demonstration indicator written in Pine Script v6 that visualises bar polarity across the price chart. It checks whether the current close is lower than the open and dynamically tints the chart background red for bearish bars or gr

Indicator v6 Candlestick patterns
Updated 6 months ago · Apache-2.0 GitHub repository of Bgcolor Example

Abandoned Baby - Bullish

by TWODS-CAPITAL
37 stars

This indicator identifies the Bullish Abandoned Baby candlestick pattern directly on the price chart. The three-bar reversal pattern consists of a strong down candle during an established downtrend, followed by a lower gapping doji candle, and completed by an

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of Abandoned Baby - Bullish

Harami Pattern Finder

by shibisuriya
18 stars

The Harami Pattern Finder indicator identifies two-bar bullish and bearish Harami candlestick patterns directly on the main price chart. It calculates pattern validity based on the open and close price relationships between consecutive bars. Optional input set

Indicator v4 Candlestick patterns
Updated 4 years ago · None stated GitHub repository of Harami Pattern Finder

Engulfing Off BB

by lunarticktrading
7 stars

This indicator plots Bollinger Bands on the price chart and highlights engulfing candles that touch a band. A bullish engulfing bar that reaches the lower band is colored with the bullish color, and a bearish engulfing bar that reaches the upper band is colore

Indicator v6 Volatility & bandsCandlestick patterns
Updated 2 weeks ago · None stated GitHub repository of Engulfing Off BB

Engulf 1v1 + 2v2

by chargersfan47
7 stars

This Pine Script indicator detects and plots 1v1 and 2v2 engulfment candlestick patterns on the price chart. It identifies bullish and bearish engulfment patterns based on candle open, high, low, and close values, checking conditions where a candle engulfs pre

Indicator v6 Candlestick patternsSupport & resistance
Updated 5 months ago · None stated GitHub repository of Engulf 1v1 + 2v2

Harami Cross - Bullish

by Hugs-4-Bugs
4 stars

Harami Cross - Bullish detects the two-candle bullish Harami Cross pattern directly on the main price chart. It identifies a long red candle during a downtrend followed by a Doji candle contained entirely within the previous candle's body. Users can refine tre

Indicator v5 Candlestick patternsTrend
Updated 1 year ago · None stated GitHub repository of Harami Cross - Bullish

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