OPEN-SOURCE SCRIPT
ที่อัปเดต: Volume-Enhanced Candlestick Patterns 1

Overview
Scans for four major candlestick reversal patterns:
Harami
Engulfing
Morning/Evening Star
Piercing Line/Dark Cloud Cover
Underlying logic assumes that, at a turning point, the dominant side (bulls or bears) often delivers a “final” push—either a last surge of buying or selling—before the reversal truly takes hold.
Pattern Toggles
Each individual pattern can be turned on or off in the inputs.
Enable only the patterns you want to monitor to reduce chart clutter and speed up performance.
Volume Filter Toggle
On: Requires volume-based exhaustion or climax to confirm each pattern.
Off: Relies purely on price-action candlestick logic (no volume checks).
Grouped Labels & Confluence
When one or more patterns trigger on the same bar close, a single label is drawn:
Grouping multiple confirmed patterns on one bar increases confluence and signal strength.
Climax Volume × Multiplier
Adjusting this input affects signal frequency and conviction:
Higher multiplier → fewer signals but with stronger volume confirmation
Lower multiplier → more signals, each with a looser volume requirement
Alerts
Built-in alert condition for each individual pattern (bullish/bearish Harami, Engulfing, Star, Piercing, Dark Cloud Cover), so you can receive real-time notifications whenever a confirmation occurs.
Follow for Weekly Scripts
If you find this helpful, please hit Follow and 🚀button —I release a new scripts every week.
Disclaimer
Not Financial Advice. This script is for educational and research purposes only.
Use as Part of a Larger System. It should not be used in isolation; combine it with your own risk management rules, additional indicators, and broader market analysis.
No Guarantees. Candlestick patterns and volume filters can improve signal quality, but they do not guarantee profitable trades. Always perform your own due diligence before entering any position.
เอกสารเผยแพร่
Volume-Enhanced Candlestick Patterns (v2) finds classic-LIKE candlestick patterns and can require multiple pattern confluences based on selectable patterns. It then takes those selected patterns and can add an optional volume and ATR filter for extra confirmation. (Along with MTF options, later in description)Optional Volume confirmation (not stacked — they run individually if multiple are selected)
Definitive Climax: the prior bar shows unusually strong one-sided activity (buying or selling) relative to the script’s running average volume threshold using the cumulative function. It is controlled by "Climax boost x avgVol".
Example: if you set 1.5, it requires roughly 150% of the baseline threshold to count as a climax.
Exhaustion: buying/selling pressure is fading compared to the previous bars (momentum is running out). Tapers down 3-2-1 style.
Wave Climax: a “build-up, climax, then fade” sequence — the middle candle inside the wave reaches an exhaustion-like event, and the current candle confirms by having a smaller volume signature than the original build-up candle. 2-3-1 style volume pattern. You control the middle candle threshold with Climax boost x avgVol as well.
Optional ATR “power” filter (extra umph)
Enable an ATR-based filter that requires the confirming candle to have a minimum range vs ATR, filtering out tiny/weak candles.
MTF Feature (Dual-Engine HTF/LTF)
The script can scan candlestick patterns on a different timeframe either Higher or Lower than your chart.
Regular (HTF-safe)( Selectable from dropdown)
Use this when the Pattern timeframe is the same as or higher than the chart timeframe (ex: scan 1H while viewing 5m, or scan 1D while viewing 4H).
It uses request.security() to pull the pattern results from that timeframe in a clean, stable way.
You will get a Label at the close of the HTF confirmation candle.
LTF Any-Subbar ( Selectable from dropdown)
Use this when the Pattern timeframe is lower than the chart timeframe (ex: scan 1m while viewing 5m).
Instead of only looking at the “last moment” of the candle, it scans all sub-bars inside each current chart candle using request.security_lower_tf(). (**important so pattern stays true)
So if a LTF pattern appears at any point inside that bigger candle(your current tf) , it counts. Even if pattern stretches across multiple candles (on you current tf) without current candle closing. So you can get an intra-candle Label on the current tf if you're using ltf engine.
****The script uses barstate.isconfirmed so it does not "repaint" ***
Important behavior (WARNING SIGNS)
If you choose LTF mode but your Pattern timeframe is not actually lower, the script disables Labels (because LTF scanning doesn’t apply there) and you will get no patterns just a warning.
If you choose Regular mode while your Pattern timeframe is lower, the script also disables Labels to avoid “partial/incomplete” detection.
Confluence output (labels)
When a Label prints, the label shows:
which patterns triggered, and the total pattern count that met your confluence requirement.
key feature here:
“At least” mode
This means: print a Label when the confluence count is X or higher.
Example with X = 3:
1 patterns triggered → no Label
2 patterns triggered → no Label
3 patterns triggered → Label
4 patterns triggered → Label
So this mode is more permissive.
"If more patterns line up than you asked for, it’s still fine."
“Exactly” mode
This means: print a Label only when the count equals X.
Example with X = 3:
1 patterns triggered → no Label
2 patterns triggered → no Label
3 patterns triggered → Label
4 patterns triggered → NO Label (too many)
So this mode is more picky. It’s basically saying:
“I want only X patterns, not X-or-more.”
**Pattern Settings are built-in (no shape/wick UI). Designed for clean confluence stacking in labels.**
**Pin / Rejection (1-candle)**
Calculates whether one wick is dominant and the candle closes near the opposite end of the range.
* Bullish: long lower wick, close near the high, candle closes up.
* Bearish: long upper wick, close near the low, candle closes down.
**Dragonfly / Gravestone Doji (1-candle)**
Calculates a doji-like candle (tiny body vs range) with one dominant wick and a small opposite wick.
* Dragonfly: long lower wick, tiny upper wick, close biased toward the high.
* Gravestone: long upper wick, tiny lower wick, close biased toward the low.
**Engulfing (2-candle)**
Calculates whether the current candle’s real body fully covers the prior candle’s real body.
* Bullish: prior down candle, current up candle, body wraps prior body.
* Bearish: prior up candle, current down candle, body wraps prior body.
**Harami Cross (2-candle)**
Calculates a big first candle followed by a doji whose body sits inside the first candle’s body range.
* Bull/bear flavor depends on the direction of the first (“setup”) candle.
**Tweezers (2-candle)**
Calculates whether two consecutive candles reverse with matching extremes inside a tolerance band.
* Bottom: candle #2 reverses up and the lows are nearly equal.
* Top: candle #2 reverses down and the highs are nearly equal.
* Tolerance is ATR-based, so “equal” scales with volatility.
**Piercing / Dark Cloud (2-candle)**
Calculates a reversal where candle #2 pushes back into candle #1’s body and closes beyond its midpoint.
* Piercing: after a bearish candle, bullish candle closes above the midpoint (but below the prior open).
* Dark Cloud: after a bullish candle, bearish candle closes below the midpoint (but above the prior open).
**Morning / Evening Star (3-candle)**
Calculates a 3-bar reversal: strong candle → small “star” → strong reversal closing deep into candle #1’s body.
* Morning Star: down, small middle candle, then bullish close deep into candle #1.
* Evening Star: up, small middle candle, then bearish close deep into candle #1.
**Three-Line Strike (4-candle)**
Calculates three candles trending in one direction, then a 4th candle that reverses hard and “strikes” through the move.
* Bullish: three down candles stepping lower, then a bullish candle that closes above the first candle’s open.
* Bearish: three up candles stepping higher, then a bearish candle that closes below the first candle’s open.
Alerts
Bullish and bearish confluence alert conditions are included on Label print.https://www.tradingview.com/x/2Tjr7C3B/
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน