Plot the most recent 20 gaps based on custom session info.
The session can be customized with a start time and an end time.
The previous open, high, low, close are only from the price during the session specified.
A gap line will stop printing the moment the gap is filled.
For CME futures, the session must be offset by one hour for Central time. I use the official cash close of 16:15 EST (yes, not 16:00) as this is the TRUE close when options go offline. Every day CME futures take a break between 16:15 - 16:30 EST for settlement, and then again from 17:00 - 18:00 EST.
To offset CME futures you must subtract an hour, the official NYSE hours for futures: 0830-1515, this translates to 9:30 AM EST - 4:15 PM EST.
Added final price label when a gap is filled for reference.
Added a "Gap Filled" alertcondition when any previous gap in the last 20 sessions is filled.
Gaps are only shown for the previous 20 sessions for performance reasons in pinescript.
版本注释
Added member features.
版本注释
Resolved the issue with 24x7 session on stocks where there is no extended sesssion.
Added additional icons to show the unfilled gaps.
Added label showing the unfilled or premarket close that must touch during the next session, or a gap will be generated.
Major improvements to gap calculations.
Option to use the "settlement close" instead of the last value prescribed by the session window. This is useful for stocks and future that have a separate settlement close reported by the exchange.
版本注释
Fixed issue with n/a values for the recent Pine 4.0 development updates.
版本注释
Major UI performance improvements.
Last 20 gaps stored in memory.
Options for coloring added using color palette.
New gaps are now distinguished from continuing unfilled gaps.
Fixed issue where the session window never closes (usually happened with stock symbols not using extended hours).
版本注释
Added timezone feature. Use the timezone to match the session window. For example, when using the cash session of the NYSE as 0930-1600, the correct timezone would be GMT-4. However, if your Trading View settings are set for GMT+0 for London time, then the session window should be set to 1430-2100. The timezone feature is used to specify the local time with respect to the session window.
版本注释
Updated American time zones to use daylight savings time where appropriate.