Pine Library · 656 open-source scripts

Free Candlestick Pattern Pine Scripts (page 6)

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

GrimmHA Strategy Indicator

by GreyssonEnterprises
1 stars

An indicator that combines Heikin-Ashi candle recognition, doji detection and four smoothed moving averages with lengths of 21, 50, 100 and 200. It can show entry signals, trade levels, background colours and a statistics table, with a risk-to-reward ratio and

Indicator v5 Candlestick patternsMoving averages
Updated 2 months ago · MIT GitHub repository of GrimmHA Strategy Indicator

This indicator plots intraday reversal signals and automatic stop loss levels tailored for the 5-minute chart. It identifies three-candle reversal patterns synchronized to 15-minute blocks, triggering buy signals when two consecutive green bars break above the

Indicator v6 Candlestick patternsBreakout
Updated 6 months ago · None stated GitHub repository of Intraday BUY/SELL & AUTO SL (5-min timeframe only) by chaitu50c

Marubozu Detector with Table

by gabriel-klettur
1 stars

This indicator identifies bullish and bearish Marubozu candlestick patterns directly on the price chart. It determines pattern validity by calculating upper and lower wick sizes relative to the full candle range and comparing them against a configurable wick t

Indicator v6 Candlestick patternsScreeners & dashboards
Updated 7 months ago · None stated GitHub repository of Marubozu Detector with Table

NakInvest PFR Identifier

by feliperazeek
1 stars

This indicator marks a price failure and reversal candle pattern on the price chart. A bullish signal appears when the bar makes a lower low and a higher high than both of the previous two bars and closes above the prior close. A bearish signal is the mirror i

Indicator v5 Candlestick patterns
Updated 1 year ago · None stated GitHub repository of NakInvest PFR Identifier
1 stars

This indicator detects a selectable set of candlestick patterns and plots them on the price chart. Fast and slow simple moving averages provide a trend context for pattern interpretation. Users can turn individual formations on or off, including doji variants,

Indicator v5 Candlestick patternsMoving averages
Updated 1 year ago · None stated GitHub repository of Candlestick Patterns

Gaps

by fiji-solutions
1 stars

The Gaps indicator measures and plots the percentage price gap between consecutive bars in a separate pane. It evaluates whether the current bar low is above the previous bar high or the current bar high is below the previous bar low, calculating the relative

Indicator v5 Candlestick patternsVolatility & bands
Updated 2 years ago · None stated GitHub repository of Gaps

All Candlestick Patterns

by TWODS-CAPITAL
37 stars

This indicator detects and labels multiple classic candlestick formations directly on the price chart. It calculates candle body and shadow dimensions relative to exponential moving averages and confirms prevailing trends with simple moving averages. When matc

Indicator v5 Candlestick patternsTrend
Updated 3 years ago · MIT GitHub repository of All Candlestick Patterns

Engulfing Candles

by tistaharahap
25 stars

This overlay indicator marks bullish and bearish engulfing candles with arrows on the price chart. A bullish mark requires a prior down candle and a current bar that meets the script's open and close relationship; a bearish mark uses the opposite pattern. An o

Indicator v4 Candlestick patternsMoving averages
Updated 6 years ago · None stated GitHub repository of Engulfing Candles

Paper Umbrella Finder

by shibisuriya
18 stars

Paper Umbrella Finder detects Japanese paper umbrella candlestick patterns based on mathematical OHLC ratios. It evaluates the relative thickness of the candle body and the size of the upper shadow compared to the lower wick. Matching candles trigger colored a

Indicator v4 Candlestick patterns
Updated 4 years ago · None stated GitHub repository of Paper Umbrella Finder

TheStrat Suite

by 345-strategies
5 stars

TheStrat Suite plots Rob Smith's TheStrat price-action method on the price chart across up to six configurable timeframes. It classifies bars, detects inside bars, hammers, shooters, outside bars and Failed 2 range reclaims, and marks magnitude and exhaustion

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

This indicator identifies liquidity sweeps and stop hunts on price charts by detecting candles that breach recent high or low levels before closing back inside the previous range. Users can filter signals using lookback windows, minimum wick size relative to c

Indicator v5 SMC / ICT / price actionSupport & resistance
Updated 11 months ago · Custom licence GitHub repository of Liquidity Sweep Detector [Lab]

Inside Candle Detector

by might-tree
4 stars

The Inside Candle Detector identifies inside bar candlestick patterns where the current bar's high is lower than the previous bar's high and its low is higher than the previous bar's low. It categorizes inside candles as bullish or bearish based on the bar's o

Strategy v5 Candlestick patterns
Updated 3 years ago · None stated GitHub repository of Inside Candle Detector

This indicator marks bullish and bearish harami candlestick patterns on the price chart. The prior candle must have a long body, and the current candle must be a doji or a weak, small candle. A bullish signal also requires a lookback downtrend, while a bearish

Indicator v5 Candlestick patternsTrend
Updated 2 years ago · None stated GitHub repository of Harami Bullish/Bearish Pattern (Candlestick Pattern)

HTF Candles & Pivots

by itmakesyousick
2 stars

HTF Candles & Pivots overlays higher timeframe candle bodies and wicks directly onto the primary price chart alongside calculated pivot point levels. It visualizes open, high, low, and close levels for selected timeframes like hourly, daily, or weekly bars usi

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

A signal-only indicator that looks for exhaustion after a run of consecutive same-colour candles ending in a doji. A top needs bullish candles with RSI overbought and a new high versus recent bars; a bottom mirrors this. A separate news mode flags unusually la

Indicator v6 Mean reversionCandlestick patterns
Updated 2 weeks ago · None stated GitHub repository of Top Bottom Reversal
1 stars

This Pine Script strategy detects pin bar patterns on the price chart using body size relative to ATR and shadow conditions for long and short signals. It applies engulfing candle confirmation and filters by EMA trend direction with volatility bands. Multiple

Strategy v6 TrendVolatility & bands
Updated 3 weeks ago · None stated GitHub repository of Pin Bar Strategy Developed
1 stars

This strategy identifies liquidity sweep scalp entries on lower timeframes by analyzing 15-minute higher-timeframe candles. It verifies a valid range candle using an EMA trend filter, average body size comparison, and wick balance thresholds. In an uptrend, it

Strategy v6 TrendMoving averages
Updated 4 months ago · MIT GitHub repository of M15 Liquidity Sweep Scalp

Detects swing highs and swing lows with a pivot lookback of 21 bars by default, then labels candlestick patterns that form at those turning points, such as hammer, inverted hammer, hanging man, shooting star and engulfing candles. Labels carry short descriptio

Indicator v5 Candlestick patternsSupport & resistance
Updated 6 months ago · None stated GitHub repository of Swing Highs/Lows & Candle Patterns

Hammers & Shooting Stars

by fiji-solutions
1 stars

This indicator identifies single-bar candlestick patterns, specifically hammer and shooting star formations. It uses a configurable Fibonacci threshold to determine if the candle body rests in the upper or lower proportion of the total price range. An Average

Indicator v5 Candlestick patternsVolatility & bands
Updated 2 years ago · None stated GitHub repository of Hammers & Shooting Stars
29 stars

The Zen Consecutive Bar Streak indicator calculates and tracks consecutive directional candle streaks directly on the main price chart. It determines whether each bar is bullish, bearish, or neutral based on its close relative to its open. When two or more con

Indicator v6 Candlestick patternsTrend
Updated 2 weeks ago · MIT GitHub repository of Zen Consecutive Bar Streak

Engulfing Candles - VWMA

by tistaharahap
25 stars

This overlay indicator marks bullish and bearish engulfing candles with teal and orange arrows on the price chart. An optional volume-weighted moving average can filter those marks: a bullish signal requires the close at or below the primary VWMA, and a bearis

Indicator v4 Candlestick patternsMoving averages
Updated 6 years ago · None stated GitHub repository of Engulfing Candles - VWMA

Paper umbrella trader

by shibisuriya
18 stars

This indicator marks paper umbrella candles on the price chart. It flags a green or red pattern when the upper wick is small relative to the body side and the body thickness stays between set minimum and maximum percentages of the range. On a match it draws a

Indicator v4 Candlestick patternsSupport & resistance Repaints
Updated 4 years ago · None stated GitHub repository of Paper umbrella trader

TheStrat Suite

by 345-strategies
5 stars

TheStrat Suite classifies real OHLC bars with Rob Smith's TheStrat method and draws labels, targets, and stop levels on the price chart. It detects inside bars, hammers, shooters, outside bars, and Failed 2 range reclaims, then shows magnitude and exhaustion t

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

This indicator detects a bullish long lower shadow when the lower wick exceeds 75 percent of the candle range. It plots an LLS label below the bar, tints the background blue, and fires an alert titled new pattern detected. The only input changes the bullish la

Indicator v5 Candlestick patterns
Updated 1 year ago · None stated GitHub repository of Long Lower Shadow - Bullish

Morning Star Pattern

by augustoerni
3 stars

This indicator identifies and highlights the three-candle bullish Morning Star reversal pattern directly on the price chart. It checks for a long bearish candle followed by a small-bodied candle or doji, and finishes with a strong bullish candle closing above

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Morning Star Pattern

FRAMA & CPMA Strategy [CSM]

by wynnforthework
2 stars

The FRAMA & CPMA Strategy overlay script combines a Fractal Adaptive Moving Average (FRAMA) and a custom CPMA indicator imported from an external library. It generates long and short trading signals when price crosses above or below either moving average line.

Strategy v5 TrendMoving averages
Updated 1 year ago · None stated GitHub repository of FRAMA & CPMA Strategy [CSM]

My Indicator

by etnt
2 stars

My Indicator overlays timeframe-adaptive moving averages, candlestick pattern detections, and an information table directly on the price chart. Depending on the active chart timeframe, it plots key moving averages including daily SMAs and EMAs, intraday VWMA a

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

HTF Candles & Pivots

by itmakesyousick
2 stars

This indicator draws higher-timeframe candles on the price chart and overlays pivot levels. Users choose the timeframe, candle thickness, wick display, fill for negative candles, and whether history is shifted forward. Labels can show the timeframe, an average

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

DEPV2 A6 MTF HA GUCU

by YuceSezar89
1 stars

This indicator calculates Heikin Ashi scores for multiple multiplier timeframes relative to a signal timeframe. It computes HA power for 2x, 3x, 4x, and 6x the base timeframe (default 15 minutes) using custom HA candle logic and normalizes the close-open range

Indicator v6 TrendCandlestick patterns
Updated 12 days ago · None stated GitHub repository of DEPV2 A6 MTF HA GUCU

Top 10 Daily Candles

by moonyroy
1 stars

The Top 10 Daily Candles indicator calculates the relative size of each daily candle as the body range divided by the open price. It maintains a running array of the ten largest sizes and their corresponding dates. A table is overlaid on the top right of the c

Indicator v6 Screeners & dashboardsCandlestick patterns
Updated 3 weeks ago · None stated GitHub repository of Top 10 Daily Candles

STRG One Bar Pursuit

by harryguiacorn
220 stars

The STRG One Bar Pursuit strategy identifies single-bar momentum reversals by monitoring shifts between bullish and bearish candlesticks starting from the year 2024. It enters a long position when a bullish candle follows a bearish candle and enters a short po

Strategy v5 Candlestick patternsMean reversion
Updated 1 year ago · None stated GitHub repository of STRG One Bar Pursuit
29 stars

Zen EMA Pullback Patterns identifies pullback formations relative to an Exponential Moving Average on the price chart. It detects 3-bar pullbacks consisting of three consecutive bearish bars above the EMA or bullish bars below it, as well as 4-bar micro channe

Indicator v6 Moving averagesCandlestick patterns
Updated 2 weeks ago · MIT GitHub repository of Zen EMA Pullback Patterns

Shooting Star Finder

by shibisuriya
18 stars

The Shooting Star Finder indicator detects shooting star Japanese candlestick patterns directly on the main price chart. It evaluates individual candles using relative mathematical ratios of Open, High, Low, and Close values. The script tests whether the candl

Indicator v4 Candlestick patterns
Updated 4 years ago · None stated GitHub repository of Shooting Star Finder

DI Engulfing A002

by ruckard
13 stars

This strategy executes trades based on candlestick engulfing patterns aligned with a 200-period exponential moving average trend filter. It enters long positions when a bullish engulfing candle follows three consecutive bearish candles while price trades above

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

TheStrat Suite

by 345-strategies
5 stars

TheStrat Suite classifies candles across six configurable timeframes using Rob Smith's TheStrat bar types. It plots inside bars, hammers, shooters, failed 2s and outside bars on the price chart, with magnitude and exhaustion targets, stop levels and full timef

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

This indicator marks a bearish long upper shadow candlestick pattern on the price chart. It treats a bar as a match when the upper shadow is greater than 75 percent of the full high-to-low range. On a match it draws an LUS label above the bar, tints the backgr

Indicator v5 Candlestick patterns
Updated 1 year ago · None stated GitHub repository of Long Upper Shadow - Bearish

HTF Candles & Pivots

by itmakesyousick
2 stars

This indicator overlays high time frame candles and pivot points on the current price chart. It plots candles from selected higher timeframes using open-close, high-low or both display styles with optional wicks and bar colors. Pivot points follow traditional

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

The script calculates a weighted average of Heikin Ashi score values across four multi-timeframe periods derived from the signal timeframe. It also counts bullish and bearish signals from each timeframe and checks whether the required number of confirming sign

Indicator v6 TrendOscillators & momentum
Updated 12 days ago · None stated GitHub repository of DEPV2 A7 · MTF GÜÇ + TF ONAYI

No Wick + TQ Strategy

by riegodavid-git
1 stars

A strategy that places limit orders at the midpoint of a candle with no wick on the entry side, when a trend quality measure is above a bull threshold or below a bear threshold. Further filters cover close position within the candle, minimum body size relative

Strategy v6 TrendCandlestick patterns
Updated 4 months ago · None stated GitHub repository of No Wick + TQ Strategy

An overlay indicator that marks reversal-style signals on the price chart: TD8 and TD9 counts, hammer, shooting star, bullish and bearish harami, and RSI divergence. Each signal can be switched on or off, and signals can be limited to long or short only. Marke

Indicator v5 Candlestick patternsDivergence
Updated 1 year ago · None stated GitHub repository of Price Action Signals and Filters

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