INVITE-ONLY SCRIPT

Buy Sell with Harmonic Pattern Signal Engine Pro

740
🎯 Harmonic Pattern Signal Engine

Harmonic Pattern Signal Engine is a complete chart-based tool designed to identify confirmed harmonic structures, generate bullish or bearish signals, and automatically plot the complete trade-planning framework with targets, stop-loss levels and risk-reward zones.

The indicator is built for traders who want to study harmonic patterns without manually measuring every swing and Fibonacci relationship. It combines pattern detection, trade-level calculation and clean visual plotting in one system.

---------------------------------

snapshot

📌 Patterns Detected by the Indicator

The indicator analyses confirmed market swings and searches for the Fibonacci relationships commonly associated with:

• Gartley
• Bat
• Alternate Bat
• Butterfly
• Crab
• Deep Crab
• Cypher
• Shark
• 5-0
• AB=CD
• Alternate AB=CD

Once a pattern is completed and confirmed, the indicator can plot:

• Bullish or bearish signal
• X-A-B-C-D pattern structure
• Low-opacity gradient background
• Potential Reversal Zone
• Entry level
• Target levels
• Stop-loss level
• Gradient risk-reward box
• Pattern ratio-fit score

---------------------------------

🧠 How the Pattern Detection Works

The indicator first identifies alternating confirmed swing highs and swing lows. It then measures the relationship between the pattern legs and compares those measurements with the selected Fibonacci-ratio tolerance.

Depending on the detected pattern, the calculations may include:

• AB retracement of XA
• BC retracement of AB
• CD extension of BC
• AD retracement or extension of XA
• AB=CD or alternate AB=CD relationships

A wider ratio tolerance allows the indicator to recognise more approximate harmonic formations, while a lower tolerance requires the pattern to align more closely with the ideal Fibonacci ratios.

The ratio-fit value represents how closely the detected structure matches the programmed harmonic measurements. It should not be interpreted as a win-rate percentage or probability of success.

---------------------------------

⏳ Confirmed and Non-Repainting Signal Logic

The indicator uses confirmed pivots for pattern detection.

A swing point becomes confirmed only after the selected number of right-side candles has closed. For example, when Pivot Right Bars is set to 5, the final pattern point is confirmed five candles after the original pivot candle.

The actual trading signal appears on the confirmation candle. It is not placed retrospectively on the original D-point candle.

After confirmation, the pattern structure and gradient background are drawn over the historical X-A-B-C-D pivot locations so that the complete harmonic geometry can be viewed clearly.

This means:

• Confirmed signals remain fixed after confirmation.
• The indicator does not generate a live signal directly on an unconfirmed D point.
• Some delay is unavoidable because confirmed pivot detection requires future candles.
• Historical pattern drawings should not be interpreted as signals that were available on the original pivot candle.

---------------------------------

snapshot

📐 Fibonacci Target System

When Fibonacci AD or Fibonacci CD is selected as the target method, the indicator can plot three separate target levels.

Default Fibonacci targets:

• T1: 0.382
• T2: 0.618
• T3: 1.000

These ratios can be changed from the settings.

T1 and T2 can be used as partial-profit or trade-management levels, while T3 represents the final target for the complete setup.

Other available target methods include:

• Measured CD
• Pattern C
• ATR multiple
• Percentage from entry

Targets are calculated independently from the stop-loss, allowing the trader to combine different target and risk methods according to the instrument and trading style.

---------------------------------

🛡️ Stop-Loss Calculation Methods

snapshot

The indicator provides multiple stop-loss methods because one universal stop calculation may not work equally well across every asset or timeframe.

Available methods include:

• ATR beyond the pattern completion point
• Pattern invalidation beyond X or D
• XA percentage buffer
• Percentage beyond D
• Recent market structure
• Fixed ticks

ATR-based stops may be suitable for instruments where volatility changes frequently, while pattern-invalidation stops may be more appropriate for swing and positional setups where the harmonic structure itself defines the invalidation point.

Fixed-tick stops should generally be used only when the selected tick value is appropriate for the symbol being traded.

---------------------------------

⚖️ Optional Minimum Risk-Reward Filter

snapshot

The minimum risk-reward filter is completely optional.

When the filter is enabled:

• The indicator generates a signal only when the final calculated target meets or exceeds the selected minimum risk-reward ratio.

When the filter is disabled:

• Every otherwise valid harmonic-pattern signal can be displayed, even when the calculated RR is below the selected value.

This makes the indicator flexible for different approaches. Traders who want to study every confirmed harmonic pattern can keep the filter disabled, while more selective traders can enable it and require a minimum RR such as 1:1.5, 1:1.7 or 1:2.

The indicator still calculates and displays the planned risk-reward ratio even when the filter is disabled.

---------------------------------

🎨 Pattern and Trade Visualization

Each confirmed pattern can display:

• Pattern name
• X-A-B-C-D structure
• Compact point labels
• Optional pivot prices
• Low-opacity gradient pattern background
• Potential Reversal Zone
• Compact signal label
• Target and stop-loss labels
• Gradient risk and reward boxes

The gradient background is designed to improve pattern visibility without covering the price candles. Point prices are hidden by default to reduce chart noise, but they can be enabled from the settings.

Historical patterns, target levels, stop-loss levels and risk-reward boxes can also be retained or removed according to the selected visual preferences.

---------------------------------

⚙️ Suggested Settings for Scalping

For fast intraday trading or scalping, the objective is to detect smaller harmonic structures with less confirmation delay.

Suggested starting settings:

• Pivot Left Bars: 3–5
• Pivot Right Bars: 3–5
• Ratio tolerance: 8–10%
• Minimum leg size: 0.20–0.35 ATR
• Pattern-quality filter: Disabled or low
• Additional confirmation filters: Optional
• Target method: Fibonacci AD or Fibonacci CD
• Fibonacci targets: 0.382 / 0.618 / 1.000
• Stop method: ATR beyond D
• Minimum RR filter: Optional
• Suggested minimum RR: 1.20–1.50
• Signal cooldown: Low

Smaller pivot settings generate more signals, but the detected patterns may be less significant and more sensitive to market noise. Scalping configurations should preferably be used on highly liquid instruments with tight spreads.

---------------------------------

📊 Suggested Settings for Intraday Trading

For regular intraday trading, use moderately sized pivots to balance signal frequency and structural quality.

Suggested starting settings:

• Pivot Left Bars: 5–7
• Pivot Right Bars: 5–7
• Ratio tolerance: 6–8%
• Minimum leg size: 0.30–0.60 ATR
• Pattern-quality filter: Optional
• Additional confirmation: Directional candle or rejection candle
• Target method: Fibonacci AD
• Stop method: ATR beyond D or pattern invalidation
• Minimum RR filter: Optional
• Suggested minimum RR: 1.50–1.70
• Historical pattern limit: Moderate

This configuration may be suitable for liquid index futures, index charts, large-cap stocks and actively traded commodities.

---------------------------------

📈 Suggested Settings for Swing Trading

Swing traders generally require broader patterns and fewer signals.

Suggested starting settings:

• Pivot Left Bars: 7–12
• Pivot Right Bars: 7–12
• Ratio tolerance: 5–7%
• Minimum leg size: 0.50–1.00 ATR
• Pattern-quality filter: Enabled around 65–75
• Additional confirmation: Enabled
• Target method: Fibonacci AD or Measured CD
• Stop method: Pattern invalidation
• Minimum RR filter: Enabled
• Suggested minimum RR: 1.70–2.00
• Signal cooldown: Medium

Larger pivot settings identify more meaningful swing structures, but signals will appear later because the final pivot requires more candles for confirmation.

---------------------------------

🗓️ Suggested Settings for Positional Trading

For daily, weekly or higher-timeframe analysis, the indicator should be configured to detect larger market structures.

Suggested starting settings:

• Pivot Left Bars: 10–20
• Pivot Right Bars: 10–20
• Ratio tolerance: 4–6%
• Minimum leg size: 0.75–1.50 ATR
• Pattern-quality filter: Enabled
• Additional confirmation: Enabled
• Target method: Fibonacci AD, Measured CD or Pattern C
• Stop method: Pattern invalidation with ATR buffer
• Minimum RR filter: Enabled
• Suggested minimum RR: 2.00 or higher

Because higher-timeframe stops can be wider, position size should be adjusted so that the total account risk remains controlled.

---------------------------------

🌍 Suggested Settings by Asset Type

📌 Stocks

• Volume confirmation can be useful because exchange volume is usually available.
• EMA confirmation may help filter counter-trend patterns.
• Avoid highly illiquid stocks with irregular candles and wide spreads.
• Larger pivot settings may work better on volatile small-cap stocks.

📌 Indices

• Spot-index volume may not represent actual traded volume, so volume filters may be less useful.
• ATR-based stops are generally more practical than fixed ticks.
• Use slightly larger pivots during highly volatile sessions.

📌 Forex

• ATR or percentage-based stops are usually more adaptable than fixed-point stops.
• Tick volume may not represent total market volume.
• Avoid signals during extremely low-liquidity trading sessions.

📌 Cryptocurrency

• Crypto volatility can change rapidly, so wider ATR buffers may be required.
• Increase the signal cooldown to avoid multiple overlapping setups.
• Consider enabling the RR filter and pattern-quality filter.
• Use higher pivot settings during highly volatile market conditions.

📌 Commodities

• ATR multiplier should be adjusted according to contract volatility.
• Avoid using the same fixed stop value across different commodities.
• Larger pivot values may help during news-driven volatility.

---------------------------------

✅ When to Use the Indicator

The indicator is most useful when:

• The market is producing clear alternating swing highs and swing lows.
• The harmonic completion aligns with visible support, resistance or liquidity.
• Price shows a reaction from the Potential Reversal Zone.
• The confirmation entry remains reasonably close to the completion point.
• The calculated stop-loss and target fit your risk-management rules.
• The pattern agrees with the broader market structure or higher-timeframe trend.
• Volatility is sufficient for the pattern targets to be realistic.
• You need a structured visual plan for entry, profit-taking and invalidation.

A harmonic signal becomes more meaningful when the pattern completion is supported by additional confluence such as rejection candles, divergence, structure change, support-resistance alignment or volume expansion.

---------------------------------

❌ When Not to Use the Indicator

Avoid relying heavily on harmonic signals when:

• The market is extremely sideways and producing very small irregular swings.
• Price is moving through repeated gaps or illiquid candles.
• The pattern completes directly into a strong opposing support or resistance area.
• Price has already moved significantly away from the D point before confirmation.
• The calculated stop-loss is too wide for your account risk.
• The expected target is blocked by nearby market structure.
• Major economic or company-specific news is creating abnormal volatility.
• The selected chart uses non-standard candle calculations that distort actual prices.
• You are treating every detected pattern as a guaranteed reversal.

A completed harmonic pattern represents a potential reversal zone. It does not guarantee that price will reverse.

---------------------------------

🔍 Practical Usage Approach

A simple workflow for using the indicator may be:

1. Allow the harmonic structure to complete and wait for the confirmed signal.
2. Check whether the D point or PRZ aligns with support, resistance or liquidity.
3. Review the broader market trend and nearby opposing levels.
4. Confirm that the planned stop-loss is logically positioned.
5. Check the available risk-reward ratio.
6. Use T1 and T2 for partial trade management when three Fibonacci targets are enabled.
7. Avoid entering when price has already moved too far away from the confirmation area.
8. Size the position according to the stop-loss distance rather than using the same quantity for every trade.

---------------------------------

⚠️ Important Risk and Data Limitations

The plotted target and stop-loss levels are analytical calculations based on chart prices.

They do not account for:

• Bid-ask spread
• Slippage
• Brokerage charges
• Market liquidity
• Order type
• Partial fills
• Overnight gaps
• Broker execution differences

When both target and stop-loss are crossed within the same candle, standard OHLC data may not reveal which level was reached first.

Historical pattern results should therefore not be interpreted as guaranteed executable trade performance.

---------------------------------

💡 Final Thought

Harmonic patterns are most effective when Fibonacci structure, price action, market context and disciplined risk management are used together.

The purpose of this indicator is to simplify pattern measurement and present the complete setup visually, including the pattern structure, confirmation signal, targets, stop-loss and risk-reward zones.

It should be used as a decision-support tool rather than as a fully automatic trading system.

For educational and analytical purposes only.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.