PROTECTED SOURCE SCRIPT

Rapid Price Skip Gaps V2.0

47
Rapid Price Skip Gaps: Your Edge in Identifying Market Imbalances

The "Rapid Price Skip Gaps" indicator for TradingView is a powerful and intuitive tool designed to help traders quickly identify, visualize, and track significant price skip gaps on their charts. By highlighting these critical market imbalances and providing customizable alerts, it offers a unique perspective on potential areas of interest, support, and resistance.

What are Price Skip Gaps?
A price skip gap occurs when there is an un-traded range between two consecutive price bars. This signifies that price "skipped" over a certain level without any transactions occurring within that range.

  1. Bullish Skip Gap: The current bar's lowest price is higher than the previous bar's highest price. This indicates strong buying pressure that "skipped" a price range.
  2. Bearish Skip Gap: The current bar's highest price is lower than the previous bar's lowest price. This indicates strong selling pressure that "skipped" a price range.


Skip gaps often represent significant shifts in supply and demand, order imbalances, or rapid reactions to news events. Many trading strategies revolve around the idea of "gap fill," where price tends to retrace and fill these un-traded zones.

Core Functionality & How it Works
The "Rapid Price Skip Gaps" indicator continuously monitors price action to detect these imbalances:
1.Intelligent Gap Detection: The core of the indicator lies in its detectGap function. It meticulously compares the high and low of the current bar against the high and low of the previous bar.
  • For a Bullish Skip Gap: It confirms if current bar's low > previous bar's high. The gap size is then calculated as current low - previous high.
  • For a Bearish Skip Gap: It confirms if current bar's high < previous bar's low. The gap size is calculated as previous low - current high.

2.Dynamic Visual Representation: Once a skip gap is detected, the indicator brings it to life on your chart:
Colored Boxes: Skip gaps are automatically drawn as distinct rectangular boxes directly on the chart.
  • Bullish Skip Gaps: Filled with a customizable Bullish Gap Color (default: Green) with adjustable transparency.
  • Bearish Skip Gaps: Filled with a customizable Bearish Gap Color (default: Red) with adjustable transparency.

Gap Size Labels: A clear label is placed near each detected gap, showing its precise size (e.g., " Bull Gap"). Label size is also customizable for optimal readability.

Automatic Extension & Closure: The indicator intelligently tracks active gaps. If a gap remains unfilled, its box extends dynamically across subsequent bars, reminding you of its presence. When price enters the gap area (meaning the gap is "filled"), the corresponding box is automatically deleted, keeping your chart clean and relevant.

3.Configurable "Quiet Hours" Filter (User-Selected Timezone): A powerful feature for traders who focus on specific market sessions or wish to avoid noise during less active periods. The indicator includes a "Quiet Hours" filter, allowing you to define a specific time window (in a user-selected timezone) during which new skip gap signals will not be generated. This ensures that the indicator only highlights gaps that occur during your preferred trading hours, reducing false signals and improving focus.
  • How it's Programmed: This is achieved by using Pine Script's time() function to check if the current bar's time falls within the defined "quiet session" (defaulting to 12:00-21:00 UTC). New gap signals are only allowed if the current bar is outside this quiet session. The timezone for this quiet session is also a customizable input.


4.Customizable Vertical Line Timestamps (User-Selected Timezone): To further enhance your chart's context, the indicator provides the option to draw prominent vertical lines at specific, user-defined hours (in a user-selected timezone). These lines act as persistent "stamps" on your timeline, helping you visualize and remember key times, such as market open/close, news events, or session overlaps relevant to your strategy.
  • Functionality: You can toggle this feature on/off, select the exact hour, choose its style (Solid, Dashed, Dotted), pick its color, and adjust its width for clear visibility. You can configure up to three distinct vertical lines.
  • How it's Programmed: This is achieved by creating line drawing objects directly at the specified bar_index and extending them across the entire vertical range of the chart using precise Y-coordinate values, ensuring they are always visible regardless of zoom level. The indicator intelligently manages these lines, drawing them only once per specified hour and removing them if the feature is toggled off or the time condition is no longer met. Each line is also accompanied by an optional customizable text label for quick identification.


How This Indicator Can Help Your Trading
  1. Identify Support & Resistance: Unfilled skip gaps often act as strong dynamic support or resistance levels where price might react.
  2. Gauge Market Strength: Large skip gaps, especially on significant news, can indicate strong directional momentum.
  3. Gap Fill Strategies: Traders employing gap-fill strategies can use the visual boxes to pinpoint entry and exit points, targeting the closure of these gaps.
  4. Confirmation Tool: Use skip gaps as a confluence factor with your existing analysis, confirming breakouts or reversals.
  5. Session & Time Awareness: The quiet hours filter and vertical line timestamps help you stay aware of market sessions and specific times that might influence price behavior, tailored to your preferred timezone.
  6. Visual Clarity: The intuitive visual representation keeps your chart clean and quickly highlights critical information, allowing for faster decision-making.


Customizable Inputs:
  • Indicator Timezone (under "Time Settings"): Sets the primary timezone for time-related calculations within the indicator.
  • Bullish Gap Color: Choose the fill color for upward skip gaps.
  • Bearish Gap Color: Choose the fill color for downward skip gaps.
  • Gap Transparency: Adjust the opacity of the skip gap boxes (0-100).
  • Border Width: Set the thickness of the skip gap box borders.
  • Label Size: Select the size of the text labels for skip gap sizes ("Tiny," "Small," "Normal," "Large").
  • Timeframe: Optionally apply the skip gap detection to a different timeframe than your chart (e.g., detect Daily gaps on a 1-hour chart). Leave blank for current chart timeframe.
  • Quiet Session Start-End (under "Time Settings"): Define a time range (e.g., "1200-2100") in the specified Quiet Session Timezone where new skip gap signals will be suppressed.
  • Quiet Session Timezone (under "Time Settings"): Select the timezone for the Quiet Session Start-End input.
  • Vertical Timestamps (Group):

  • V1, V2, V3 (Toggles): Enable or disable each of the three customizable vertical lines.
  • Text (for V1, V2, V3): Customize the text label displayed on each vertical line (e.g., "Sydney open").
  • Time (for V1, V2, V3): Define the exact session time (e.g., "2100-2101" for 9 PM UTC) when each vertical line should appear. These sessions are interpreted in UTC.
  • Color (for V1, V2, V3): Set the color for each vertical line.
  • Style (for V1, V2, V3): Choose between "Solid," "Dashed," or "Dotted" for each vertical line.
  • Width (for V1, V2, V3): Adjust the thickness of each vertical line.


The "Rapid Price Skip Gaps" indicator is a versatile tool for any trader looking to incorporate gap analysis and precise time-based markers into their trading strategy. Add it to your chart today and gain a new perspective on market dynamics!

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。