OPEN-SOURCE SCRIPT

Swing Highs/Lows & Candle Patterns [LuxAlgo]

Updated
This script labels swing highs and swing lows as well as the candle pattern that occurred at that precise point. The script can detect the following 6 candle patterns: hammer, inverse hammer, bullish engulfing, hanging man, shooting star, and bearish engulfing.

This indicator by its very nature backpaints by default, meaning that the displayed components are offset in the past.

🔶 USAGE

It can be interesting to see if a top or bottom is associated with a specific candle pattern, this allows us to study the potential of such a pattern to indicate a reversal. You can hover on a label with a specific pattern to see more details about it.

The notations HH, HL, LH, and LL you can see on the labels are defined as follows:

  • HH : Higher high
  • HL : Higher low
  • LH : Lower high
  • LL : Lower low


🔶 SETTING

Length: Sensitivity of the swing high/low detection, with lower values returning the maximum/minimum of shorter-term price variations.
Release Notes
Copyright update & default "length" input value set to 20.
Release Notes
Minor Changes.
Release Notes
Update to script title.
Release Notes
Changed styling, switched to version 5, and minor changes.
Release Notes
Minor changes
Candlestick AnalysisCandlestick analysiscandlestickpatternhigherhighhigherlowLUXluxalgoswinghighswinglow

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?


Get access to our exclusive tools: luxalgo.com

Join our 150k+ community: discord.gg/lux

All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
Also on:

Disclaimer