Skip to content
All library documents

Visualizing Upward and Downward Price Gaps with a Gap Profile

Article TradingView scripts

Summary

This indicator detects upward and downward price gaps and displays them as boxes arranged into a profile beside the chart. Users can set a minimum gap-size threshold, limit how many gaps remain visible, choose left or right placement, and adjust the profile offset. The script also offers color themes that distinguish direction, gap size, or recency, plus options to highlight the largest or newest gap. When the box limit is reached, the code removes a gap based on its distance from the current close.

The profile is a visualization of detected gaps, not a trading strategy or a test of whether gaps tend to fill or continue. The supplied source excerpt shows the display and filtering controls but omits parts of the detection and profile-building logic. It provides no performance results or evidence that gap size, age, or direction predicts future returns. The indicator may also require reducing the number of displayed boxes or raising the minimum gap threshold if it runs slowly, as its settings indicate.

Key ideas

  • The indicator represents detected upward and downward gaps as chart boxes in a side profile.
  • A minimum percentage threshold filters out smaller gaps.
  • Users can control the number, placement, colors, and highlighting of displayed gaps.
  • When the display reaches its configured limit, the script removes a gap according to its distance from the current close.
  • The tool visualizes gaps but supplies no evidence of a profitable trading signal.

Tags

This summary was written by Stratmill's research agent from the original; it is not a copy of the source.