Zeiierman

Gap Statistics (Zeiierman)

Overview
The Gap Statistics (Zeiierman) indicator is crafted to monitor, analyze, and visually present price gaps on a trading chart. Price gaps are areas on a chart where the price jumps up or down from the previous close to the next open, creating a "gap" in the normal price pattern. This script delivers an extensive range of statistics related to these gaps, encompassing their size, direction (whether bullish or bearish), frequency of getting filled, as well as the average number of bars it takes for a gap to be filled. The indicator also visually represents the gaps, making it easier for traders to spot and analyze them.



How It Works
  • Gap Identification: The script identifies gaps by comparing the open price of a bar to the close price of the previous bar. If there is a discrepancy between the two, it is recognized as a gap.
  • Gap Classification: Once a gap is identified, it is classified based on its size (as a percentage of the previous close price) and direction (bullish or bearish). The gap is then added to a specific category based on its size.
  • Gap Tracking: The script keeps track of all identified gaps using arrays and user-defined types, storing details like their size, direction, and whether they have been filled.
  • Gap Filling: The script continuously monitors the price to check if any previously identified gaps get filled. A gap is considered filled if the price moves back into the gap area.
  • Statistics and Alerts: The script calculates various statistics like the total number of gaps, the number of filled gaps, the average number of bars it takes for a gap to fill, and the percentage of gaps that get filled. It also generates alerts when a new gap is identified or an existing gap gets filled.

How to Use
Gaps are often classified into four main types:
  • Common Gaps: These are not associated with any major news and are likely to get filled quickly.
  • Breakaway Gaps: These occur at the end of a price pattern and signal the beginning of a new trend.
  • Runaway Gaps:Also known as continuation gaps, these occur in the middle of a trend and signal a surge in interest in the stock.
  • Exhaustion Gaps: These occur near the end of a price pattern and signal a final attempt to hit new highs or lows.


The Gap Statistics (Zeiierman) indicator enhances a trader's ability to use gaps in their trading strategy in several ways:

  1. Statistical Analysis: Traders get comprehensive statistics on gaps, such as their size, direction, and how often they get filled.
  2. Performance Tracking: The indicator tracks how many bars it typically takes for a gap to fill, providing traders with an average timeframe for gap closure.



Settings
  • Display Gaps: Choose to display "All Gaps," "Active Gaps," or "None."
  • Show Gap Size: Toggle on/off the display of the gap size.


-----------------
Disclaimer

The information contained in my Scripts/Indicators/Ideas/Algos/Systems does not constitute financial advice or a solicitation to buy or sell any securities of any type. I will not accept liability for any loss or damage, including without limitation any loss of profit, which may arise directly or indirectly from the use of or reliance on such information.

All investments involve risk, and the past performance of a security, industry, sector, market, financial product, trading strategy, backtest, or individual's trading does not guarantee future results or returns. Investors are fully responsible for any investment decisions they make. Such decisions should be based solely on an evaluation of their financial circumstances, investment objectives, risk tolerance, and liquidity needs.

My Scripts/Indicators/Ideas/Algos/Systems are only for educational purposes!

开源脚本

本着真正的TradingView精神,该脚本的作者将其开源发布,以便交易者可以理解和验证它。为作者喝彩!您可以免费使用它,但在出版物中重复使用此代码受网站规则的约束。 您可以收藏它以在图表上使用。

免责声明

这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。

想在图表上使用此脚本?