OPEN-SOURCE SCRIPT
Actualizado

Regular Trading Hours Opening Range Gap (RTH ORG)

3 509
### Regular Trading Hours (RTH) Gap Indicator with Quartile Levels

**Overview**
Discover overnight gaps in index futures like ES, YM, and NQ, or stocks like SPY, with this enhanced Pine Script v6 indicator. It visualizes the critical gap between the previous RTH close (4:15 PM ET for futures, 4:00 PM for SPY) and the next RTH open (9:30 AM ET), helping traders spot potential price sensitivity formed during after-hours trading.

**Key Features**
- **Standard Gap Boxes**: Semi-transparent boxes highlight the gap range, with optional text labels showing day-of-week and "RTH" identifier.
- **Midpoint Line**: A customizable dashed line at the 50% level, with price labels for quick reference.
- **New: Quartile Lines (25% & 75%)**: Dotted lines (default width 1) mark the quarter and three-quarter points within the gap, ideal for finer intraday analysis. Toggle on/off, adjust style/color/width, and add labels.
- **High-Low Gap Variant**: Optional boxes and midlines for gaps between the prior close's high/low and the open's high/low—perfect for wick-based overlaps on lower timeframes (5-min or below recommended).
- **RTH Close Lines**: Extend previous close levels with dotted lines and price tags.
- **Customization Galore**: Extend elements right, limit historical displays (default: 3 gaps), no-plot sessions (e.g., avoid weekends), and time offsets for non-US indices.

**How to Use**
Apply to 15-min or lower charts for best results. Toggle "extend right" for ongoing levels. SPY auto-adjusts for its 4 PM close.

Tested on major indices—enhance your gap trading strategy today! Questions? Drop a comment.

Thanks to twingall for supplying the original code.

Thanks to The Inner Circle Trader (ICT) for the logical and systematic application.
Notas de prensa
### Regular Trading Hours (RTH) Gap Indicator with Quartile Levels

**Overview**
Discover overnight gaps in index futures like ES, YM, and NQ, or stocks like SPY, with this enhanced Pine Script v6 indicator. It visualizes the critical gap between the previous RTH close (4:15 PM ET for futures, 4:00 PM for SPY) and the next RTH open (9:30 AM ET), helping traders spot potential price sensitivity formed during after-hours trading.

**Key Features**
- **Standard Gap Boxes**: Semi-transparent boxes highlight the gap range, with optional text labels showing day-of-week and "RTH" identifier.
- **Midpoint Line**: A customizable dashed line at the 50% level, with price labels for quick reference.
- **New: Quartile Lines (25% & 75%)**: Dotted lines (default width 1) mark the quarter and three-quarter points within the gap, ideal for finer intraday analysis. Toggle on/off, adjust style/color/width, and add labels.
- **High-Low Gap Variant**: Optional boxes and midlines for gaps between the prior close's high/low and the open's high/low—perfect for wick-based overlaps on lower timeframes (5-min or below recommended).
- **RTH Close Lines**: Extend previous close levels with dotted lines and price tags.
- **Customization Galore**: Extend elements right, limit historical displays (default: 3 gaps), no-plot sessions (e.g., avoid weekends), and time offsets for non-US indices.

**How to Use**
Apply to 15-min or lower charts for best results. Toggle "extend right" for ongoing levels. SPY auto-adjusts for its 4 PM close.

Tested on major indices—enhance your gap trading strategy today! Questions? Drop a comment.

Thanks to twingall for supplying the original code.

Thanks to The Inner Circle Trader (ICT) for the logical and systematic application.

+++ 2025.10.13 added new labels
Notas de prensa
Added day-specific features:

1. Toggleable option for different colored lines/boxes per weekday (e.g., blue for Monday, orange for Tuesday), with user-customizable colors.
2. Option to include abbreviated weekday (e.g., "Mon") in labels.
3. Toggle to match label colors to the day's color.
Notas de prensa
Added label customizion options:
1. Toggle to show/hide Midline labels
2. Toggle to show/hide Quartile labels
Notas de prensa
Added option to toggle on/off the last two Monday and Friday gaps, showcasing the beginning and end of the last two weeks of RTH gaps.
Notas de prensa
1. Fixed last 2 Fridays and Mondays to include midline and quantile arrays.
2. Added 1/8ths
Notas de prensa
1. Added Premium/Discount gradient levels (default = last 5 gaps)
2. Added Premium/Discount table
Notas de prensa
Fixed minor bug
Notas de prensa
1. Added FVGs which overlap RTH ORG gradient lines.
Notas de prensa
Fixed Maximum Time-frame to include higher time-frames per user's request.
Fixed miscellaneous bugs.
Notas de prensa
1. Fixed Premium/Discount Grid and table to include Last Two Mondays/Fridays when selected.
Notas de prensa
1. Fixed bug not including last Two Monday & Friday's range in "Only Show PD Gradients & Table," if selected.

Exención de responsabilidad

La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.