Pine Library · 656 open-source scripts

Free Candlestick Pattern Pine Scripts (page 9)

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

55 stars

This indicator overlays on the price chart and provides trend and momentum analysis. It calculates and plots three exponential moving averages with fixed periods of 20, 50, and 200 using yellow, orange, and blue colors respectively. The script also computes th

Indicator v6 TrendOscillators & momentum
Updated 6 months ago · Apache-2.0 GitHub repository of Trend & Momentum Analysis

8020 System Indicator

by TamaraKGreen
46 stars

This overlay indicator draws 80/20 price levels and optional 40-point zone bands on the price chart. It marks repairs, cross sections, and forks with optional letter labels, and can highlight confluence when those marks sit near a level. Separate options shade

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

Zen Gaps v5.0

by Zen-Tim
29 stars

This indicator draws colored boxes on the price chart to highlight gaps between bars. It detects bullish gaps when the current low exceeds the prior bar's high and bearish gaps when the current high falls below the prior bar's low. Strong gaps receive extra em

Indicator v5 Support & resistanceCandlestick patterns
Updated 2 weeks ago · MIT GitHub repository of Zen Gaps v5.0

PaperHands

by lunarticktrading
7 stars

PaperHands is an indicator that plots entry, re-entry, and exit signals for LONG and SHORT positions in a separate pane. It calculates signals using multiple confluence conditions such as real candle color, Heikin-Ashi candle color and flat bottoms or tops, He

Indicator v6 TrendOscillators & momentum
Updated 2 weeks ago · None stated GitHub repository of PaperHands
3 stars

Consecutive Candle Levels identifies sequences of consecutive bullish or bearish candles to establish price ranges and project horizontal extension levels directly onto the main price chart. The indicator calculates customizable Fibonacci ratio levels, upper a

Indicator v5 Support & resistanceCandlestick patterns
Updated 5 months ago · None stated GitHub repository of Consecutive Candle Levels

This indicator combines three analysis tools into a single chart overlay: a custom trend signal script, a ZigZag indicator, and a swing high and low pattern detector. It calculates dynamic support and resistance thresholds based on high-low price ranges and a

Indicator v4 TrendSupport & resistance Repaints
Updated 4 years ago · MIT GitHub repository of Trendsignal + Zig Zag + Swing Highs/Lows Candle Patterns
1 stars

This overlay strategy combines an AlphaTrend core with kinematic, Bayesian, and mean-reversion models, plus harmonic, classical, and candlestick pattern engines. It plots consolidation zones, volume-profile points of control, pattern lines, and forward forecas

Strategy v5 TrendCandlestick patterns Repaints
Updated yesterday · None stated GitHub repository of JAT+BSM Pro Extended

Bollinger Bars

by ivansoft
1 stars

Restyles the chart's candles as an overlay. Bodies are coloured green when the close is above the open and red otherwise, while wicks are drawn in a fixed blue. It performs no calculation beyond the candle comparison and has no inputs or signals. It needs the

Indicator v6 Candlestick patterns
Updated 1 year ago · None stated GitHub repository of Bollinger Bars

Coin to CNY

by zhuzp98
1 stars

The script converts cryptocurrency prices to Chinese Yuan (CNY) by multiplying the open, high, low, and close prices of the selected coin with the corresponding USDCNY exchange rates. It plots candlestick data in a separate pane for the translated prices. User

Indicator v5 Candlestick patterns
Updated 1 year ago · None stated GitHub repository of Coin to CNY

The Bullish/Bearish Candle Series Distribution indicator calculates the length of the current streak of consecutive bullish or bearish candles based on user-selected mode. It tracks streak lengths from 2 to 59 and plots a histogram in a separate pane showing t

Indicator v4 Candlestick patterns
Updated 11 days ago · GPL-3.0 GitHub repository of Bullish/Bearish Candle Series Distribution

ESU2023-10M - V1

by dearvn
257 stars

ESU2023-10M - V1 is an intraday trend-reversal strategy designed for index futures contracts on the price chart. It calculates a 3-period moving average of candle highs and lows alongside specific three-bar price action patterns to detect short-term swing high

Strategy v5 TrendCandlestick patterns
Updated 6 weeks ago · None stated GitHub repository of ESU2023-10M - V1

Zen MIG Reversal

by Zen-Tim
29 stars

Zen MIG Reversal is a price action overlay indicator that identifies potential reversal setups using three-bar candlestick sequences, gap rules, and moving average filters. It checks for consecutive directional bars combined with either Al Brooks micro gaps or

Indicator v5 Candlestick patternsMoving averages
Updated 2 weeks ago · MIT GitHub repository of Zen MIG Reversal

Vector Candles

by benso87
24 stars

Vector Candles is an overlay indicator that recolors price candles using PVSRA volume rules taken from the Traders Reality concept. It compares each bar's volume with the average of the previous ten bars and also checks the product of spread and volume against

Indicator v5 VolumeCandlestick patterns
Updated 4 years ago · MPL-2.0 GitHub repository of Vector Candles
3 stars

This indicator detects streaks of consecutive candles on a price chart and plots Fibonacci retracement levels based on their high-low range. Users set the streak length (default 3) to identify swing highs and lows. It calculates and displays customizable level

Indicator v5 Support & resistanceCandlestick patterns
Updated 5 months ago · None stated GitHub repository of Consecutive Candle Levels

RSI Strategy

by Web3Degenerate
2 stars

This strategy combines RSI extreme condition filters with engulfing candlestick patterns to identify reversal entries. It opens positions on confirmed bars when an overbought or oversold RSI aligns with a bullish or bearish engulfing pattern. Stop losses are c

Strategy v5 Oscillators & momentumCandlestick patterns
Updated 2 years ago · None stated GitHub repository of RSI Strategy

JAT+BSM Pro v13

by majixai
1 stars

A strategy that combines an AlphaTrend style volatility core with a MACD condition, higher-timeframe background, three consolidation layers with volume profile buckets, candlestick and macro pattern labels, and a forecast with Bayesian lookback. Cross-asset sy

Strategy v5 TrendOscillators & momentum
Updated yesterday · None stated GitHub repository of JAT+BSM Pro v13

This indicator plots session-filtered bullish and bearish engulfing markers on the price chart. A long mark appears when the current candle engulfs the prior candle inside the New York window and volume exceeds 1.5 times its 20-bar average. A short mark uses a

Indicator v6 Candlestick patternsSessions & time Repaints
Updated 2 months ago · None stated GitHub repository of TeleNexus Sovereign ORB Multi-Model

GhostDog Matrix V12

by knectardev
1 stars

GhostDog Matrix V12 is an overlay signal indicator designed for intraday session trading. It calculates inner and outer standard deviation envelope bands around a simple moving average and evaluates Heikin-Ashi candle wicks to identify signal setups. The scrip

Indicator v5 Volatility & bandsSessions & time
Updated 9 months ago · None stated GitHub repository of GhostDog Matrix V12

Zen Library Patterns

by fiji-solutions
1 stars

This indicator detects key candlestick patterns by importing functions from the Zen Library. It identifies bullish engulfing candles formed at 10-period lows and bearish engulfing candles at 10-period highs. Additionally, it highlights hammer, shooting star, a

Indicator v5 Candlestick patterns
Updated 2 years ago · None stated GitHub repository of Zen Library Patterns

Zen OOH OOL v3

by Zen-Tim
29 stars

This indicator identifies whether the opening bar of a new trading day opens at its high (Open = High) or low (Open = Low) within a customizable tick tolerance. It marks matching sessions directly on the price chart using directional arrows, text labels, and t

Indicator v5 Sessions & timeCandlestick patterns
Updated 2 weeks ago · MIT GitHub repository of Zen OOH OOL v3

Volume Bar Colors

by benso87
24 stars

This indicator highlights price candles based on unusual volume expansion and directional volume imbalance. It estimates buying and selling volume from the close position relative to the bar range. When total volume exceeds a multiple of its moving average, th

Indicator v5 VolumeCandlestick patterns
Updated 4 years ago · MPL-2.0 GitHub repository of Volume Bar Colors

Engulfing Candle

by krosenfeld7
5 stars

This indicator marks bullish and bearish engulfing candles on the price chart. A bullish signal requires the current open to be at or below the prior close, below the prior open, and the current close above the prior open. A bearish signal uses the opposite op

Indicator v4 Candlestick patterns
Updated 3 years ago · Apache-2.0 GitHub repository of Engulfing Candle
1 stars

This indicator finds past stretches of price history that resemble the most recent bars and uses what followed them to sketch a forecast. It compares a pattern of up and down candles of set length against up to 5000 bars of history, with optional trend matchin

Indicator v5 Candlestick patterns Repaints
Updated 6 months ago · None stated GitHub repository of Candlestick Matching Forecast
1 stars

High-Frequency Swing Reversal is a Pine Script v5 strategy that computes a reversal score from Bollinger Bands distance, RSI exhaustion, and candlestick rejection patterns such as hammers and stars. It plots VWAP, Bollinger Bands, and EMA20 on the price chart.

Strategy v5 Oscillators & momentumVolatility & bands
Updated 9 months ago · None stated GitHub repository of High-Frequency Swing Reversal

TMA Overlay

by rajatjpatel
1 stars

A Pine v4 overlay combining several chart aids. It draws smoothed moving averages at 21, 50, 100 and 200 bars, fills between a 2-period EMA and the 200 line in green or red to show trend, and marks bullish and bearish three line strike patterns and large engul

Indicator v4 Moving averagesCandlestick patterns
Updated 4 years ago · None stated GitHub repository of TMA Overlay
330 stars

HA UnivLong&Short Futures calculates Heikin Ashi candles and builds a channel using simple moving averages of Heikin Ashi highs and lows. It enters long positions when the upper channel line crosses above the lower channel line and opens short positions on the

Strategy v5 TrendMoving averages
Updated 2 months ago · None stated GitHub repository of HA UnivLong&Short Futures

Single-color candles

by be-thomas
65 stars

This indicator plots candlestick bars in a separate pane based on the current chart's open, high, low, and close values. Derived from the TradingView Pine Script v5 documentation, it demonstrates the usage of the plotcandle function to render price candles usi

Indicator v5 Candlestick patterns
Updated 5 days ago · GPL-3.0 GitHub repository of Single-color candles

Zen Open CSC Bars

by Zen-Tim
29 stars

This indicator marks consecutive same-direction candles at the start of each daily session. It counts the first user-set bars after a new day and labels a bullish or bearish CSC when every bar closes in that direction. Settings toggle bar colours, bull and bea

Indicator v5 Candlestick patternsSessions & time Repaints
Updated 2 weeks ago · MIT GitHub repository of Zen Open CSC Bars
5 stars

This strategy trades long only on the price chart. It enters when the current bar opens at or below the prior close, opens below the prior open, and closes above the prior open, after a chosen backtest start. It exits at a percent profit and stop, or at ATR mu

Strategy v4 Candlestick patterns
Updated 3 years ago · Apache-2.0 GitHub repository of Engulfing Candle Long Strategy (D)

Dskyz Adaptive Futures Elite (DAFE)

by mushroom-men-Trading
2 stars

Dskyz Adaptive Futures Elite (DAFE) is an automated strategy designed for intraday trading. It generates long and short entries by pairing fast and slow moving average crossovers with candlestick pattern detection, filtered by RSI, volume, volatility, and a hi

Strategy v6 Moving averagesCandlestick patterns
Updated 9 months ago · None stated GitHub repository of Dskyz Adaptive Futures Elite (DAFE)

RSI Swing Signal

by Web3Degenerate
2 stars

This indicator plots an RSI oscillator in a separate pane and marks long and short setups when RSI is oversold or overbought and a swing low or swing high fractal forms with a reversing candle. It sizes a stop from the recent extreme plus an ATR multiple, then

Indicator v5 Oscillators & momentumCandlestick patterns
Updated 2 years ago · None stated GitHub repository of RSI Swing Signal

Volume Spike Reversal

by Basant1Saini
1 stars

The Volume Spike Reversal strategy identifies potential price reversals driven by high volume activity. It triggers long entries when a volume spike occurs while price is below a 20-period simple moving average, combined with oversold RSI readings and bullish

Strategy v5 VolumeOscillators & momentum
Updated 7 months ago · None stated GitHub repository of Volume Spike Reversal
330 stars

Improvising [Alorse] is a price-chart strategy that looks for a one-bar candle reversal filtered by a 10-period EMA, a 14-period RSI, and a rising or falling MACD. Longs require a bearish bar followed by a bullish close above the EMA, RSI below 65, and a risin

Strategy v5 Oscillators & momentumMoving averages
Updated 2 months ago · None stated GitHub repository of Improvising [Alorse]

Smoothed candles

by be-thomas
65 stars

This indicator draws smoothed candlesticks on the price chart. It applies a simple moving average of a user-set length, defaulting to nine, separately to open, high, low, and close, then plots those four values with plotcandle. Wick color is green when the raw

Indicator v5 Moving averagesCandlestick patterns
Updated 5 days ago · GPL-3.0 GitHub repository of Smoothed candles

This strategy identifies bearish engulfing candlestick formations to execute short positions. A short entry triggers when the current bar opens at or above the previous bar's open and close, then closes below the previous open. Position exits are managed eithe

Strategy v4 Candlestick patterns
Updated 3 years ago · Apache-2.0 GitHub repository of Engulfing Candle Short Strategy (Not Good)
1 stars

An extended version of the JAT+BSM strategy that adds a strategy preset, a risk aggression choice and a pattern type filter to the AlphaTrend style core, MACD, consolidation layers, volume profile and candlestick and macro pattern drawings. Forecasts use kinem

Strategy v5 TrendOscillators & momentum
Updated yesterday · None stated GitHub repository of JAT+BSM Pro v13 Extended

Zen Z Bars V1

by Zen-Tim
29 stars

Zen Z Bars V1 analyzes bar-by-bar price action, candle range expansion, and internal bar strength (IBS). It identifies breakouts, inside and outside bars, climax candles based on range expansion factors, and tiered range multiple bars. The indicator draws brea

Indicator v5 Candlestick patternsBreakout
Updated 2 weeks ago · MIT GitHub repository of Zen Z Bars V1

Vector Candles

by TamTH-Dev
2 stars

Vector Candles is an overlay indicator that recolors price bars according to relative trading volume and volume spread. It compares current volume against a 10-bar moving average and evaluates volume spread relative to recent highs. Bars are categorized and hi

Indicator v5 VolumeCandlestick patterns
Updated 5 weeks ago · None stated GitHub repository of Vector Candles

Stops & Targets

by Web3Degenerate
2 stars

This script demonstrates how to calculate and display ATR-based stop loss and take profit levels directly on the price chart. It detects hammer and shooting star candlestick patterns filtered by a 50-period EMA trend. When a setup occurs and no active trade is

Strategy v5 Candlestick patternsMoving averages
Updated 2 years ago · None stated GitHub repository of Stops & Targets
1 stars

An extended strategy version that adds a strategy preset, a risk aggression choice and a pattern type filter to an AlphaTrend style core with MACD. It includes three consolidation layers with volume profile, candlestick and macro pattern drawings, a kinematic

Strategy v5 TrendOscillators & momentum
Updated yesterday · None stated GitHub repository of JAT+BSM Pro v13 Extended
7 stars

This indicator identifies market displacement, structure breaks, and Fair Value Gaps (FVGs) directly on the main price chart. It highlights displacement candles using an average range lookback and multiplier factor, with optional structure break filtering usin

Indicator v6 SMC / ICT / price actionSupport & resistance
Updated 3 months ago · None stated GitHub repository of [CT] Displacement FVG Toolkit
1 stars

A strategy that builds on the JAT+BSM family: an AlphaTrend style core with MACD, three consolidation layers with volume profile, candlestick and macro pattern drawings, and a kinematic and Bayesian forecast with a feedback learning rate. Inputs include a stra

Strategy v5 TrendOscillators & momentum
Updated yesterday · None stated GitHub repository of JAT+BSM Pro v15 Unified

3-Candle Time Pattern

by alboogycOdR
6 stars

This indicator detects three-candle time patterns on the price chart, tracking range, manipulation, and distribution phases based on Smart Money Concepts. It establishes high and low boundaries from the opening candle and identifies boundary rejections during

Indicator v5 SMC / ICT / price actionCandlestick patterns
Updated 7 months ago · None stated GitHub repository of 3-Candle Time Pattern

GainzAlgo V2 [Alpha]

by IAMATOMIC001
3 stars

This indicator detects buy and sell signals on the price chart by combining engulfing candlestick patterns, body-to-range stability ratios, RSI boundaries, and price momentum over ten bars. Confirmed signals trigger visual buy and sell labels directly on candl

Indicator v5 Candlestick patternsOscillators & momentum
Updated 12 months ago · None stated GitHub repository of GainzAlgo V2 [Alpha]

Confluence Suite

by TamaraKGreen
46 stars

The Confluence Suite indicator draws multiple trading signals and tools directly on the price chart. It generates entry and exit signals based on selected modes and filters, with an AI signal classifier rating quality from 1-4. Additional features include smar

Indicator v5 TrendSMC / ICT / price action
Updated 7 weeks ago · None stated GitHub repository of Confluence Suite

EnlargedBodies A002

by ruckard
13 stars

This strategy executes trend-following trades directly on the price chart based on consecutive expanding candle bodies filtered by the 13-period exponential moving average. When price is above the EMA13, it enters long positions after three consecutive bullish

Strategy v5 Candlestick patternsTrend
Updated 1 year ago · None stated GitHub repository of EnlargedBodies A002
6 stars

This indicator maps multi-timeframe candle range patterns based on specific time-of-day sessions. It converts user-specified SAST starting hours into UTC to identify initial 4-hour range candles, plotting their high, low, and median levels across the chart. Th

Indicator v5 Sessions & timeSupport & resistance
Updated 7 months ago · None stated GitHub repository of 3-Candle Time Pattern - Enhanced

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