OPEN-SOURCE SCRIPT
Morning & Evening Star Detector [SSFX]

Morning & Evening Star Detector [SSFX] is an open-source candlestick pattern indicator designed to identify two classic 3-candle reversal formations: the Morning Star and the Evening Star.
The Morning Star is a bullish reversal pattern that typically appears after bearish pressure. The indicator identifies it using a 3-candle structure:
The Evening Star is the opposite bearish reversal pattern. It is detected when the market forms:
To make the patterns easier to read on the chart, the script automatically draws a box around the full 3-candle formation:
The box covers the full high-to-low range of the entire pattern, helping traders visually study where the reversal structure formed.
Main features:
The pattern logic is fully customizable. Users can adjust the required body size of the first candle, the maximum body size of the star candle, the minimum body size of the confirmation candle, and how deeply the third candle must close into the first candle’s body.
The optional gap setting is included for traders who prefer a more classical definition of Morning Star and Evening Star patterns. Since many markets such as forex, gold, crypto, and index CFDs often do not produce clean session gaps, the gap requirement can be turned off for more flexible detection.
This indicator is intended for educational and analytical use. It does not predict future price movement and should not be used as a standalone trading system. Morning Star and Evening Star patterns are best interpreted together with market structure, support and resistance, trend context, volume, and proper risk management.
The Morning Star is a bullish reversal pattern that typically appears after bearish pressure. The indicator identifies it using a 3-candle structure:
- A strong bearish first candle
- A small-bodied middle candle, representing hesitation or loss of momentum
- A strong bullish third candle that closes back into the body of the first candle
The Evening Star is the opposite bearish reversal pattern. It is detected when the market forms:
- A strong bullish first candle
- A small-bodied middle candle
- A strong bearish third candle that closes back into the body of the first candle
To make the patterns easier to read on the chart, the script automatically draws a box around the full 3-candle formation:
- Green box = Morning Star
- Red box = Evening Star
The box covers the full high-to-low range of the entire pattern, helping traders visually study where the reversal structure formed.
Main features:
- Detects Morning Star bullish reversal patterns
- Detects Evening Star bearish reversal patterns
- Draws visual boxes around valid 3-candle patterns
- Green highlight for Morning Star formations
- Red highlight for Evening Star formations
- Optional labels for detected patterns
- Optional background highlighting
- Adjustable candle body percentage filters
- Adjustable middle candle size filter
- Adjustable third candle close requirement
- Optional gap requirement for more traditional pattern detection
- Built-in alert conditions for both pattern types
The pattern logic is fully customizable. Users can adjust the required body size of the first candle, the maximum body size of the star candle, the minimum body size of the confirmation candle, and how deeply the third candle must close into the first candle’s body.
The optional gap setting is included for traders who prefer a more classical definition of Morning Star and Evening Star patterns. Since many markets such as forex, gold, crypto, and index CFDs often do not produce clean session gaps, the gap requirement can be turned off for more flexible detection.
This indicator is intended for educational and analytical use. It does not predict future price movement and should not be used as a standalone trading system. Morning Star and Evening Star patterns are best interpreted together with market structure, support and resistance, trend context, volume, and proper risk management.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.