OPEN-SOURCE SCRIPT
Updated

Hammer and Shooting Star Alerts - FrmRisk2Riches

63
This custom Pine Script indicator helps traders identify potential reversal signals in the market by detecting the formation of Hammer and Shooting Star candlestick patterns on multiple timeframes. The indicator automatically analyzes the 1-minute, 5-minute, 15-minute, and 30-minute charts, alerting you when a Hammer or Shooting Star candle forms on any of these timeframes.
Release Notes
This custom Pine Script indicator identifies potential reversal points in the market by detecting Hammer and Shooting Star candlestick patterns across multiple timeframes. The indicator now also considers the alignment of the daily and hourly candle colors before triggering an alert. Alerts will only appear when the color of both candles (bullish or bearish) is aligned or when the hourly close is within $1 of the daily close. The results are displayed in a convenient table that lists the timeframes (1-minute, 5-minute, 15-minute, and 30-minute) where the pattern is detected.
Release Notes
The Hammer and Shooting Star Alerts with Timeframe Table indicator is a versatile tool designed to help traders identify potential reversal signals in the market using the Hammer and Shooting Star candlestick patterns. This custom indicator not only detects these patterns on multiple timeframes (1-minute, 5-minute, 15-minute, and 30-minute) but also checks the alignment of the daily and hourly candle colors before triggering alerts. The results are displayed in a clear table at the bottom-center of the chart, making it easy to assess multiple timeframes at a glance.
Release Notes
The updated Hammer and Shooting Star Alerts script provides advanced functionality for detecting hammer and shooting star candlestick patterns across multiple timeframes, while ensuring the alerts only trigger when the daily and hourly candles are aligned (or close) in terms of their price direction (bullish or bearish).

Key Features:
Hammer and Shooting Star Detection:

The script identifies hammer and shooting star candlestick patterns on the 1-minute, 5-minute, 15-minute, and 30-minute timeframes.
The patterns are determined based on specific criteria regarding the body, upper shadow, and lower shadow of the candlesticks.
Timeframe Alignment:

The alert conditions are only met when both the daily and hourly candles share the same color (i.e., both are either bullish or bearish).
If the hourly and daily candles are within $1 of each other in terms of closing price, a special yellow background color is used to highlight the alignment.
The hourly timeframe can be slightly different from the daily timeframe as long as they are within a $1 range, which makes the background yellow.
Alert Table:

An alert table is displayed at the bottom center of the chart. This table shows the status of the candlestick pattern detection on each of the timeframes (1-min, 5-min, 15-min, 30-min).
Green Background: If the daily and hourly candles are both bullish (i.e., open < close), the background of the table cell will be green.
Red Background: If the daily and hourly candles are both bearish (i.e., open > close), the background will be red.
Yellow Background: If the daily and hourly candles are within $1 of each other in price, the background will be yellow, indicating that the candles are closely aligned but not fully matching.
Alerts:

When a hammer or shooting star pattern is detected on any of the selected timeframes and the daily/hourly candles are aligned (or within $1), an alert is triggered with the message: "Hammer or Shooting Star detected on aligned timeframes!"
This ensures that the alerts you receive are relevant to the current market sentiment on both higher and lower timeframes.
Visuals:
Arrow Plotting: The pattern detection will result in arrows on the chart pointing to the exact candlesticks that meet the hammer or shooting star criteria. The color of the arrows will align with the color of the daily candle, ensuring consistency with the overall trend.
Background Coloring: The background color of each timeframe's alert cell in the table reflects whether the daily and hourly candles are bullish, bearish, or within $1 of each other.
Improvements:
Compatibility: The script now works on Pine Script Version 6, ensuring up-to-date compatibility and the ability to handle type declarations properly.
Improved Background Logic: The background color now reflects the current price direction based on the most recent open and close prices, ensuring accurate market trend alignment.
Release Notes
Updated to ensure continuity aligns . Check previous updates to learn how to use this script.
Release Notes
Update to fix error for yellow background change. Should have been when price comes with $1 of the daily open
Release Notes
Candles without pattern with show color of the hourly candle

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.