Pine Library · 656 open-source scripts

Free Candlestick Pattern Pine Scripts (page 4)

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

All Candlestick Patterns

by ShabbirHasan1
4 stars

All Candlestick Patterns identifies and highlights classical Japanese candlestick patterns directly on the price chart. It determines underlying market trends using configurable moving averages, including a 50-period SMA, a dual SMA 50/200 setup, or no trend f

Indicator v5 Candlestick patternsMoving averages
Updated 1 year ago · Custom licence GitHub repository of All Candlestick Patterns

This indicator marks bullish and bearish engulfing candlestick patterns on the price chart. A bullish signal needs a bullish candle after a bearish candle, a high-low range that covers the previous bar, and a floored body that covers the previous body. A beari

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

HPI

by blackcat1402
3 stars

HPI marks a bar on the price chart when its open is the highest open over a configurable lookback and the bar is red, meaning the open is above the close. It plots a small red label reading HPI above that bar. The only setting, HPI Recent Bar, sets how many ba

Indicator v4 Candlestick patternsSupport & resistance Repaints
Updated 5 years ago · MIT GitHub repository of HPI
2 stars

Ghost Zone v9 GTI Signals v18 is an overlay technical indicator designed to replicate Ghost Trade Pro methodology. It calculates anchored Supertrend channels, previous weekly close levels, fair value gaps, and volume profile high-volume nodes. The script evalu

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 6 months ago · None stated GitHub repository of Ghost Zone v9 GTI Signals v18
2 stars

Identifies and displays classical candlestick formations directly on the price chart. The indicator scans bar structure relationships across consecutive candles to detect Evening Star, Morning Star, Shooting Star, Hammer, and Gravestone patterns. Bearish forma

Indicator v6 Candlestick patterns
Updated 1 year ago · MPL-2.0 GitHub repository of Candlestick Patterns
2 stars

Multi-Indicator Trading System plots 50-period and 200-period exponential moving averages alongside buy and sell signals directly on the price chart. Signals trigger when a short-timeframe EMA crossover aligns with higher timeframe trend filters from 1-hour or

Indicator v5 TrendMoving averages Repaints
Updated 1 year ago · MIT GitHub repository of Multi-Indicator Trading System

HAZZONES

by ashwagamma
2 stars

This indicator plots support and resistance zones on the price chart using Heikin Ashi data. It detects strong bullish and bearish trends by counting consecutive Heikin Ashi candles that meet specific body and wick conditions. Up to 15 support and 15 resistanc

Indicator v5 Support & resistanceCandlestick patterns
Updated 1 year ago · None stated GitHub repository of HAZZONES
2 stars

Combined Candle Counter overlays multiple technical analysis tools directly onto the price chart. It features configurable EMA and SMA moving average presets with automated toggles based on intraday, daily, or weekly timeframes. The indicator draws 52-week hig

Indicator v5 Moving averagesSupport & resistance Repaints
Updated 2 years ago · MIT GitHub repository of Combined Candle Counter

Simple EMA Candle

by minaecer
2 stars

This indicator plots colored candles on the price chart using three Exponential Moving Averages. The 30-period EMA serves as the open, the 15-period EMA as the high, and the 10-period EMA as the low, with the original close value. Bar colors change based on co

Indicator v4 Moving averagesCandlestick patterns
Updated 4 years ago · MPL-2.0 GitHub repository of Simple EMA Candle

Impulse

by DaniilOkrug
2 stars

Impulse marks the start of a two-candle bullish or bearish push on the price chart when the second candle stays beyond a Fibonacci fraction of the first candle's range. It tracks each move's high and low, cancels the setup if price crosses back through the cho

Indicator v5 Candlestick patternsSupport & resistance
Updated 4 years ago · MIT GitHub repository of Impulse

j14-E1 adv

by moonyroy
1 stars

This indicator plots ZigZag lines connecting swing highs and lows to map price structure. It draws candle body and shadow boxes on the price chart and detects CHoCH for potential trend shifts and BOS for continuation signals. The main setting toggles candle di

Indicator v6 SMC / ICT / price actionSupport & resistance Repaints
Updated 5 days ago · None stated GitHub repository of j14-E1 adv

Cherry on Top

by ElroyvOuwerkerk
1 stars

A bar-by-bar indicator that marks a bearish signal when the current bar takes the previous high and closes within the lower division of its own range, and a bullish signal when it takes the previous low and closes in the upper division. The number of divisions

Indicator v6 Candlestick patterns
Updated 7 days ago · None stated GitHub repository of Cherry on Top

Fibow

by moonyroy
1 stars

Fibow is an intraday trading strategy that tracks daily price extremes to calculate directional Fibonacci support and resistance levels. It monitors price action for Pin Bar and Engulfing candlestick patterns reacting at key Fibonacci retracement thresholds. U

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

Basic Trend View

by Alaamo7
1 stars

Basic Trend View is a simple educational indicator from a Pine Script v6 course that colors chart bars based on price direction. It colors bullish bars green when the close is greater than the open, bearish bars red when the close is less than the open, and ne

Indicator v6 Candlestick patternsTrend
Updated 2 months ago · Custom licence GitHub repository of Basic Trend View
1 stars

A strategy version of an ATR pullback scanner. It requires a strong, rising ADX with directional indicators to set the trend direction, and an optional daily SMA 50 and 200 filter. A pullback zone is measured in ATR units from the recent swing. A toggle choose

Strategy v5 TrendCandlestick patterns
Updated 4 months ago · None stated GitHub repository of Trend Scanner Strategy (A/B Test)
1 stars

This indicator plots bullish and bearish order-block boxes on the price chart. It marks the prior candle when the current bar engulfs it and volume exceeds a twenty-bar average times a multiplier, then stores the zone in a matrix. Volume threshold and box colo

Indicator v5 SMC / ICT / price actionSupport & resistance Repaints
Updated 6 months ago · MIT GitHub repository of Order Blocks Matrix - Castle Trade

Crypto Harami Pattern Detector

by gabriel-klettur
1 stars

This indicator detects bullish and bearish harami candle patterns and plots them on the price chart. It compares three bars: a prior opposite candle, a smaller middle candle, and a confirming candle in the new direction. Green upward triangles mark bullish set

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

15m VPA Reversal Engine

by caizongxun
1 stars

A volume price analysis indicator in a separate pane. It tests each bar for patterns such as buying and selling climaxes, up-thrusts, down-thrusts, no-demand and no-supply bars, using volume against its average and bar range against average spread. The bullish

Indicator v5 VolumeCandlestick patterns
Updated 8 months ago · MIT GitHub repository of 15m VPA Reversal Engine

ARC PinBarAlgo

by Tradehook-org
1 stars

A Pine v5 strategy that trades pin bar candles on the price chart. A pin bar needs a long wick relative to its body and range, a small opposite wick, and an optional required wick side. Optional confirmation uses band, momentum and EMA crossover settings and a

Strategy v5 Candlestick patternsTrend
Updated 8 months ago · None stated GitHub repository of ARC PinBarAlgo
1 stars

This indicator identifies high and low pivot points on the price chart using user-defined left and right bars around each bar. It connects pivot points with wave lines, plots PH and PL marks, and labels the latest P1 to P8 patterns. A table shows pivot details

Indicator v5 Support & resistanceTrend
Updated 11 months ago · MIT GitHub repository of Pivot Waves + 8-Pattern + CHoCH

NakInvest Cross EMA

by feliperazeek
1 stars

This strategy trades three-candle reversal patterns, called 123, PFR and engulfing, together with a 9, 40 and 80 EMA trend stack. Entries can occur when price crosses the fast EMA without crossing the slower ones, or when it crosses all of them. Optional volum

Strategy v5 Candlestick patternsMoving averages
Updated 1 year ago · None stated GitHub repository of NakInvest Cross EMA

Fractal Enculfing Caldles

by fiji-solutions
1 stars

This indicator identifies bullish and bearish engulfing candlestick patterns directly on the price chart. To refine signal quality, it provides three optional filters: an ATR filter to cap maximum candle size relative to volatility, a swing high or low filter

Indicator v5 Candlestick patternsMoving averages
Updated 2 years ago · None stated GitHub repository of Fractal Enculfing Caldles
1 stars

A two-sided strategy that looks for a fan of fast EMA, medium EMA and slow SMA in order, a pin bar candle and a bar piercing one of the averages. It then places a stop order beyond the previous bar high or low. Exits combine a hard stop in pips with a trailing

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

This indicator scans price charts to identify multiple classic bullish, bearish, and neutral candlestick patterns, including Hammers, Engulfing patterns, Dojis, Stars, and Marubozus. It evaluates prevailing market trends using simple moving average rules (SMA5

Indicator v5 Candlestick patterns
Updated 3 years ago · MIT GitHub repository of Woverine - Candlestick Patterns

Heikin Ashi

by jubayernil
1 stars

This indicator calculates and plots Heikin Ashi candlesticks in a separate pane below the main price chart. It retrieves the open, high, low, and close values of the Heikin Ashi synthetic ticker for the chart's current timeframe. Bullish candles, where the Hei

Indicator v4 Candlestick patternsTrend
Updated 3 years ago · None stated GitHub repository of Heikin Ashi

Barbwire v3.0.0

by itmakesyousick
1 stars

Detects barbwire zones, runs of bars with unusually small size, and boxes them on the price chart. Bar size defaults to a hybrid blend of Heikin-Ashi, open-close and high-low measures. A mixed method is on by default, with optional stochastic and percent-rank

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

Strat1

by namdar-nejad
1 stars

This Pine v4 strategy looks for three-candle sequences, green-green-red or red-red-green, and uses a one-period Money Flow Index value and candle body sizes to decide long or short direction, drawing arrows on the price chart. Orders are fixed at 10000 units w

Strategy v4 Candlestick patterns
Updated 4 years ago · None stated GitHub repository of Strat1
220 stars

This indicator identifies bullish and bearish engulfing candlestick patterns and plots them directly on the price chart. Users can filter patterns by setting minimum body-to-range percentages for both the prior and current candles. Additional filters require t

Indicator v5 Candlestick patterns
Updated 1 year ago · None stated GitHub repository of Candlestick Pattern - Engulfing
106 stars

This strategy trades the three-candle strike pattern filtered by trend direction and time sessions. It calculates market regime using linear regression and exponential or smoothed moving averages to distinguish between ranging and trending conditions. Risk man

Strategy v5 Candlestick patternsTrend
Updated 2 years ago · GPL-3.0 GitHub repository of 3 Candle Strike Strategy

Exhaustion Reversal

by milocaetano
48 stars

Exhaustion Reversal identifies potential market exhaustion and reversal points on the price chart by detecting strong force bars followed by price give-back patterns. A force bar is defined by an above-average body reaching recent extreme highs or lows. The sc

Indicator v5 Candlestick patternsMean reversion
Updated 2 days ago · MIT GitHub repository of Exhaustion Reversal
46 stars

This overlay indicator draws a set of higher-timeframe candles on the price chart. The user sets the timeframe or lets it select automatically, plus candle count, size, offset, margin, and whether the candles are standard or Heikin Ashi. A table can show the a

Indicator v6 Support & resistanceCandlestick patterns Repaints
Updated 7 weeks ago · None stated GitHub repository of HTF Sweep Model with CISD Table

Marubozu finder

by shibisuriya
18 stars

This indicator identifies Marubozu candlestick patterns directly on TradingView price charts. It plots green triangles for bullish Marubozu below bars and red triangles for bearish Marubozu above bars. The pattern requires upper and lower wicks to stay within

Indicator v4 Candlestick patterns
Updated 4 years ago · None stated GitHub repository of Marubozu finder

BodyOutlier A003

by ruckard
13 stars

BodyOutlier A003 is a mean-reversion trading strategy designed for automated execution via Zignaly alerts. It identifies candlestick body outliers to place limit orders, buying at the low of unusually large bullish candles or selling at the high of large beari

Strategy v5 Candlestick patternsMean reversion
Updated 1 year ago · None stated GitHub repository of BodyOutlier A003

Candle Breaks 1v1 L+S

by chargersfan47
7 stars

This indicator identifies single-candle breakout patterns where the current bar closes beyond the open of the preceding opposite-direction bar. It calculates potential long and short breakout targets using a 0.618 Fibonacci projection from the prior candle ran

Indicator v5 Candlestick patternsBreakout
Updated 5 months ago · None stated GitHub repository of Candle Breaks 1v1 L+S
5 stars

Monthly Candle Closed Yesterday is a price action and Smart Money Concepts helper indicator that plots rolling virtual monthly candles in a separate pane, treating yesterday as the end of the monthly period. It uses daily price data to dynamically calculate op

Indicator v6 Support & resistanceSMC / ICT / price action Repaints
Updated 7 months ago · MIT GitHub repository of Monthly Candle Closed Yesterday

Improvisando [Alorse]

by Hugs-4-Bugs
4 stars

This strategy combines candlestick price action with Exponential Moving Average, RSI, and MACD filters to identify short-term trend trades. A long signal occurs when a bullish candle engulfs the previous open while price remains above the EMA, RSI stays below

Strategy v5 TrendOscillators & momentum
Updated 1 year ago · None stated GitHub repository of Improvisando [Alorse]
4 stars

The script is a Pine Script v4 strategy that generates buy and sell signals from crossovers of fast EMA (period 5) and slow EMA (period 10). It overlays signals directly on the price chart for cryptocurrency trading. Additional filters check for hammer candles

Strategy v4 TrendMoving averages
Updated 2 years ago · None stated GitHub repository of EMA Cross Crypto Strategy

Stella's Smart Money Proxy

by stella-entry
3 stars

This indicator detects institutional or large-scale market activity using candle body size and trading volume. It compares current candle bodies against a 20-period simple moving average and checks for volume spikes above an adjustable moving average filter. I

Indicator v6 VolumeCandlestick patterns
Updated 8 months ago · MIT GitHub repository of Stella's Smart Money Proxy

This indicator identifies the classic three-bar bearish evening star reversal pattern directly on the price chart. It checks for a strong initial bullish candle, followed by a middle doji or weak candle, and completes when a subsequent bearish candle closes be

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

Chart Visualization

by danielbodnar
2 stars

A Pine Script visualization script demonstrating custom technical drawing techniques on price charts. It plots a 20-period simple moving average with dynamic color intensity derived from price momentum, marks inside and outside bar patterns using shapes, and l

Indicator v6 TrendCandlestick patterns
Updated 2 months ago · MIT GitHub repository of Chart Visualization

Early Reversal OB

by thino-dev
2 stars

This indicator detects early potential market turning points based on order block and engulfing candlestick patterns on the price chart. It checks for a local swing extreme on the second closed bar followed by an immediate engulfing reversal candle on the prio

Indicator v5 SMC / ICT / price actionCandlestick patterns
Updated 7 months ago · None stated GitHub repository of Early Reversal OB

Waindrops

by mikah13
2 stars

Waindrops calculates custom volume profiles over user-defined intraday periods, dividing each period into two halves to plot high, low, left VWAP, and right VWAP levels. It draws dual-sided volume histograms directly on the price chart, coloring each formation

Indicator v4 VolumeCandlestick patterns
Updated 2 years ago · None stated GitHub repository of Waindrops

HTF Candles & Pivots

by itmakesyousick
2 stars

This indicator draws higher-timeframe candles and classic pivot levels on the price chart. Users choose an automatic or fixed higher timeframe and a color theme, then show or hide the candle and the pivots. Candle display can emphasize open and close, high and

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

Impulse-Orders

by DaniilOkrug
2 stars

The Impulse-Orders strategy detects impulse up and down movements on the price chart by checking for specific candle patterns relative to Fibonacci retracement levels. It tracks impulse starts and ends, confirming when the move reaches a user-defined percentag

Strategy v5 Candlestick patternsSupport & resistance
Updated 4 years ago · MIT GitHub repository of Impulse-Orders
1 stars

This indicator identifies institutional liquidity pool zones using swing high and low pivots adjusted by ATR width. It confirms liquidity sweeps through multi-layer criteria, including volume spikes, wick rejections, absorption bars, and swing failure patterns

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated yesterday · None stated GitHub repository of Shark Hunt | Anonycryptous

Division Candle Overlay

by ElroyvOuwerkerk
1 stars

A bar-colouring indicator that splits each candle's high-to-low range into a chosen number of divisions, from 2 to 10. A bar is coloured green when its close is in the top division and red when it is in the bottom division; bars matching neither, or both, stay

Indicator v6 Candlestick patternsOscillators & momentum
Updated 7 days ago · None stated GitHub repository of Division Candle Overlay
1 stars

This strategy identifies trend phases using consecutive directional candle sequences, tracks the trend extreme, and monitors for order blocks confirmed by candle displacement. When price returns to test the identified order block, it enters long or short on a

Strategy v6 SMC / ICT / price actionCandlestick patterns
Updated 3 weeks ago · None stated GitHub repository of Höhlenmensch Strategie

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