OPEN-SOURCE SCRIPT
업데이트됨 Macro Range Highlighter

This Pine Script indicator creates visual boxes that highlight specific time-based price ranges throughout the trading day, operating in New York Eastern Time. It offers two distinct modes: a standard hourly range mode and a classic ICT (Inner Circle Trader) Macro mode.
Two Operating Modes
Mode 1: Standard Hourly 50-09 Ranges (Default)
This mode identifies and highlights the price range during the final 10 minutes of each hour (xx:50) through the first 9 minutes of the next hour (xx:09).
Examples of captured ranges:
08:50 - 09:09
09:50 - 10:09
10:50 - 11:09
11:50 - 12:09
12:50 - 13:09
13:50 - 14:09
14:50 - 15:09
And continues for each hour...
Excluded Time Periods:
The indicator excludes certain periods that cross into or occur during market close and the daily reset:
02:50 - 03:09 (excluded to avoid interference with overnight session)
15:50 - 18:09 (excluded to avoid end-of-regular-hours and the 18:00 ET trading day reset)
This means you will NOT see boxes during the 16:00 or 17:00 hours, as these fall within the excluded window.
Mode 2: Classic ICT Macro Times
When enabled, this mode shows ONLY four specific time windows that are significant in ICT methodology:
02:33 - 02:59 (London Midnight Macro)
04:03 - 04:29 (London Open Macro)
13:10 - 13:39 (New York Lunch Macro)
15:15 - 15:44 (New York Close Macro)
When this mode is active, all standard hourly ranges are disabled, including the 02:50-03:09 range.
Green Line - Open Price
Represents the open price of the first candle when the range begins
This line is static once set - it shows where price opened when entering the time window
Extends horizontally across the entire duration of the box
Example: If the range starts at 08:50 and that candle opens at 18,500, the green line will be drawn at 18,500
Blue Line - Evolving Midpoint
Represents the dynamic midpoint between the range high and range low
This line continuously recalculates as new highs or lows are made within the time window
Calculation: Midpoint = (Range High + Range Low) / 2
Evolution example:
At 08:50, range is 18,480 (low) to 18,520 (high), midpoint = 18,500
At 08:55, price makes new high of 18,540, midpoint updates to 18,510
At 09:02, price makes new low of 18,470, midpoint updates to 18,505
The line visually adjusts up and down as the range expands
Extension: The line extends horizontally from the start of the range to the current bar (or end of range)
This gives traders a visual reference for the "fair value" or equilibrium point of the range
Red Line - Close Price
Represents the close price of the most recent candle within the time window
This line updates continuously with each new bar's close price
Extends horizontally across the range
When the range completes (exits the time window), it shows the final close price of the last bar in the range
Example: As price moves from 08:50 to 09:09, the red line will track the close of each candle: 18,505 → 18,510 → 18,508 → 18,515, etc.
This indicator provides a sophisticated visual framework for analyzing specific time-based price behavior. The evolving midpoint (blue line and optional yellow plot) is particularly powerful because it gives you real-time feedback on where the "fair value" of the range is as it develops, allowing you to make informed decisions about whether price is extended or returning to equilibrium. The three-line system (open/mid/close) creates a complete picture of price action within each critical time window, whether you're using standard hourly analysis or focusing on ICT's specific macro times.
Two Operating Modes
Mode 1: Standard Hourly 50-09 Ranges (Default)
This mode identifies and highlights the price range during the final 10 minutes of each hour (xx:50) through the first 9 minutes of the next hour (xx:09).
Examples of captured ranges:
08:50 - 09:09
09:50 - 10:09
10:50 - 11:09
11:50 - 12:09
12:50 - 13:09
13:50 - 14:09
14:50 - 15:09
And continues for each hour...
Excluded Time Periods:
The indicator excludes certain periods that cross into or occur during market close and the daily reset:
02:50 - 03:09 (excluded to avoid interference with overnight session)
15:50 - 18:09 (excluded to avoid end-of-regular-hours and the 18:00 ET trading day reset)
This means you will NOT see boxes during the 16:00 or 17:00 hours, as these fall within the excluded window.
Mode 2: Classic ICT Macro Times
When enabled, this mode shows ONLY four specific time windows that are significant in ICT methodology:
02:33 - 02:59 (London Midnight Macro)
04:03 - 04:29 (London Open Macro)
13:10 - 13:39 (New York Lunch Macro)
15:15 - 15:44 (New York Close Macro)
When this mode is active, all standard hourly ranges are disabled, including the 02:50-03:09 range.
Green Line - Open Price
Represents the open price of the first candle when the range begins
This line is static once set - it shows where price opened when entering the time window
Extends horizontally across the entire duration of the box
Example: If the range starts at 08:50 and that candle opens at 18,500, the green line will be drawn at 18,500
Blue Line - Evolving Midpoint
Represents the dynamic midpoint between the range high and range low
This line continuously recalculates as new highs or lows are made within the time window
Calculation: Midpoint = (Range High + Range Low) / 2
Evolution example:
At 08:50, range is 18,480 (low) to 18,520 (high), midpoint = 18,500
At 08:55, price makes new high of 18,540, midpoint updates to 18,510
At 09:02, price makes new low of 18,470, midpoint updates to 18,505
The line visually adjusts up and down as the range expands
Extension: The line extends horizontally from the start of the range to the current bar (or end of range)
This gives traders a visual reference for the "fair value" or equilibrium point of the range
Red Line - Close Price
Represents the close price of the most recent candle within the time window
This line updates continuously with each new bar's close price
Extends horizontally across the range
When the range completes (exits the time window), it shows the final close price of the last bar in the range
Example: As price moves from 08:50 to 09:09, the red line will track the close of each candle: 18,505 → 18,510 → 18,508 → 18,515, etc.
This indicator provides a sophisticated visual framework for analyzing specific time-based price behavior. The evolving midpoint (blue line and optional yellow plot) is particularly powerful because it gives you real-time feedback on where the "fair value" of the range is as it develops, allowing you to make informed decisions about whether price is extended or returning to equilibrium. The three-line system (open/mid/close) creates a complete picture of price action within each critical time window, whether you're using standard hourly analysis or focusing on ICT's specific macro times.
릴리즈 노트
Bug Fix오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.