Swing Highs and Swing Lows and Candle Patterns
- Indicateurs
- Mohamed Elyes Hantous
- Version: 1.0
- Activations: 10
Swing High/Low & Candle Patterns Indicator is a pivot‐based technical tool that helps traders identify potential turning points in the market (swing highs and swing lows) and automatically detects common candlestick reversal patterns. Below is a detailed overview of how it works and what you can expect:
1. Pivot Detection (Swing Highs and Swing Lows)
- Core Logic: The indicator uses a user‐defined lookback period ( InpLength ) to determine whether a bar qualifies as a local maximum (pivot high) or local minimum (pivot low).
- Pivot High: A bar is labeled a pivot high if its high price is strictly greater than the highs of the surrounding InpLength bars on both the left and right sides.
- Pivot Low: A bar is labeled a pivot low if its low price is strictly lower than the lows of the surrounding InpLength bars on both the left and right sides.
- Swing Types: When a new pivot high forms, the indicator checks whether it is higher or lower than the previous pivot high and labels it either HH (Higher High) or LH (Lower High). Similarly, new pivot lows are labeled LL (Lower Low) or HL (Higher Low).
This systematic approach helps traders see emerging shifts in market momentum. Swing highs and lows can be used to identify trend direction, place stops, or spot potential support/resistance zones.
2. Candlestick Pattern Recognition
- Hammer / Inverted Hammer: Recognized when a pivot low is accompanied by a candle with a short real body and a disproportionately long wick. A hammer has a long lower wick, while an inverted hammer has a long upper wick. These formations can hint at a possible bullish reversal if found after a downtrend.
- Hanging Man / Shooting Star: Similar logic applies for pivot highs. A hanging man has a long lower wick near a market top, while a shooting star has a long upper wick. Both patterns can suggest a bearish shift after an uptrend.
- Engulfing Patterns: The indicator detects bullish and bearish engulfing patterns by comparing the current candle to the previous candle. Bullish engulfing typically involves a green candle completely engulfing a smaller red candle, while a bearish engulfing sees a large red candle enveloping a smaller green one.
These patterns are automatically labeled on the chart to provide a quick visual cue of potential market reversals or continuations.
3. Chart Markings
- Labels: For every valid pivot high or low, the indicator places a text label that shows the swing type ( HH , LH , LL , HL ) and the detected candlestick pattern name (or “None” if no pattern is found).
- Color Coding: By default, pivot highs are colored red, and pivot lows are colored teal, making them easy to see on the chart.
4. Practical Use
- Trend Analysis: Swing labels (HH, LH, LL, HL) can help you quickly assess whether a trend is continuing or losing strength.
- Reversal Signals: Candlestick patterns like hammers or engulfing bars can provide early clues of a shift in sentiment, allowing traders to watch for follow‐through.
- Risk Management: Some traders use pivots to place stop‐loss orders just above a recent swing high (when short) or below a recent swing low (when long).
While these features can be helpful for technical analysis, no indicator guarantees success. Candlestick patterns and pivot highs/lows should be interpreted alongside other forms of analysis (like volume, higher‐timeframe trends, or fundamental data).
5. Final Thoughts
This Swing High/Low & Candle Patterns Indicator offers a convenient, automated way to spot potential turning points and classic candlestick signals. It can serve as a complementary tool to confirm or refine your trade entries and exits. Remember to combine this indicator with solid risk management, and consider testing it on historical data or a demo account before using it live.
Overall, this indicator aims to make it easier for traders to recognize key market structures and well‐known candle patterns—giving you a clearer picture of price action dynamics as they unfold.