# Half Cup

Half Cup is an indicator on [Vela](https://vela.luxalgo.com/chart), our next-generation charting platform, written in Pine Script®.

Detects half-formed cup shapes, wraps them in a curved channel, and prints green or red dots as price breaks above or below it, trading the pattern while it is still developing. Broadness, shift, and validation thresholds control what qualifies. An anticipatory take on the Cup and Handle for pattern-focused traders.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Jul 18, 2024.
- Access: free.
- Concepts: [Cup & Handle](https://www.luxalgo.com/library/concept/cup-and-handle/) (primary), [Rounding Top/bottom](https://www.luxalgo.com/library/concept/rounding-top-bottom/), [Breakout](https://www.luxalgo.com/library/concept/breakout/)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=cmpwn1wsa002lvhsgxrcbl4jn
- Page: https://www.luxalgo.com/library/indicator/half-cup/

The **Half Cup** indicator trades the [Cup & Handle](https://www.luxalgo.com/library/concept/cup-and-handle/)'s opening act. Rather than waiting for a full basin and handle to complete, it detects price curving through half of a rounded shape (essentially one side of a [rounding bottom](https://www.luxalgo.com/library/concept/rounding-top-bottom/) or top) wraps that arc in a channel, and marks channel breakouts with dots: bullish opportunities in green, bearish in red.

## How to Trade the Half Cup?

- **Green dot**: price has closed above the upper line of a half-cup channel, bullish or bearish, a potential entry, and after a rebound back under the line, a fresh dot marks the level being reclaimed.
- **Red dot**: price has closed below the lower line of either channel, the downside mirror.
- **Channel drawn**: the pattern has passed validation against the Max % Breaks thresholds, and dots can keep printing until the channel completes.
- **Beyond entries**: the curved channels double as a trend read, framing longer-term opportunities while the shape develops, sometimes ahead of a completed cup formation.

Patterns are drawn with hindsight: each channel is backpainted from its detection point. Breakout dots, however, stay where they printed, so price reactions at the marked levels can be judged honestly; separate colors distinguish currently visible patterns from ones later updated or removed.

## Half Cup Settings

- **Swing Length**: the swing detection period; larger values anchor patterns to longer-term structure.
- **Max % Breaks Bottom / Max % Breaks Tops**: the share of bars allowed to close beyond the lower or upper line before a candidate is rejected. Start near 100% to explore placements, then tighten for stricter detection.
- **% Broadness**: tilts the top and bottom lines diagonally to fit bullish or bearish curvature.
- **Vertical Shift**: nudges the whole pattern up or down on the chart.
- **Channel Length**: how far the channel lines extend.

## Frequently Asked Questions

### Does the Half Cup repaint?

The channels are subject to backpainting because patterns are identified in hindsight, but once a breakout dot is displayed it stays fixed. That split lets you study how price reacted at the marked levels without the signals themselves moving.

### How should I confirm the dots?

Treat a dot as a candidate breakout rather than a finished trade. Pairing it with a confirmation tool such as [Breakouts with Tests & Retests](https://www.luxalgo.com/library/indicator/breakouts-with-tests-retests/) helps separate clean escapes from moves that fall straight back into the channel.

### How do I access the Half Cup indicator?

Quant, our coding agent, can load the Half Cup right from this page for a look at historical detections. The indicator itself is free within the LuxAlgo Library. Just drop it straight onto your chart. You can also copy the source code from this page and run it anywhere Pine Script® runs.

## Related indicators

- [Breakouts with Tests & Retests](https://www.luxalgo.com/library/indicator/breakouts-with-tests-retests/) (Breakout): markdown at https://www.luxalgo.com/library/indicator/breakouts-with-tests-retests.md
- [Breakout Detector (Previous MTF High Low Levels)](https://www.luxalgo.com/library/indicator/breakout-detector-previous-mtf-high-low-levels/) (Breakout): markdown at https://www.luxalgo.com/library/indicator/breakout-detector-previous-mtf-high-low-levels.md
- [Channel Continuation](https://www.luxalgo.com/library/indicator/channel-continuation/) (Chart & Candlestick Patterns): markdown at https://www.luxalgo.com/library/indicator/channel-continuation.md
- [Bull/bear Flag](https://www.luxalgo.com/library/indicator/bull-bear-flag/) (Chart & Candlestick Patterns): markdown at https://www.luxalgo.com/library/indicator/bull-bear-flag.md
- [Rectangle](https://www.luxalgo.com/library/indicator/rectangle/) (Chart & Candlestick Patterns): markdown at https://www.luxalgo.com/library/indicator/rectangle.md
- [Wolfe Wave Detector](https://www.luxalgo.com/library/indicator/wolfe-wave-detector/) (Rising/falling Wedge): markdown at https://www.luxalgo.com/library/indicator/wolfe-wave-detector.md
- [Pennant](https://www.luxalgo.com/library/indicator/pennant/) (Chart & Candlestick Patterns): markdown at https://www.luxalgo.com/library/indicator/pennant.md
- [Scallop](https://www.luxalgo.com/library/indicator/scallop/) (Chart & Candlestick Patterns): markdown at https://www.luxalgo.com/library/indicator/scallop.md

---

Source: https://www.luxalgo.com/library/indicator/half-cup/ (LuxAlgo Library). Free to use with attribution: https://www.luxalgo.com/library/license/
