Key Components:
Market Structure Detection (HH, HL, LH, LL):
The script identifies swing highs and swing lows based on a specified length (default 10).
It labels the market structure as:
HH (Higher High): Occurs when a new swing high is detected, higher than the previous swing high.
HL (Higher Low): Occurs when a new swing low is detected, higher than the previous swing low.
LH (Lower High): Occurs when a new swing high is lower than the previous one.
LL (Lower Low): Occurs when a new swing low is lower than the previous one.
These labels help track the trend and the market's underlying structure.
New York Kill Zone:
The script highlights the New York Kill Zone, which is the period from 10:30 AM to 4:45 PM EST (or adjusted based on your chosen time zone offset).
During this time window, it tracks the highest and lowest prices, marking them as the Kill Zone High and Kill Zone Low.
The background turns blue during the kill zone to provide a visual cue.
Entry Criteria:
Sell Signal: A sell signal is triggered when:
The price breaks above the Kill Zone High.
There is a bearish engulfing or bearish order block pattern.
The signal occurs outside the kill zone, ensuring it’s not within restricted trading hours.
Buy Signal: A buy signal is triggered when:
The price breaks below the Kill Zone Low.
There is a bullish engulfing or bullish order block pattern.
The signal occurs outside the kill zone, ensuring it’s not within restricted trading hours.
Entry Restriction Window:
The strategy also includes an Entry Restriction Window, which prevents trades during certain times outside of the kill zone. For example, it may prevent trades from 8:00 AM to 6:00 PM based on your settings, avoiding noise and irrelevant price movements.
Trading Signals:
Buy Signal: When the price breaks below the Kill Zone Low and a bullish signal (like a bullish engulfing or bullish order block) is detected, and it occurs outside the kill zone.
Sell Signal: When the price breaks above the Kill Zone High and a bearish signal (like a bearish engulfing or bearish order block) is detected, and it occurs outside the kill zone.
Plotting:
Swing Highs (HH) and Swing Lows (LL) are labeled on the chart.
Buy and Sell signals are plotted as arrows or labels on the chart (Buy below bars, Sell above bars).
Kill Zone High and Low are plotted as green and red lines respectively.
The kill zone is visually marked with a blue background to highlight the time period.
Alerts:
Alerts are set up to notify you when a Buy Signal or Sell Signal occurs, based on the specified conditions.
Purpose:
The strategy helps identify key market structure levels (HH, HL, LH, LL) and trade within the New York Kill Zone based on price action patterns like engulfing candles and order blocks.
It aims to avoid trading during non-ideal periods (outside the kill zone) and provides visual cues and alerts to manage potential entries and exits.