OPEN-SOURCE SCRIPT

HTF 3-Candle System (Zeiierman)

6 884
Overview
HTF 3-Candle System (Zeiierman) is a higher-timeframe market structure indicator designed to analyze the relationship between three consecutive HTF candles and identify the price pattern that currently best describes the developing structure.
لقطة
Instead of looking for a single fixed candlestick formation, the indicator evaluates multiple bullish and bearish three-candle structures simultaneously. Each pattern receives a dynamic quality score based on factors such as candle direction, range, body strength, liquidity sweeps, displacement, imbalance, compression, expansion, and the developing behavior of the live third candle.

The three higher-timeframe candles are defined as:

• C1 = the completed HTF candle two periods back
• C2 = the previous completed HTF candle
• C3 = the current live HTF candle

C3 updates continuously while the higher-timeframe candle is forming, allowing the pattern ranking and projected levels to evolve with current price action.
لقطة
The System evaluates 12 three-candle structures:

• Bullish Sweep Reversal
• Bearish Sweep Reversal
• Bullish FVG Displacement
• Bearish FVG Displacement
• Bullish PO3 Sequence
• Bearish PO3 Sequence
• Bullish Expansion
• Bearish Expansion
• Bullish Compression Break
• Bearish Compression Break
• Morning Star Reversal
• Evening Star Reversal

The three highest-ranked structures are displayed in the 3-CANDLE SYSTEM table together with their current scores. The highest-ranked pattern also controls the live state message and the projected structural levels.
لقطة
How It Works
3-Candle HTF Structure
The indicator analyzes three candles from the selected higher timeframe:

• C1 = two HTF candles back
• C2 = previous HTF candle
• C3 = current live HTF candle
Pine Script®

C1 and C2 are completed candles, while C3 updates live until the current higher-timeframe candle closes.

Pattern Quality Scoring
The System evaluates 12 bullish and bearish three-candle structures and assigns each one a quality score.

The score combines structural conditions with softer proximity measurements, so a setup can begin ranking before every condition is fully completed.

Factors include liquidity sweeps, candle direction, body strength, range, displacement, FVGs, compression, expansion, and recovery or rejection around key levels.
Pine Script®

Top 3 Pattern Ranking
All pattern scores are ranked from highest to lowest.

The strongest structure becomes the active pattern, while the second and third highest scores remain visible for additional context.
Pine Script®

Live Pattern State
The top-ranked structure also shows its current stage, such as:

• sweep or reclaim developing
• FVG live
• breakout or breakdown developing
• compression
• PO3 distribution
• reversal developing

⚪ Projected Pattern Levels
The active pattern projects the levels most relevant to that structure, including sweep levels, breakout levels, FVG boundaries, CE 50%, equilibrium, recovery levels, and invalidation.

Nearby levels can automatically merge to reduce visual clutter.

Projected HTF Candles
C1, C2 and C3 are reconstructed to the right of price using their actual higher-timeframe OHLC values. C3 updates live as the current HTF candle develops.

HTF Mapping

The System can map C1, C2 and C3 directly over the lower-timeframe candles that formed them.

High and low dots identify the exact lower-timeframe candles that created each HTF extreme. Completed C1 and C2 levels can also change from Active to Mitigated after being traded through.

How to Use
The examples below show how the System behaves across different three-candle structures. The table identifies the highest-ranked pattern, while the bottom row shows the pattern's current live state.

Bearish Expansion
Here, Bearish Expansion is the highest-ranked pattern at 85.0%, and the state reads BEARISH EXPANSION LIVE.

C1, C2, and C3 progressively shift lower, with C3 extending strongly through the previous structure. The projected levels identify the Breakdown, the level price should Hold Below, and the Invalidation level above.
لقطة
Bearish FVG Displacement
In this example, Bearish FVG Displacement reaches a 100.0% score and the state reads BEARISH FVG LIVE.

The strong downside movement leaves C3 separated below C1, creating the bearish imbalance. The System projects the FVG Upper, CE 50%, C3 High, and Invalidation levels around the active structure.
لقطة
Bearish FVG With Merged Levels
This is another Bearish FVG Displacement, ranked at 98.1%.

Here, the FVG Upper and CE 50% are close enough to be merged into a single projected level. This demonstrates how the System combines nearby structural references when they overlap.
لقطة
Bullish FVG Displacement
This example shows a Bullish FVG Displacement with a 100.0% score and BULLISH FVG LIVE state.

Strong upside displacement leaves the C3 low above the earlier C1 structure. The projected FVG Lower, CE 50%, C3 Low, and Invalidation levels define the active bullish imbalance.
لقطة
Bearish Compression Setup
Here, Bearish Compression Break ranks first at 91.2%, but the state still reads COMPRESSION - WATCH RANGE LOW.

This is important because the bearish break has not yet confirmed. C2 is contained within the C1 range and C3 is pressing toward the lower boundary. The Range Low / Breakdown level shows where bearish confirmation would occur, while Equilibrium and Range High define the rest of the compression structure.
لقطة
Bullish Power of 3
In this example, Bullish PO3 Sequence ranks first at 85.0%, with the state PO3 DISTRIBUTION LIVE.

The sequence shows a downside manipulation followed by a strong bullish C3 expansion. The System highlights the Manipulation Low, the Distribution level above, and the structural Invalidation level.
لقطة
Bearish Sweep Reversal
Here, Bearish Sweep Reversal is ranked first, but the state reads HIGH SWEPT - NEED RECLAIM.

Price has already swept above the C1 high, but the reversal is not yet fully confirmed. The next requirement is for C3 to move back below the projected C3 Close < level. The swept high and invalidation have merged into one structural level.
لقطة
Bullish Sweep Reversal
This example shows Bullish Sweep Reversal ranked first at 82.0%, but the state is still WATCHING C1 LOW.

This is an earlier-stage setup. The System is identifying the bullish sweep structure as the best current match, but the C1 low has not yet been swept. The projected Sweep Low + Invalidation level shows the liquidity area being watched, while C3 Close > marks the bullish confirmation level.
لقطة
Evening Star Reversal
Here, Evening Star Reversal ranks first at 80.6%, with the state AWAITING REJECTION BELOW C1 MID.

The reversal structure is developing, but C3 has not yet moved far enough below the C1 midpoint to confirm stronger rejection. The projected levels show 50% Rejection, Full Rejection, and Invalidation.
لقطة
Bullish Compression Setup
In the final example, Bullish Compression Break ranks first at 84.3%, while the live state reads COMPRESSION - WATCH RANGE HIGH.

C2 remains compressed inside the C1 structure and C3 is moving toward the upper boundary. The bullish breakout is not confirmed until price pushes through the projected Range High / Breakout level. Equilibrium and Range Low provide the remaining structural references.
لقطة
Settings
  • Higher Timeframe: Selects the higher timeframe used to construct C1, C2 and live C3. The selected timeframe must be higher than the chart timeframe.
  • Strong Match Threshold: Sets the minimum quality score required for the highest-ranked pattern to be treated as a strong match.
  • Show Projected HTF Candles: Shows or hides the reconstructed C1, C2 and C3 candles to the right of current price.
  • Offset: Controls how far the projected candle structure appears from current price.
  • Candle Spacing: Controls the horizontal spacing between projected C1, C2 and C3.
  • Merge: Controls how close two projected levels can be before they are combined.
  • Spacing: Controls horizontal spacing between pattern level labels.

-----------------
Disclaimer

The content provided in my scripts, indicators, ideas, algorithms, and systems is for educational and informational purposes only. It does not constitute financial advice, investment recommendations, or a solicitation to buy or sell any financial instruments. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.

All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.

إخلاء المسؤولية

لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.