PROTECTED SOURCE SCRIPT

H&S_RSI

78
What This Indicator Does
Candlestick Pattern Detection:

Hammer / Green Hammer:
Identifies candles with a long lower shadow (at least twice the body size) where the low is an extreme relative to a user‑defined lookback period. For a “Green Hammer,” the candle must be bullish (close > open) and be preceded by a minimum number of bearish candles.
Shooting Star / Red Star:
Identifies candles with a long upper shadow (at least twice the body size) where the high is an extreme compared to prior bars. The “Red Star” requires a bearish candle (close < open) and a minimum number of preceding bullish candles.
RSI Filters (Multi-Time Frame):

You can enable RSI filters for the chart timeframe and/or a higher timeframe. For Hammer patterns, the RSI must be below a set threshold (e.g., ≤30), while for Shooting Star patterns it must be above a set threshold (e.g., ≥70).
Visual Signals and Alerts:

When all conditions are met, the indicator plots labels on the chart (green labels for Hammer/Green Hammer and red labels for Shooting Star/Red Star).
Alert conditions are set so you can configure TradingView alerts.
RSI Board (Displayed via a Label):

If at least one RSI filter is enabled, a small board appears on the chart (implemented as a label) showing the current RSI values from both the chart timeframe and the higher timeframe.
The board’s position is determined by your selection ("Top Left", "Top Right", "Bottom Left", or "Bottom Right") using fixed data‑coordinate offsets.
Instructions for Use
Add the Indicator to Your Chart:

Copy and paste the complete code into a new script in TradingView’s Pine Script editor, then save and apply it to your chart.
Configure Pattern Settings:

Use the provided checkboxes and inputs to enable/disable pattern detection, set the lookback period for extremes, and specify the required consecutive bearish/bullish candles.
Set Up the RSI Filters:

Enable the RSI filters (Chart and/or Higher Time Frame) and adjust the period and threshold parameters.
Select the Board Position:

Choose your preferred board position (“Top Left”, “Top Right”, “Bottom Left”, or “Bottom Right”) from the input dropdown.
The label will be positioned relative to the current bar index and the highest/lowest value over the past 200 bars.
Review Signals and Set Alerts:

The indicator plots signals on your chart when valid patterns are detected.
You can also create alerts using the defined alert conditions.
By following these instructions and adjusting the inputs as needed, you can use this multi‑confirmation indicator to identify potential reversal patterns while monitoring RSI values from multiple timeframes.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.