Cup & Handle MT4

Cup & Handle MT4

24 June 2026, 14:58
Abir Pathak
0
23

Available Here:

Welcome! This guide walks you through the Abiroid Cup & Handle Chart Indicator


🔎 Features (What the indicator does for you)

  • Detects both bullish and bearish Cups: Finds the classic “cup‑and‑handle” and its upside‑down version.
  • Mathematical cup shape: Uses quadratic regression to make sure the cup looks like a smooth “U” rather than a jagged “V”.
  • Two entry line options: Horizontal resistance line or a slanted trend‑line that follows the left‑rim to right‑rim.
  • Custom price source: Choose candle wicks (High/Low) or candle bodies (Open/Close) for the calculations.
  • Early or delayed handle drawing: Show the handle as soon as it forms, or wait until the breakout happens.
  • Up to 3 overlapping patterns: You can see small cups inside larger cups.
  • Built‑in alerts: Pop‑ups, email, or push when a pattern breaks out.
  • Clear visual style: Smooth curves for the cup, straight lines for the handle, and optional labels.


Note: This indicator is a single chart indicator. It does not have a scanner dashboard.


🚀 Why This Indicator Is Different

Most Cup & Handle indicators simply connect swing highs and lows and label every rounded shape as a pattern. Abiroid Cup & Handle goes much further — it mathematically validates every single candidate before drawing anything on your chart.

Feature Abiroid Cup & Handle
Shape detection ✅ Quadratic regression — mathematically proven U-shape
V-bottom rejection ✅ Concavity check filters out V-shapes and spikes
Cup symmetry ✅ Left/Right side balance verified via parabola vertex position
Handle quality ✅ Slope, depth (Fibonacci), and length all validated
Prior trend requirement ✅ Optional Fibonacci trend lookback confirms a genuine preceding impulse
Overlapping structures ✅ Up to 3 nested cups — choose priority by age, R², or width
False signal control ✅ Optional "require breakout" mode — pattern only shown after price confirms


📈 What is a Cup & Handle?

The Cup & Handle pattern looks like a tea‑cup on a price chart. It’s a continuation signal – after the cup forms, the price often keeps moving in the same direction.

  • Cup (P1‑P2‑P3): A rounded bottom (or top for the bearish version). P1 is the left rim, P2 the deepest point, and P3 the right rim.
  • Handle (P3‑P4‑P5): A short consolidation after the cup. P4 is the lowest point of the handle, and P5 is the breakout candle.
  • Breakout: Price moves above the rim (or below for a bearish cup) – that’s where you consider entering the trade.

📌 Bullish Cup (Standard): P1 and P3 are local price highs. The cup dips down to P2 and recovers. A breakout above the rim (P3 level) is a BUY signal. Most common in uptrending markets on H1 and above.

📌 Bearish Cup (Inverted): P1 and P3 are local price lows. The cup rises up to P2 and falls back. A breakout below the rim is a SELL signal. Often seen near distribution tops. These require stronger confirmation due to higher false-signal risk.



🛠️ How to Use the Indicator

Quick‑Start Steps

  1. Attach the indicator to any chart.
  2. Pick a Price Type – High/Low for wicks or Open/Close for bodies.
  3. If you prefer a flat breakout level, set Breakout Trigger Type to TRIGGER_HORIZONTAL_P3 . Otherwise, choose TRIGGER_HANDLE_TRENDLINE for a slanted trend‑line connecting the cup rims.
  4. Decide whether you want to require a breakout to show the pattern. If Require breakout to show pattern is set to true, the chart waits for a breakout. If false, the pattern is drawn early when the handle forms.
  5. Adjust the Min Cup R2 Correlation if you want stricter or looser cup shapes.
  6. Watch the chart – when you see a new cup label and a green “Signal Valid” message, the pattern is ready.

⚡ Quick Start: Recommended First Settings

If you're new to this indicator, start with these settings on an H1 chart and adjust from there:

Setting Recommended Value Why
Price Type PRICE_HIGH_LOW Wicks capture the true cup rim structure better than bodies
Min Cup R2 Correlation 0.75 Good balance — filters V-shapes without being too strict
Minimum cup width 15 bars Avoids tiny, unreliable cups
Maximum cup width 200 bars Reasonable cap for swing trading
Breakout Trigger Type TRIGGER_HORIZONTAL_P3 Easiest to trade — flat horizontal line is a clear entry level
Require breakout to show pattern true Keeps your chart clean — only shows confirmed breakout patterns
Preceding Fibo Trend lookback window (bars) 50 bars Ensures a real prior trend existed before the cup formed
Overlap Cups (Min 1, Max 3) 2 Lets you see one large + one small nested cup simultaneously
Overlap Show Priority Best Match (R2) When cups overlap, always show the most mathematically accurate one


Why there might be losses?

If you trade during low volatility tight ranging market...

Or if you trade against a strong trend on higher timeframe, it might go your way, but not for long.

Be careful to look at slope of the P1-P3 line. It it's sloped too much in opposite direction, then trade might not be set up to go your way.

Also look for a convincing high volume breakout bar in right direction.



Does this Repaint?

Default settings do not repaint. But if you turn off 

Require Breakout to show pattern, you will get a early signal. Many people like to see a pattern when cup is forming and handle has just started to form.

But if handle goes too far in wrong direction, then it will break the handle rules:


When that happens pattern becomes invalid and disappears. To make it truly non-repainting, keep it true.

If you are more interested in getting early signals so you can be prepared sooner, then turn it false.


💡 How to Trade the Cup & Handle (Strategy Guide)

1. Confirming the Breakout (Entry Trigger)

  • The Breakout Candle: Do not enter on weak breakouts. A valid breakout candle should close strongly outside the entry line (above the line for BUY, below for SELL). Look for a large, solid candle body with a small wick in the direction of the trend, indicating that buyers/sellers are in full control. High volume on the breakout candle provides a strong confirmation of consensus.
  • Avoid Chasing: If the breakout bar is exceptionally large, entering at the market price can lead to poor risk-to-reward ratios. In this case, wait for a pullback. Placing a **Limit Order** near the broken entry line to catch a retest is a highly professional and conservative entry style.
  • Pending Orders: Place a **Buy Stop (for standard cups)** or **Sell Stop (for inverted cups)** pending order slightly beyond the entry line (e.g., 2–5 pips above the line) to catch the trade automatically as soon as momentum drives the breakout.

2. Stop Loss (SL) Placement

  • Avoid Tight Stops: Placing your SL too close to the handle bottom (P4) will often result in getting stopped out prematurely by normal market noise. Give the trade room to breathe.
  • Swing Lows & Ranges: For a BUY trade, look left on the chart to identify the nearest minor support zone, swing low, or price range where the market consolidated during the handle formation. Place your Stop Loss 3-5 pips below that low.
  • Psychological Round Numbers: Major market players look at "Half" and "Full" levels (round numbers ending in .00 , .50 , .000 , or .500 ). If a key support level lies near a round number, place your Stop Loss just below it (e.g., at 1.0990 instead of 1.1005 ) to use the round number as a barrier.

3. Take Profit (TP) & Risk Management

  • Target Nearest Resistance: Look left to find past price peaks or zones where price ranged earlier. Set your Take Profit slightly below these resistance zones (for BUY trades) or above support zones (for SELL trades) so your order is filled before the price encounters selling pressure.
  • Cup Height Projection: A classic technical target is projecting the vertical depth of the cup (from Rim to P2) upward from the breakout point. This serves as an excellent target for Take Profit 2 (TP2).
  • Maintain 1:2+ Risk-to-Reward: Always ensure the distance to your Take Profit is at least double the distance to your Stop Loss. Even with a 45% win rate, a 1:2 R:R ratio ensures your account stays net-profitable. Take partial profits at 1:1 R:R and trail your SL to break-even to secure risk-free runs.

🧮 Detailed Calculations (What the engine does under the hood)

The engine runs a series of checks for every possible cup. If any check fails, the pattern is skipped. Below is a friendly, step‑by‑step walk‑through of each calculation and the corresponding debug messages you’ll see in the DebugPrint pane.



1. Diagnostics Header

DIAGNOSTICS START:

Analyzing Cup P1 (Left Rim) = 120, P3 (Right Rim) = 80 on EURUSD H1

====================================================================

This tells you which two bars are being examined (P1 and P3) and on which symbol & timeframe.


2. Optional OHLC Dump

OHLC DATA FOR CUP & HANDLE BARS (P1:120 down to bar 80): Bar 120: O:1.23456, H:1.23600, L:1.23100, C:1.23300, Time:2024.01.01 00:00 ...

If Show Debug OHLC is enabled, you get the raw Open/High/Low/Close values for every bar between P1 and the “stop bar”. It helps you verify that the data the engine sees matches your chart.

3. Anchor Peak Search Window

Anchor Peak Search Window: 5 P1 Search Range [115 to 125]: Local High Peak at 120, Local Low Peak at 118 P3 Search Range [75 to 85]: Local High Peak at 80, Local Low Peak at 78

The engine looks anchorPeakWindow bars left and right of each rim to confirm that P1 and P3 are true local peaks (or troughs for the bearish version). If the highest (or lowest) bar in that range matches the rim index, the rim is considered valid.

4. Cup Direction Detection

Cup Direction Detected: BULLISH (Standard Cup)

When both P1 and P3 are local highs, the cup is bullish. If both are lows, it’s bearish. If the peaks don’t line up, the engine prints a warning and falls back to a bullish assumption for the purpose of calculations.

5. Core Measurements

Measurements: P1_Price=1.23600, P3_Price=1.23000, RimPrice=1.23000 P2 (Bottom/Peak) Bar: 102, P2 Price: 1.22000 Cup Height (rimPrice to p2): 0.01000 (imp points) Rim Variance: 0.00600 (5.00% of cupHeight, Max Allowed: 20.00%)

These values are the building blocks for later checks:

  • RimPrice: The lower of the two rims for a bullish cup (higher for bearish).
  • Rim Variance: Absolute price difference between P1 and P3. If this is more than the user‑defined maxRimSymmetryPct , the cup is too lopsided and gets rejected.
  • Cup Height: Vertical distance from the rim to the deepest point (P2). It’s used in the depth‑to‑width and ATR ratio tests.

6. Quadratic Regression (Parabolic Fit)

Quadratic Regression fit: a=0.000012, b=-0.000345, c=1.23500, R2=0.8421 (Min Required: 0.7500) Peak Shift Check: x_peak=0.12 (Max Allowed: 0.50) -> PASS Symmetry Check: Left:55.0%, Right:45.0% (Min: 25%) -> PASS FIT-R2 : PASS (R2=0.8421 vs min 0.7500) FIT-PEAK : PASS (x_peak=0.12 vs max 0.50) FIT-ASYM : PASS (L55% R45% min 25%) FIT-CONCAV : PASS (a=0.000012, Bull cup needs a≥0)

How it works:

  • All closing prices between P3 and P1 are normalised to an x range of -1 … 1.
  • The engine runs MathQuadraticRegression which returns coefficients a, b, c and the R² value.
  • (coefficient of determination) tells how closely the points follow a parabola. If it’s lower than minParabolaFitR2 , the cup is rejected.
  • Peak Shift (x_peak) is the x‑position of the parabola’s vertex. It must stay within ±0.5 to keep the cup centred.
  • Symmetry checks that the left side (P1‑P2) and right side (P2‑P3) each cover at least 25 % of the total cup width.
  • Concavity ensures the parabola opens upward for bullish cups (a ≥ 0) and downward for bearish cups (a ≤ 0).



7. Depth‑to‑Width ATR Ratio

Depth Ratio (Height/Width*ATR): 0.85 (Min Required: 0.70, ATR: 0.00120) -> PASS

ATR (Average True Range) measures market volatility. The ratio compares cup height to the product of cup width (bars) and ATR. A low ratio means the cup is too flat; a high ratio means the cup has enough “depth” relative to volatility. The engine rejects cups below the user‑defined minCupDepthRatio .

8. Handle Validation

Handle Validation: PASS (P4 Bar: 78, P4 Price: 1.22500, Trigger Bar: 80, Retrace Fib: 0.618, Handle Slope: 0.00123, SkipReason: )

The handle check runs several sub‑tests:

  • Handle Depth Fib: The price drop from P3 to P4 must be ≤ the configured Fibonacci fraction (default 0.618).
  • Handle Length: The number of bars between P3 and P4 must be within minHandleBars and maxHandleBars .
  • Handle Slope: The slope of the line joining P3 and P4 must be gentle enough (absolute slope < maxHandleSlope ).
  • Breakout Segment Drawing: The engine waits until a breakout (P5) is confirmed before drawing the second segment of the handle (P4 to P5). If breakout is not required, the pattern is drawn early (only showing the P3 to P4 segment until a breakout occurs).

If any of those checks fails, the engine prints a FAIL line and includes a short SkipReason explaining why the pattern was ignored.

9. Summary Block

RIM‑VAR : PASS (5.0% vs max 20.0%)

FIT‑R2 : PASS (R2=0.8421 vs min 0.7500)

FIT‑PEAK : PASS (x_peak=0.12 vs max 0.50)

FIT‑ASYM : PASS (L55% R45% min 25%)

FIT‑CONCAV : PASS (a=0.000012, Bull cup needs a≥0)

DEPTH‑RATIO: PASS (0.85 vs min 0.70)

HANDLE : PASS

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

OVERALL : >>> SIGNAL VALID <<<

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

If *any* of the PASS checks flips to FAIL, the final OVERALL line becomes >> SIGNAL BLOCKED <<< . That’s the engine’s quick‑look way of saying “skip this candidate”.




📋 Strategy Cheatsheet & Best Practices

Timeframe Stability vs. Noise

  • Works Best on H1+ (Highly Recommended): Parabolic Cup & Handle patterns are long-term accumulation/distribution structures. Higher timeframes aggregate substantially more trading volume in a single candle — each H1 bar represents an entire hour of buying and selling consensus among institutions, retail traders, and algorithmic systems all at once. On higher timeframes like H1, H4, and Daily, these volume-rich candles produce highly stable regression curves with minimal noise, leading to stronger, higher-probability breakout continuations.
  • Lower Timeframes (M15, M5, M1): Lower timeframes suffer from significant market noise, erratic spikes, and frequent "fakeouts" (false breakouts). Because each candle contains far fewer transactions, a single large order or news spike can distort the whole curve shape, leading to poor regression fits and higher failure rates. If scalping on lower timeframes, it is critical to rely on session momentum and high-volume candles to filter out fake breakouts.

R2 Fit & Filtering Configurations

Trading Style Min Cup R2 Min Width (Bars) Min Cup Depth Ratio Preceding Trend Check
Conservative / Swing (H1+) 0.80 - 0.85
(Requires high parabolic precision)
20 - 30
(Filters out small, rushed patterns)
0.08 - 0.12
(Stricter depth requirements)
50 - 80 bars lookback
(Ensures a strong prior trend impulse)
Balanced / Standard (H1 - H4) 0.75
(Default: Good balance of shape & quantity)
15
(Default: Allows medium-sized cups)
0.06
(Default: Volatility-adjusted filter)
50 bars lookback
(Standard prior trend retracement check)
Aggressive / Scalping (M15 and below) 0.70
(Allows slightly jagged U-shapes)
10 - 12
(Captures smaller, quicker consolidation)
0.04
(Allows flatter cups in low ATR markets)
0 (Disabled)
(Prior trend lookback is too noisy on small charts)

Quick Best Practices

  • Disable Prior Trend for Flat Ranges: If you are trading in a ranging market or want to capture cup setups without checking prior trend magnitude, set Preceding Fibo Trend lookback window (bars) = 0 to bypass the trend check entirely. Setting it to 0 also disables the Min/Max Depth relative to prior Fibo Trend checks.
  • Trigger Modes: Use TRIGGER_HANDLE_TRENDLINE for sloped cup setups where the breakout happens over a declining handle channel. Use TRIGGER_HORIZONTAL_P3 when the market forms a clear horizontal resistance line at the right cup rim.




⚙️ Settings Explained (What each input does)




All inputs appear under the indicator's "Properties" window. Below is a plain‑English description of every setting you'll see. The titles match the exact labels shown in MetaTrader (with the internal code variable names in parentheses).

🔧 General Display Settings

  • Max Past Bars ( MaxPastBars ): The maximum number of historical bars to scan for patterns.
  • Prefix ( Prefix ): Unique prefix for all graphic objects created by the indicator (default ABR_CH_ ). This prevents conflict if you run multiple instances.
  • Extend Trend lines (bars) ( ExtendBars ): How many future bars the entry line is projected.

📈 Trend Filter Settings

  • Check EMA Stack Trend ( CheckEMAStack ): If set to true, only shows patterns and triggers alerts that align with the EMA Stack Trend direction (e.g. standard Buy cups in uptrends and inverted Sell cups in downtrends).
  • MA Periods (Comma-Separated) ( MA_PeriodsStr ): Defines the periods of the moving averages used for evaluating the trend stack (default "50,100,200").
  • MA Method ( MA_Method ): Method of moving averages to use (e.g. MODE_EMA).
  • MA Applied Price ( MA_AppliedPrice ): Price source to apply to the moving averages.

🔧 Regression Filters

  • Min Cup R2 Correlation ( InpMinParabolaFitR2 ): Minimum R² score a cup must achieve. Higher = stricter, fewer signals.
  • Local Maxima Peak Search Window ( InpAnchorPeakWindow ): How many bars on each side the engine looks to confirm a true peak/trough for P1 and P3.

📐 Cup Measurements

  • Price Type ( InpPriceType ): PRICE_HIGH_LOW uses wicks; PRICE_OPEN_CLOSE uses bodies.
  • Minimum cup width ( InpCupMinBars ) / Maximum cup width ( InpCupMaxBars ): Minimum and maximum number of bars the cup can span.
  • Max P1/P3 difference % of cup ( InpMaxRimVariancePct ): How much the left and right rims can differ in price. Keeps the cup symmetrical.
  • Min Depth relative to prior Fibo Trend ( InpCupMinRetrace ) / Max Depth allowed ( InpCupMaxRetrace ): Prevents cups that are too shallow or too deep compared with earlier price action. Set to -1 or 0 to disable these checks. Alternatively, disable the entire Fibo lookback check by setting Preceding Fibo Trend lookback window (bars) to 0 .
  • Min Cup Depth to Width ATR Ratio ( InpMinCupDepthRatio ): Requires the cup's vertical depth to be significant relative to market volatility. Set to -1 or 0 to disable.
  • Preceding Fibo Trend lookback window (bars) ( InpPriorTrendBars ): The search window (number of bars preceding P1 left rim) to determine the prior trend's starting point (P0) and impulse magnitude. Set to 0 to completely disable and bypass the preceding trend check — this also disables the Min/Max Depth relative to prior Fibo Trend checks entirely.

🖐️ Handle Rules

  • Max drop depth from P3 ( InpHandleMaxDropPct ): Maximum allowed retracement from the cup rim to the handle low (default 62 %).
  • Min consolidation length ( InpHandleMinBars ) / Max consolidation width ( InpHandleMaxBars ): Minimum and maximum bar count for the handle.
  • Breakout Trigger Type ( InpTrigger ): Choose TRIGGER_HORIZONTAL_P3 for a horizontal entry line (breakout checked against P3 rim price) or TRIGGER_HANDLE_TRENDLINE for a slanted entry trendline connecting P1 and P3.
  • Require breakout to show pattern ( InpRequireBreakout ): If true, the pattern stays hidden until the price actually breaks the entry line. If false, the pattern is drawn early (when P4 forms), drawing the breakout segment (P4 to P5) only if/when a breakout occurs.

🖼️ Chart Visuals

  • Overlap Cups (Min 1, Max 3) ( MaxOverlapCups ): The maximum number of overlapping cups allowed at any bar. Useful for seeing nested structures (e.g. small cups inside larger ones).
  • Overlap Show Priority ( InpOverlapMode ): Prioritize which overlapping cups to show when the overlap limit is reached. Options are:
    • Latest Pattern : Prioritizes the most recently formed/breakout cups (default).
    • Oldest Pattern : Prioritizes older cups that formed earlier.
    • Best Match (R2) : Prioritizes cups with the highest mathematical quadratic regression U-shape correlation.
    • Largest Cup (Width) : Prioritizes wider, macro-level cups (perfect for swing traders).
    • Smallest Cup (Width) : Prioritizes narrower, micro-level cups (perfect for scalpers/day traders).
  • Show Cup Curves ( ShowCupStructures ): Toggle drawing the mathematical curves of the cups on the chart.
  • Show Handle Triangle ( ShowHandles ): Toggle drawing the consolidated handle structures.
  • Show entry Trend Lines ( ShowEntryZones ): Toggle drawing the entry trigger level lines.
  • Show P1,P2,P3,P4 Labels ( ShowLabels ): Toggle showing the text labels on the chart (P1 Left Rim, P2 Bottom/Top, P3 Right Rim, P4 Handle).




🔔 Alerts Settings

  • Alert On Handle Finish ( AlertOnHandleFinish ): If set to true , triggers an alert immediately when the handle consolidation finishes (meaning P1, P2, P3, and P4 points are fully validated), even if the price has not broken out of the entry level yet.
  • Alert On Breakout ( AlertOnBreakout ): If set to true , triggers an alert when the price breaks out of the entry trigger zone (closes above the entry level for a Buy cup, or below for a Sell cup).
  • Alert Only Volume Breakouts ( AlertOnlyVolumeBreakouts ): If set to true , filters breakout alerts to only fire when the breakout bar shows strong institutional consensus (climax or rising PVA volume in the direction of the breakout). If set to false , alerts on every standard open/close breakout.
  • Alert On Bar ( ShiftAlert ): Target bar index to evaluate for alerts. Setting it to 1 evaluates the last closed candle (recommended for fully confirmed non-repaint alerts). Setting it to 0 evaluates the current forming candle in real-time.
  • Popup Alerts ( PopupAlerts ), Sound Alerts ( SoundAlerts ), Send push notification ( NotificationAlerts ), Send email ( EmailAlerts ): Standard parameters to enable pop-up dialog boxes inside MetaTrader, custom sound files (e.g. alert.wav ), push notifications to your mobile app, or automated emails.


🎨 Color Settings

  • Color: Standard Cup color ( Col_BuyCupLine ) / Color: Inverted Cup ( Col_SellCupLine ): Colors for bullish and bearish cup curves.
  • Color: Entry trigger ( Col_Entry ): Color for the breakout entry level line.
  • Color: Label Texts ( Col_Text ): Color for the text labels on the chart.

⚙️ Debug Settings

  • Show Debug Values: Enable basic diagnostic prints in the logs.
  • Debug Log File: Filename for the detailed debug logs (default AbiroidCupHandleChart.log ).
  • Show Debug Verbose: Display extended labels and step-by-step math verification data on the chart.

🔍 Debug Bar Analysis

  • Show Debug Analysis: Toggle the detailed bar-by-step detection logging.
  • Debug Start Bar / Debug End Bar / Debug Handle End Bar: Limit the detailed analysis scans to a specific bar window (e.g. from P1 left rim down to P4 handle) to isolate and troubleshoot candidate patterns.
  • Debug Detailed OHLC: Toggle printing raw price values for every bar inside the analyzed window.





🔬 Pattern Quality Score — Reading the Diagnostics

Every time the indicator scans a candidate cup, it runs a multi-stage checklist and prints a summary block in the MT4 Experts log. Think of it as the indicator's internal "report card" for that pattern. Here's how to read it quickly:

Check Name What It Means Tips If It FAILS
RIM-VAR Left and right cup rims are close enough in price (symmetrical cup) Lower Max P1/P3 difference % tolerance, or try a wider scan window
FIT-R2 The cup fits a parabolic U-shape well Lower the Min Cup R2 Correlation slightly (e.g. from 0.80 → 0.75)
FIT-PEAK The cup's deepest point is roughly centred Price spiked abnormally — this cup is too lopsided. No fix; skip it.
FIT-ASYM Both halves of the cup have adequate length Increase Min Cup Width to force bigger, more even cups
FIT-CONCAV Cup opens in the correct direction (up for bullish, down for bearish) Wrong pattern type detected — ensure price action has a clear trend
DEPTH-RATIO Cup depth is meaningful relative to market volatility (ATR) Lower Min Cup Depth to Width ATR Ratio, or switch to PRICE_HIGH_LOW
HANDLE Handle retracement, slope, and bar count all pass Increase Max Handle Consolidation bars, or lower the Max Drop Depth Fibonacci limit


If OVERALL: SIGNAL VALID appears, the pattern meets every single check and will be drawn on your chart. If OVERALL: SIGNAL BLOCKED appears, the first FAIL line tells you exactly which check rejected the pattern.


❓ Frequently Asked Questions (FAQ)

Q: The indicator draws too many patterns — what settings should I tighten?
A: Increase Min Cup R2 Correlation (e.g. 0.80), increase Min Cup Width, and enable Require Breakout to Show Pattern = true. On lower timeframes, consider setting Preceding Fibo Trend Lookback to 50 to enforce a prior trend.

Q: The indicator draws no patterns at all — why?
A: Lower Min Cup R2 Correlation slightly (e.g. 0.70), decrease Min Cup Width, or reduce Min Depth relative to prior Fibo Trend. Also check that your chart has enough history — increase Max Past Bars if needed.

Q: What's the difference between TRIGGER_HORIZONTAL_P3 and TRIGGER_HANDLE_TRENDLINE?
A: TRIGGER_HORIZONTAL_P3 draws a flat horizontal line at the P3 rim price — the breakout is clean and easy to place a pending order on. TRIGGER_HANDLE_TRENDLINE draws a slanted line through P1 and P3 — useful when the right rim is slightly lower and you want to follow the natural declining resistance angle of the handle.

Q: Can I use this on Forex, Gold, Stocks, Crypto?
A: Yes. The indicator is fully symbol-agnostic. The ATR-based depth ratio filter automatically adjusts to each instrument's volatility. On high-spread instruments (crypto, exotic pairs), slightly lower the Min Depth ATR Ratio to compensate for wider bars.

Q: My pattern disappeared after it appeared — did the indicator repaint?
A: Only if Require Breakout to Show Pattern is false. In that mode, a partial pattern is drawn early and may disappear if the handle subsequently breaks validation rules. Set it to true for fully non-repainting confirmed signals only.

Q: What does "Overlap Show Priority" do exactly?
A: When multiple cup patterns share bars (nested cups), the indicator only draws up to the Overlap Cups limit. Priority determines which ones are kept — Latest (most recent), Oldest (longest-standing), Best R² (most mathematically precise shape), Largest (widest, macro cup), or Smallest (narrowest, micro cup for scalping).

Q: How do I know if the pattern is still valid after many bars?
A: The entry line drawn on your chart remains active for as long as Extend level lines bars into the future. Once price moves significantly beyond the original cup height target above the breakout point, consider the trade played out.




Other notes:

For best visibility uncheck Chart of Foreground:



🏁 Conclusion

The Abiroid Cup & Handle Chart Indicator does the heavy lifting: it scans every possible cup, runs a suite of mathematical checks, prints a clear debug trail, and finally draws only the patterns that pass all filters. By tweaking the inputs you can tailor it to scalpers, day‑traders, or swing‑traders.

The key to getting great results is starting on H1 or higher, using a Min R2 of 0.75+, enabling Require Breakout = true, and always trading breakouts where the candle has strong body and above-average volume. These three conditions together give you the highest probability setups.

Give it a try, watch the "Signal Valid" messages pop up, and experiment with the settings to match your own trading style. Happy charting! 🎯