Pine Library · 656 open-source scripts

Free Candlestick Pattern Pine Scripts (page 5)

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

1 stars

Bitmoon System indicator plots mirror levels, symmetric candles, and detects fractal patterns on the price chart. It calculates central mirror, P1, and P2 mirror levels, plus symmetric candle levels based on user inputs for periods and times. Up and down fract

Indicator v6 Support & resistanceCandlestick patterns
Updated 7 weeks ago · None stated GitHub repository of Bitmoon System Morindok

Bullish Candle Demo

by Alaamo7
1 stars

Bullish Candle Demo is an introductory educational indicator designed for Pine Script v6 beginners. It evaluates whether the close price of the current bar is higher than its open price to identify bullish candlestick bars. When a bullish candle occurs, the in

Indicator v6 Candlestick patterns
Updated 2 months ago · Custom licence GitHub repository of Bullish Candle Demo
1 stars

This indicator scores a short-side exhaustion pattern after an up-move on a scale of 0 to 10, as a screening aid rather than a trading system. Points come from a long upper wick, a bullish fair value gap, a lower or equal second swing high, a break of swing-lo

Indicator v6 SMC / ICT / price actionCandlestick patterns
Updated 2 months ago · Custom licence GitHub repository of Exhaustion Reversal Pattern Scorer

GrimmHA Indicator

by GreyssonEnterprises
1 stars

An indicator that draws Heikin-Ashi candles in a separate pane, calculated from the open, high, low and close of each bar and coloured green or red by direction. The code also computes candle body and shadow measures such as average body size, shadow ratios an

Indicator v5 Candlestick patternsTrend
Updated 2 months ago · MIT GitHub repository of GrimmHA Indicator

Custom Reversal

by rubbermetal
1 stars

An overlay indicator that flags possible reversals using pivot points, candle patterns and confirmation filters. It detects swing highs and lows with separate left and right bar counts, bullish and bearish engulfing candles, and pin bars such as hammers and sh

Indicator v6 Candlestick patternsMean reversion
Updated 4 months ago · MPL-2.0 GitHub repository of Custom Reversal

Crypto Harami Pattern Detector

by gabriel-klettur
1 stars

Crypto Harami Pattern Detector identifies bullish and bearish Harami and Harami Cross candlestick patterns on the price chart. It checks multi-candle body and range relationships to distinguish standard Harami formations from Harami Cross variants. The script

Indicator v6 Candlestick patternsScreeners & dashboards
Updated 7 months ago · None stated GitHub repository of Crypto Harami Pattern Detector

Double Star Strategy

by mkdir700
1 stars

A strategy for the price chart that combines Bollinger Bands, the MACD line and a small-candle-body test. Shorts follow a close above the upper band with a small body and MACD above zero, then a lower close; longs follow a close below the lower band with a sma

Strategy v5 Mean reversionCandlestick patterns
Updated 1 year ago · None stated GitHub repository of Double Star Strategy

Fractal Engulfing Candles

by fiji-solutions
1 stars

This indicator marks engulfing-style candles on the price chart when they also form at a ten-bar swing. A bullish mark requires a prior bearish candle, an open at or below that close, a close at or above that open, a swing low, and RSI below 30. A bearish mark

Indicator v5 Candlestick patternsOscillators & momentum
Updated 2 years ago · None stated GitHub repository of Fractal Engulfing Candles
1 stars

The Hammers & Stars Strategy identifies hammer and star candlestick patterns on the price chart to generate buy and sell signals. It calculates stop loss as ATR multiplied by a user-defined multiplier and sets take profit using the risk-reward ratio. Fib level

Strategy v4 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Hammers & Stars Strategy YouTube
330 stars

This strategy enters long when a bullish candle closes above an EMA and its upper wick is no larger than a set percent of the candle range, and short on the opposite bearish setup. It closes a long after price rises a small fixed fraction above the entry bar o

Strategy v5 Candlestick patternsMoving averages
Updated 2 months ago · None stated GitHub repository of Full Candle [Alorse]

Candlestick Patterns

by harryguiacorn
220 stars

This indicator plots optional candlestick pattern signals on the price chart. It detects engulfing bars, inside bars, HOLP and LOHP, kicker patterns, body-mass extremes, higher highs and lower lows, ATR warnings, and four-bar fractals. Optional pivot marks use

Indicator v5 Candlestick patternsVolatility & bands
Updated 1 year ago · None stated GitHub repository of Candlestick Patterns

Force Bar

by milocaetano
48 stars

Force Bar highlights candlesticks directly on the price chart using three distinct body and range criteria: widest range (Biggest), extreme body relative to historical average (Exhaustion), and moderate body relative to historical average (Force). Colors apply

Indicator v5 Candlestick patternsVolatility & bands
Updated 2 days ago · MIT GitHub repository of Force Bar

Morning and evening star

by shibisuriya
18 stars

This indicator marks morning star and evening star candlestick patterns on the price chart. A morning star needs a bearish first candle, a spinning-top middle candle with gap openings, and a bullish third candle that closes above the first candle's open. An ev

Indicator v4 Candlestick patterns
Updated 4 years ago · None stated GitHub repository of Morning and evening star

Candle Breaks 1v1 L+S

by chargersfan47
7 stars

This indicator detects 1v1 candle break patterns where the current candle breaks and closes beyond the open of the prior opposite-colored candle. It projects a 1.618 Fibonacci extension target based on the previous candle's range, calculating the expected perc

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

This indicator overlays the previous 1-hour candlestick onto lower timeframe charts, such as the 15-minute timeframe. It requests the open, high, low, and close prices of the prior completed 60-minute bar using security calls and renders them directly on the p

Indicator v6 Candlestick patterns
Updated 1 year ago · MIT GitHub repository of H1 Candle as True Shadow on M15

Week candle backward shift

by chaise-cogent
5 stars

This indicator rebuilds one-week candles so their start day is shifted backward by a chosen number of days, from zero through six. On a weekly chart it requests daily open, high, low, and close and assigns them to custom weekly values, with a separate calculat

Indicator v6 Candlestick patternsSessions & time
Updated 7 months ago · MIT GitHub repository of Week candle backward shift

EmaRainbowCandleMark

by fox-buddy
4 stars

EmaRainbowCandleMark is a price-chart overlay that calculates a stack of exponential moving averages with Fibonacci-style lengths and tests candles for hammers, shooting stars, and bullish or bearish engulfing patterns. Body-to-wick tolerances set how strict t

Indicator v4 Moving averagesCandlestick patterns
Updated 2 years ago · None stated GitHub repository of EmaRainbowCandleMark

Doji Marker

by might-tree
4 stars

Doji Marker identifies and highlights Doji candlestick patterns on the price chart based on a user-defined body-to-range ratio. When the absolute distance between the open and close prices is less than or equal to a specified fraction of the total bar range, t

Indicator v5 Candlestick patterns
Updated 3 years ago · None stated GitHub repository of Doji Marker

HTF Candles & Pivots

by itmakesyousick
2 stars

This overlay indicator draws higher-timeframe candles as boxes on the price chart, with a selectable timeframe, candle thickness, wicks, history, vertical divisions, and optional fill for negative candles. It can plot pivot levels, including an optional centra

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

Three Brothers Strategy

by sassiz-root
2 stars

This strategy looks for three prior bars moving the same way with successively smaller bodies, followed by a current bar that closes the other way. It enters long when those prior bars are bearish and the current bar is bullish. A short entry is present only a

Strategy v5 Candlestick patterns Repaints
Updated 3 years ago · MIT GitHub repository of Three Brothers Strategy
1 stars

An indicator on the price chart exported from an optimiser, with a long list of switchable entry patterns, all off by default in the visible settings. Options include pivot points, engulfing and pin bar candles, Bollinger, Donchian and ATR channel breakouts, m

Indicator v6 BreakoutCandlestick patterns
Updated yesterday · None stated GitHub repository of USE Optimizer Export
1 stars

A research indicator, with no trade signals, that finds unusually large candles on the 5 and 15 minute timeframes and the chart timeframe, and studies how price returns to the other end of each one. A news candle must exceed a multiple of the largest recent ra

Indicator v6 Candlestick patternsVolatility & bands
Updated 2 weeks ago · None stated GitHub repository of News Candle Research

J 8

by moonyroy
1 stars

This strategy detects pin bars within an EMA volatility channel using custom user-defined types. It determines market direction based on price action relative to a 21-period EMA and a body-based ATR range. When a qualifying bullish or bearish pin bar prints in

Strategy v6 Candlestick patternsMoving averages
Updated 3 weeks ago · None stated GitHub repository of J 8

GrimmHA Strategy

by GreyssonEnterprises
1 stars

This strategy combines Heikin Ashi candlestick pattern recognition with Smoothed Moving Average (SMMA) trend filtering to generate long and short entries. It detects doji candles, three-line strikes, and engulfing patterns aligned with SMMA trends. Risk manage

Strategy v5 TrendMoving averages
Updated 2 months ago · MIT GitHub repository of GrimmHA Strategy

This short-only scalping strategy combines multi-timeframe analysis to identify panic selling opportunities. It uses higher-timeframe data (15-minute by default) to establish a downtrend context characterized by strong bearish candles with minimal lower wicks.

Strategy v6 TrendCandlestick patterns
Updated 4 months ago · MIT GitHub repository of Doc04 Greed Panic Scalper - Project Adapted

This indicator identifies Hammer and Inverted Hammer candlestick patterns overlaid directly on the price chart. It evaluates body proportions, upper wick lengths, and lower wick ratios against user-defined thresholds. To filter out low-volatility noise, candle

Indicator v6 Candlestick patternsVolatility & bands
1 stars

The Heikin Ashi Trend Follow Strategy calculates smoothed Heikin Ashi candle values from open, high, low and close prices and plots them on the price chart along with a trend EMA. It signals long entries when the Heikin Ashi close crosses above the trend EMA a

Strategy v5 TrendCandlestick patterns
Updated 11 months ago · None stated GitHub repository of Heikin Ashi Trend Follow Strategy

蜡烛图形态

by fuyuanyuan
1 stars

This overlay indicator classifies candlestick shapes using body, wick, and range sizes, then filters them with volume, RSI, MACD, and exponential moving averages. A hammer needs a long lower wick, a small bearish body, RSI below 30, and elevated prior volume.

Indicator v6 Candlestick patternsOscillators & momentum
Updated 1 year ago · None stated GitHub repository of 蜡烛图形态

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

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

Nunchucks

by amico1234
1 stars

The Nunchucks indicator plots candlesticks on the price chart to represent higher highs and lower lows. It calculates these by comparing the current bar high and low against the previous bar values, then draws separate candles for highs and lows using the chos

Indicator v4 Candlestick patterns Repaints
Updated 2 years ago · None stated GitHub repository of Nunchucks

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

A price-chart overlay that detects a long list of candlestick patterns and labels them on the bars. It covers single-bar shapes such as hammer, hanging man, doji types and marubozu, and multi-bar patterns such as engulfing, morning star, three white soldiers a

Indicator v4 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of All Candlestick Patterns

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

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 5 days ago · GPL-3.0 GitHub repository of Barcolor Example
23 stars

Point-Clip Unified Indicator plots breakout and directional labels on the price chart. It scores volume spikes against a volume average, range or opening-range breaks, optional VWAP or session-anchored VWAP, fast and slow EMA trend, and a higher-timeframe EMA

Indicator v6 BreakoutVolume Repaints
Updated 3 weeks ago · Custom licence GitHub repository of Point-Clip Unified Indicator

This indicator identifies and plots minor and major swing highs and lows directly on the price chart. Minor swings are calculated using a 3-bar pivot structure, while major swings expand upon traditional 5-bar Williams Fractals. Users can toggle the visibility

Indicator v4 Support & resistanceCandlestick patterns Repaints
Updated 5 years ago · GPL-3.0 GitHub repository of Chad's Swing Points (@tradeprophet)

TheStrat Setup Screener

by 345-strategies
5 stars

This indicator screens Rob Smith's TheStrat setups across six configurable timeframes for TradingView's Pine Screener. It classifies bars and exposes inside reversals, 2-2 reversals and continuations, failing 2s, range expansions, and outside bars as numeric p

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

This indicator calculates and plots a virtual weekly candle structured as if the previous seven-day period finished yesterday relative to the current date. It queries daily price data to derive rolling weekly open, high, low, and close levels. Designed for ICT

Indicator v6 Candlestick patternsSMC / ICT / price action Repaints
Updated 7 months ago · MIT GitHub repository of Weekly candle closed yesterday

This strategy buys after a sharp down bar with a long lower wick. It opens one long when the lower wick exceeds the candle body by the pin-bar ratio and the one-bar close change falls past the decline threshold. Size defaults to the full account equity. While

Strategy v6 Candlestick patternsMean reversion Repaints
Updated 10 months ago · Apache-2.0 GitHub repository of youtube布欧量化策略-接针策略

This indicator marks Hammer and Hanging Man candlestick patterns on the price chart. A Hammer requires a bullish candle with a small real body, a long lower shadow, and a short upper shadow after a lookback downtrend. A Hanging Man uses the same body and shado

Indicator v5 Candlestick patternsTrend
Updated 2 years ago · None stated GitHub repository of Hammer and Hanging Man (Candlestick Pattern)

PVSR Candles MP

by midngtpickle
2 stars

PVSR Candles MP is a Pine Script indicator that colors candlesticks on the price chart according to synchronized Price Volume Spread Ratio Analysis. It classifies each bar as climax volume (colored green or red when volume meets or exceeds average or volume-sp

Indicator v6 VolumeCandlestick patterns
Updated 4 weeks ago · Custom licence GitHub repository of PVSR Candles MP

HTF Candles & Pivots

by itmakesyousick
2 stars

HTF Candles & Pivots overlays higher timeframe candles and pivot point levels directly onto the main price chart. It renders customizable higher timeframe candle bodies, wicks, and labels while calculating pivot points, Central Pivot Range, and projected price

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

Candlestick Patterns

by pineforge-4pass
1 stars

This strategy detects bullish and bearish engulfing candles, hammers, shooting stars, and morning stars from current and prior bar bodies. It enters long when a bullish pattern occurs while price is below a simple moving average, and short when a bearish patte

Strategy v6 Candlestick patternsTrend Repaints
Updated 6 days ago · Apache-2.0 GitHub repository of Candlestick Patterns

Pin Bar Strategy

by moonyroy
1 stars

This strategy identifies long and short pin bar candlestick patterns aligned with trend conditions defined by an Exponential Moving Average (EMA) and an Average True Range (ATR) filter. Long trades enter when an uptrend is active, price is near the EMA, and a

Strategy v6 Candlestick patternsTrend
Updated 3 weeks ago · None stated GitHub repository of Pin Bar Strategy
1 stars

This educational script demonstrates compound logical expressions in Pine Script v6. It evaluates three simultaneous conditions: whether the current bar is bullish, whether its closing price is higher than the previous bar's close, and whether its volume excee

Indicator v6 Candlestick patternsVolume
Updated 2 months ago · Custom licence GitHub repository of Compound Expression Demo

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