# Candlestick Structure

Detects sixteen classic candlestick formations and filters them against the major trend, with four selectable trend engines and an alignment dashboard scoring each pattern's congruence. Minor-trend candle coloring exposes retracements as they form. Built for pattern traders who only want formations that agree with the larger move.

- Indicator in the LuxAlgo Library, by LuxAlgo, published Jul 2, 2024.
- Access: free.
- Concepts: [Swing Structure Grammar](https://www.luxalgo.com/library/concept/swing-structure-grammar/) (primary), [Bullish/bearish Engulfing](https://www.luxalgo.com/library/concept/bullish-bearish-engulfing/), [Hammer](https://www.luxalgo.com/library/concept/hammer/), [Doji](https://www.luxalgo.com/library/concept/doji/)
- Open on Vela: https://vela.luxalgo.com/chart?pineScriptCodeId=cmpwn0rtf000zvhsgbep49lp7
- Page: https://www.luxalgo.com/library/indicator/candlestick-structure/

**Candlestick Structure** detects sixteen classic candlestick formations and filters them through the prevailing [swing structure](https://www.luxalgo.com/library/concept/swing-structure-grammar/), surfacing only the patterns that agree with the major trend. Four selectable trend engines (Supertrend, EMAs, ChoCh, and Donchian Channel) define that trend, while an alignment dashboard tracks how consistently each formation has matched it.

## How to Trade the Candlestick Structure?

- **Trend-aligned pattern**: a formation printing in the major trend's direction marks a candidate end to a retracement, an entry location inside an ongoing move.
- **Minor trend coloring**: color candles by the minor trend to watch pullbacks develop against the larger structure before a pattern completes them.
- **Alignment dashboard**: shows the percentage of each pattern's appearances that matched the trend direction: a congruence read, deliberately not a confidence score.

Coverage spans eight bullish formations (Hammer, Inverted Hammer, Bullish Engulfing, Rising 3, 3 White Soldiers, Morning Star, Bullish Harami, Tweezer Bottom) and their eight bearish counterparts (Hanging Man, Shooting Star, Bearish Engulfing, Falling 3, 3 Black Crows, Evening Star, Bearish Harami, Tweezer Top), so most of the classical repertoire is on watch at once.

## Candlestick Structure Settings

- **Candlestick Patterns**: choose which of the sixteen formations to detect.
- **Minor Trend Length**: Donchian Channel length used for the minor trend.
- **Major Trend Method**: Supertrend, EMAs, ChoCh, or Donchian Channel.
- **Major Trend Parameters**: inputs for whichever method is selected.
- **Color Candles**: paints bars by the minor trend.
- **Dashboard**: size and position of the alignment table.

## Frequently Asked Questions

### What does the alignment percentage actually measure?

Only whether a pattern's direction matched the trend in force when it appeared. It is a basic congruence reading (useful for spotting which formations keep fighting the tape), not an assessment of how reliable the pattern is.

### Which trend method should I start with?

There is no privileged choice: Supertrend keys off breaks of its bands, EMAs use the fast/slow crossover, ChoCh reads changes of character, and the Donchian option tracks breaks of range extremes. Each method reshapes which patterns survive the filter, so try them against your market.

### How do I access Candlestick Structure?

Free, from this LuxAlgo Library page. Pattern traders focused specifically on turning points can pair it with [Reversal Candlestick Structure](https://www.luxalgo.com/library/indicator/reversal-candlestick-structure/), which narrows the same idea down to reversals. You can also copy the source code from this page and run it anywhere Pine Script® runs.

## Related indicators

- [Swing Structure Scanner](https://www.luxalgo.com/library/indicator/swing-structure-scanner/) (Swing Structure Grammar): markdown at https://www.luxalgo.com/library/indicator/swing-structure-scanner.md
- [HTF Swing Structure Signals](https://www.luxalgo.com/library/indicator/htf-swing-structure-signals/) (Swing Structure Grammar): markdown at https://www.luxalgo.com/library/indicator/htf-swing-structure-signals.md
- [Price Action Concepts](https://www.luxalgo.com/library/indicator/luxalgo-price-action-concepts/) (Swing Structure Grammar): markdown at https://www.luxalgo.com/library/indicator/luxalgo-price-action-concepts.md
- [LuxAlgo - Screener (PAC)](https://www.luxalgo.com/library/indicator/luxalgo-screener-pac/) (Swing Structure Grammar): markdown at https://www.luxalgo.com/library/indicator/luxalgo-screener-pac.md
- [Market Structure (Intrabar)](https://www.luxalgo.com/library/indicator/market-structure-intrabar/) (Swing Structure Grammar): markdown at https://www.luxalgo.com/library/indicator/market-structure-intrabar.md
- [Market Structure Oscillator](https://www.luxalgo.com/library/indicator/market-structure-oscillator/) (Swing Structure Grammar): markdown at https://www.luxalgo.com/library/indicator/market-structure-oscillator.md
- [Candlestick Channels](https://www.luxalgo.com/library/indicator/candlestick-channels/) (Bullish/bearish Engulfing): markdown at https://www.luxalgo.com/library/indicator/candlestick-channels.md
- [Reversal Candlestick Structure](https://www.luxalgo.com/library/indicator/reversal-candlestick-structure/) (Bullish/bearish Engulfing): markdown at https://www.luxalgo.com/library/indicator/reversal-candlestick-structure.md

---

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