ICT Opening Range GapOpening Range Gap
The Opening Range Gap, also known as the Regular Trading Hours (RTH) Gap, is the distance between the first opening tick of a session and the previous session's close, when looking at a chart's Regular Trading Hours (not to be confused with Electronic Trading Hours). This gap is an important element for Futures Market traders that follow the works of The Inner Circle Trader (ICT). To be more specific, the Opening Range Gap occurs between 4:15pm and 9:30am of the next day.
The Opening Range Gap can be viewed easily when switching the session type to "Regular trading hours".
The image above shows an example of an RTH Gap for Wednesday, June 12, 2024 in CME_MINI:ES1!
How To Use Opening Range Gap
The Opening Range Gap can be used like any other form of a gap by extending it into future price action and looking for it to be filled on the same day or the upcoming days.
Looking for 50% of the gap to be filled as an initial target is one of the methodologies taught by ICT. Additionally, the high and low of the gap (as well as the midpoint) can be used as points of dynamic support & resistance, even if the gap is already filled. Therefore, these gaps do not "expire", and they can be used as key price levels extended through to the end of the week.
Disclaimer
This indicator is mainly intended to work for Futures markets, and specifically the following Index Futures markets: E-mini S&P 500 Futures, E-mini NASDAQ-100 Futures, E-mini DOW Futures.
Given that, the indicator still supports various other markets/assets out-of-the-box, such as other types of Futures Markets, Stocks, Options, and more. The main difference will be that other markets may have RTH Gaps forming at different times, rather than the 4:15pm-9:30am gap that occurs in the Index Futures (Regular trading hours).
Indicator Purpose
While RTH Gaps can be labeled by hand, this indicator allows you to quickly plot multiple RTH Gaps and get a quick glimpse at potential gaps that you may have missed, which could end up being useful in your analysis.
This indicator is 100% custom-built, not using code from any other existing indicators that may plot Opening Range Gaps. The main purpose of this indicator was to overcome many shortcomings from other existing indicators, most notably the problem of displaying RTH Gaps while using ETH as the chart session.
Therefore, this indicator has many UNIQUE features, such as:
Ability to maintain accuracy of the closing/opening prices even when changing chart settings (e.g., toggling ETH/RTH sessions, toggling BACK-ADJUSTMENT on futures contracts, toggling SETTLEMENT prices, etc.).
Draw up to 25 previous Opening Range Gaps, even on ultra-low timeframes like the 1-minute or 1-second chart.
Automatically or manually choose which Opening Range Gaps to hide/show on the chart.
Highly customizable, including a different color scheme to easily distinguish between the Current and Previous RTH Gaps.
Modified price values to correctly display prices that use a format like 109'32 (e.g., Bond Futures or Wheat Futures).
Helpful tooltips to provide more detailed information about the RTH Gaps or about the current Input Settings.
Error Messages
There are some conditions which can cause the script to fail and display an error message (by clicking the red exclamation mark next to the indicator.)
Error messages:
Use a Standard Chart Type : this will occur when using a non-standard chart such as Heikin Ashi, Renko, Point & Figure, etc.
Use a Daily or Lower Timeframe : this error will appear when using a higher timeframe chart like weekly or monthly, because it can clutter the chart since RTH Gaps can form every day.
RTH Gap was not detected : this means that no RTH gap was found, which will occur on markets that don't have the option to toggle between ETH and RTH sessions (e.g., Forex or Crypto).
Exceeded the maximum lookback for Bar Replay mode : when using bar replay mode; this can depend on the amount of historical bars available in different account subscription types.
Unable to Activate Bar Replay mode : if the indicator could not be used in Bar Replay mode.
Restart Bar Replay : if the indicator works in Bar Replay but it detected an error that would cause RTH Gaps to be plotted incorrectly.
This is an example of what a script error would look like.
Indicator Settings
Most settings are self-explanatory or have a tooltip with information on what the setting does, but this section will only briefly cover the available settings.
Extend to End of Day : This setting is enabled by default. It will extend each RTH Gap only up to the end of its day (specifically, to the RTH close of the day). The option can be toggled OFF to automatically extend all RTH Gaps to the right-most candle on the chart.
Previous RTH Gaps : Between 1 and 25 previous RTH Gaps can be displayed. The checkbox can be toggled to quickly hide all previous RTH Gaps (but the same effect would be reached by setting the value to 0).
Hide Current RTH Gap : The Current RTH Gap (most recent one), can be optionally hidden from being plotted.
Beginning Anchor Point : Choose the beginning anchor point for all RTH Gaps. The default is "RTH Close", which means that each gap will be drawn on the chart starting from their previous session's RTH close @ 4:15pm. But it will be a more transparent version of the actual gap; this ghost-like image will extend from 4:15pm all the way up to 9:30am where the gap will then be drawn normally from 9:30am onwards. The other option for this setting is "RTH Open" which means that the gap will be drawn starting from the actual 9:30am opening.
Current RTH Gap Style
These settings are used to customize the visual style of the most recent RTH Gap (also known as the "Current" RTH Gap). Note: the exact same set of settings are available for the Previous RTH Gaps. The text label next to each gap can be optionally hidden to clean the chart a little.
Price Table
These are settings to customize the appearance of the Price Table on the right, including the ability to hide it completely. Note: to actually use the color configurations, you must select "Custom Style" in one of the dropdowns, otherwise it will use "Default Style" which means that the Price Table is automatically styled based on the colors chosen in the Current RTH Gap Style and Previous RTH Gap Style settings.
Overlap Handling
One of 7 available overlap handling options can be used to filter which RTH Gaps are plotted on the chart. By default, the "None" option will be selected, meaning that all valid RTH Gaps are plotted on the chart.
Formatting
Date Format : select the format of the date that is shown next to each RTH Gaps.
Timezone : choose the timezone for the RTH Gap closing/opening date-times that are displayed (only in tooltips when you hover over an RTH Gap label).
RTH Gap Label : choose the details to display next to each gap (e.g., date, or gap number, or both).
Price Format : only two options: Auto/Decimal. "Auto" uses custom processing to allow displaying values such as 109'32 for Bond futures.
Tooltips
The indicator provides additional details about an RTH Gap when you hover over a row in the Price Table.
Note: the same information can be found by hovering over the Text Label that is to the right of each RTH Gap (even when the Text Label is disabled via the Settings).
Overlap Handling
The tooltip next to "Select a Strategy" in the options will provide details on each overlap handling strategy. Additionally, when a strategy is selected, a new row in the Price Table will appear; hovering over that will show details about the currently selected strategy, as well as any suggestions in case the inputs were invalid. When a strategy hides an RTH Gap, the number in the Price Table will be replaced with an "Eye" icon, indicating that it is not currently plotted on the chart.
Available strategies are:
Option 1 (Gradients) : select the percentage opacity to shade RTH Gaps in. The more recent RTH Gaps will be closer to the maximum opacity defined, while the older RTH Gaps will appear more transparent, closer to the minimum opacity defined. Note: only affects previous RTH Gaps, not the current RTH Gap.
Option 2 (Day Extension) : select the number of days to extend each RTH Gap up to. Note: this will override the "Extend to End of Day" setting, regardless whether it is toggled ON or OFF.
Option 3 (Nested Gaps) : hides nested gaps, i.e., RTH Gaps that are enclosed within another RTH Gap. Note: this option is only available when the "Extend to End of Day" setting is disabled .
Option 4 (Intersecting Gaps) : hides intersecting/overlapping gaps, i.e., RTH Gaps that overlap one another (this may also include, but is not limited to, nested gaps). The drop-down next to this option allows choosing the priority of which RTH Gaps to hide first. Note: this option is only available when the "Extend to End of Day" setting is disabled .
Option 5 (Gap Width) : the chart will only show RTH Gaps that have a width/size between the defined parameters.
Option 6 (Close Proximity) : the chart will only show the RTH Gaps that are within a certain range from the market price. This can be useful when plotting multiple RTH Gaps while using auto-scaling on the chart. By only showing nearby RTH Gaps, it will prevent the auto-scaling from having to compress the candles to fit the far-away RTH Gaps onto the screen.
Option 7 (CSV) : this option is used if none of the others suit you well; it allows specifically choosing which RTH Gaps to hide or show on the chart.
This is an example that chooses the Overlap Handling Strategy Option 6. Note that in this example, the tooltip in the price table shows a warning that the Input Number should be increased to plot some RTH Gaps on the chart.
Tips
Chart settings can be toggled to "Scale price chart only" to prevent the auto-scaling of TradingView from compressing the chart if there are RTH Gaps that are far away from the current market action.
If you change a lot of indicator settings such as RTH Gap color schemes, you can save the settings as the Default to prevent your settings from resetting the next time you use the indicator.
RTH
Opening Range Gap + Std Dev [starclique]The ICT Opening Range Gap is a concept taught by Inner Circle Trader and is discussed in the videos: 'One Trading Setup For Life' and 2023 ICT Mentorship - Opening Range Gap Repricing Macro
ORGs, or Opening Range Gaps, are gaps that form only on the Regular Trading Hours chart.
The Regular Trading Hours gap occurs between 16:15 PM - 9:29 AM EST (UTC-4)
These times are considered overnight trading, so it is useful to filter the PA (price action) formed there.
The RTH option is only available for futures contracts and continuous futures from CME Group.
To change your chart to RTH, first things first, make sure you’re looking at a futures contract for an asset class, then on the bottom right of your chart, you’ll see ETH (by default) - Click on that, and change it to RTH.
Now your charts are filtering the price action that happened overnight.
To draw out your gap, use the Close of the 4:14 PM candle and the open of the 9:30 AM candle.
How is this concept useful?
Well, It can be used in many ways.
---
How To Use The ORG
One of the ways you can use the opening range gap is simply as support and resistance
If we extend out the ORG from the example above, we can see that there is a clean retest of the opening range gap high after breaking structure to the upside and showing acceptance outside of the gap after consolidating within it.
The ORG High (4:14 Candle Close in this case) was used as support.
We then see an expansion to the upside.
Another way to implement the ORG is by using it as a draw on liquidity (magnet for price)
In this example, if we looked to the left, there was a huge ORG to the downside, leaving a massive gap.
The market will want to rebalance that gap during the regular trading hours.
The market rallies higher, rejects, comes down to clear the current days ORG low, then closes.
That is one example of how you can combine liquidity & ICT market structure concepts with Opening Range Gaps to create a story in the charts.
Now let’s discuss standard deviations.
---
Standard Deviations
Standard Deviations are essentially projection levels for ranges / POIs (Point of Interests)
By this I mean, if you have a range, and you would like to see where it could potentially expand to, you’d place your fibonacci retracement tool on and high and low of the range, then use extension levels to find specific price points where price might reject from.
Since 0 and 1 are your Range High and Low respectively, your projection levels would be something like 1.5, 2, 2.5, and 3, for the extension from your 1 Fib Level, and -0.5, -1, -1.5, and -2 for your 0 Fib level.
The -1 and 2 level produce a 1:1 projection of your range low and high, meaning, if you expect price to expand as much as it did from the range low to range high, then you can project a -1 and 2 on your Fib, and it would show you what ICT calls “symmetrical price”
Now, how are standard deviations relevant here?
Well, if you’ve been paying attention to ICT’s recent videos, you would’ve caught that he’s recently started using Standard Deviation levels on breakers.
So my brain got going while watching his video on ORGs, and I decided to place the fib on the ORG high and low and see what it’d produce.
The results were very interesting.
Using this same example, if we place our fib on the ORG High and Low, and add some projection levels, we can see that we rejected right at the -2 Standard Deviation Level.
---
You can see that I also marked out the EQ (Equilibrium, 50%, 0.5 of Fib) of the ORG. This is because we can use this level as a take profit level if we’re using an old ORG as our draw.
In days like these, where the gap formed was within a consolidation, and it continued to consolidate within the ORG zone that we extended, we can use the EQ in the same way we’d use an EQ for a range.
If it’s showing acceptance above the EQ, we are bullish, and expect the high of the ORG to be tapped, and vice versa.
---
Using The Indicator
Here’s where our indicator comes in play.
To avoid having to do all this work of zooming in and marking out the close and open of the respective ORG candles, we created the Opening Range Gap + Standard Deviations Indicator, with the help of our dedicated Star Clique coder, a1tmaniac.
With the ORG + STD DEV indicator, you will be able to view ORG’s and their projections on the ETH (Electronic Trading Hours) chart.
---
Features
Range Box
- Change the color of your Opening Range Gap to your liking
- Enable or disable the box from appearing using the checkbox
Range Midline
- Change the color of your Opening Range Gap Equilibrium
- Enable or disable the midline from appearing using the checkbox
Std. Dev
- Add whichever standard deviation levels you’d like.
- By default, the indicator comes with 0.5, 1, 1.5, and 2 standard deviation levels.
- Ensure that you add a comma ( , ) in between each standard deviation level
- Enable or disable the standard deviations from appearing using the opacity of the color (change to 0%)
Labels / Offset
- Adjust the offset of the label for the Standard Deviations
- Enable or disable the Labels from appearing using the checkbox
Time
- Adjust the time used for the indicators range
- If you’d like to use this for a Session or ICT Killzone instead, adjust the time
- Adjust the timezone used for the time referenced
- Options are UTC, US (UTC-4, New York Local Time) or UK (UTC+1, London Time)
- By default, the indicator is set to US
30 Second Futures Session Open RangeThis indicator displays 30 second opening ranges from Globex, Europe, and RTH sessions.
From the RTH session range, it also displays infinitely generating Price Targets based on a % of the opening range size.
I am retrieving the 30 second data using the new "request.security_lower_tf()" function.
The importance of these levels is based on the idea that when the market opens, algorithms establish their positions within the first 30 seconds.
These areas can also be seen as potential areas of support and resistance throughout the sessions.
Enjoy!
Regular vs Electronic Trading hours Gap (RTH vs ETH); 4pm-9:30am-Shows the gap between 4pm close and 9:30am open; the Regular trading hours Vs Electronic trading hours Gap (RTH vs ETH).
-Displays this as a box starting at 9:30am, whose bottom is the 9:30am open; top is previous day's 4pm close.
-Displays when chart is toggled to either of ETH or RTH.
-Useful reminder of area above/below opening bell price that price often has a tendency to want to fill in, partially or fully
--(all times here refer to America/New_York timezone)
//Options:
~Number of past boxes to show
~Extend boxes fully to the right
~Box background color, border color, and opacities
//Limitations:
-works only on timeframes 30mins or lower (works on 1,2,5,10,15,30minutes)
-will not work on non-typical low timeframes (like 4min or 7min) since they are not divisible into 30
RTH Levels Initial Balance Overnight 12-1 Opening types (IB)(ON)Made for ES/NQ.
CME_MINI:ES1!
CME_MINI:NQ1!
But it will most likely work for all USA futures. Default clock settings are set according to CST.
This Indicator automatically draws RTH levels, yesterday’s RTH levels, initial balance, overnight and 12-1 (lunch) levels.
In additionally, at RTH open, it shows opening type.
Also shows/alert works for 12-1 stat.
You may need to change the clock range settings for stocks.
Definitions of opening types.
If price opens the day above the previous day session high, it is considered Higher Outside Range. (HOR)
If price opens the day between the previous close and the previous high, it is considered Higher Inside Range. (HIR)
If price opens between the previous close and previous low, it is Lower Inside Range. (LIR)
If price opens below previous day session low, it is Lower Outside Range. (LOR)
Acronyms:
RTH : Regular Trading Hours
ON : Overnight
IBH : Initial Balance High
IBL : Initial Balance Low
IBMid: Initial Balance Mid
ONH : Overnight High
ONL : Overnight Low
ONMid : Overnight Session Midpoint Price
yRthO : Yesterday's rth open
yRthH : Yesterday's rth high
yRthL : Yesterday's rth low
yRthC : Yesterday's rth close
yRthMid : Yesterday's rth mid
12-1 : Lunch time for Chicago (12pm to 1pm) (CST)
rthmid (for rth session) : (high + low) / 2
rth vwap and midMidpoint and VWAP are often important inflection points in daytrading. I managed to find a script providing me with a 24 hour session midline by NorthStarDayTrading and a RTH VWAP script by LDBC. So I decided to merge those two to get a RTH mid and vwap.
Real Trading Hours - Vertical Lines - Mark RTH for Futures 12/Jan/2021 09:15 AM AUTHOR: Brandon Gum
--
Updated script to plot vertical lines for open and close of futures.
Not sure why the 8:30 and 15:00 times had to be used over 9:30 or 16:00
Only plots for products of type futures. - Could be easily expanded to work with cryptos as well if you wanted.
======================