# Scallop

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

Detects ascending and descending scallops (the rounded J-shaped continuation curves) by fitting a quadratic to each candidate span and demanding an R-squared of 0.8, a 3-25% depth over 15-100 bars, and a turn gradual enough to hold 30% of bars near its extreme. Completed curves draw target and stop levels, with a live developing-curve preview and shrinking-series alerts.

- Indicator in the LuxAlgo Library, by LuxAlgo, published May 13, 2026.
- Access: free.
- Concepts: [Scallop](https://www.luxalgo.com/library/concept/scallop/) (primary)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=w239a65txsqkiylt166kakh0
- Page: https://www.luxalgo.com/library/indicator/scallop/

**Scallop** puts an objective boundary on a pattern that is usually eyeballed: the rounded J-shaped pause that continues a trend. Because a [scallop](https://www.luxalgo.com/library/concept/scallop/) has no straight line to test, the build fits a least-squares quadratic across each span and accepts only curves that behave: minimum fit quality, mid-trend depth and duration, a turn inside the span, enough time near the extreme to rule out a sharp V. A candidate completes when price carries beyond the curve's starting lip; the fitted curve, target and stop are then drawn, with measurements in the tooltip.

## How to Trade the Scallop?

- **Completion carry**: a close above an ascending curve's starting high (below for descending) completes the pattern.
- **Target and stop**: the dotted target projects part of the curve's height beyond completion; the dashed stop sits at the turn.
- **Shrinking series**: a completed scallop shorter and shallower than its predecessor is a maturing-trend hint, with its own alerts.
- **Developing curve**: an optional dotted preview traces a forming curve once its turn is in, plus the level to carry beyond.

A trend filter keeps ascending curves in advances and descending in declines, their place in the [continuation pattern family](https://www.luxalgo.com/library/family/patterns/).

## Scallop Settings

- **Ascending Scallops** / **Descending Scallops** (both on).
- **Swing Detection Length** (default 5): bars each side confirming the starting lip.
- **Curve Length Min** (default 15) and **Max** (default 100): duration bounds in bars.
- **Curve Depth % Min** (default 3) and **Max** (default 25): lip-to-turn distance in percent.
- **Curve Source** (default close), **Curve Fit Quality (R²)** (default 0.8) and **Roundedness %** (default 30): the shape tests.
- **Trend Filter** (default on) with **Trend Average Length** (default 50); **Require Volume Curve** (default off).
- **Target Projection %** (default 50), **Show Target Level** and **Show Stop Level** (both on); style: **Show Labels**, **Show Developing Curve** (both on).

## Frequently Asked Questions

### What separates a scallop from a cup and handle?

Scale and role: a [cup-with-handle base](https://www.luxalgo.com/library/indicator/cup-with-handle-base/) is a large rounded base launching a new advance, handle included. The scallop is a modest dip inside a move already underway, hence the depth and duration caps.

### Why did the developing curve disappear?

The preview is re-graded on every live bar; a shape that degrades (too deep, too old, fit quality lost) is withdrawn. Only the completion carry makes a pattern permanent.

### Why is the default target only half the curve height?

Pattern statistics favor trimming full measure-rule projections, most of all late in a trend. Target Projection % restores the full rule at 100.

## Related indicators

- [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
- [Half Cup](https://www.luxalgo.com/library/indicator/half-cup/) (Cup & Handle): markdown at https://www.luxalgo.com/library/indicator/half-cup.md
- [Measured-move Up/down](https://www.luxalgo.com/library/indicator/measured-move-up-down/) (Chart & Candlestick Patterns): markdown at https://www.luxalgo.com/library/indicator/measured-move-up-down.md
- [Gap Fill Breakouts](https://www.luxalgo.com/library/indicator/gap-fill-breakouts/) (Chart & Candlestick Patterns): markdown at https://www.luxalgo.com/library/indicator/gap-fill-breakouts.md

---

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