OPEN-SOURCE SCRIPT

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!
Candlestick analysisgapgapfillgapindicatorgapstatisticsgaptradingstatistics

오픈 소스 스크립트

진정한 TradingView 정신에 따라, 이 스크립트의 저자는 트레이더들이 이해하고 검증할 수 있도록 오픈 소스로 공개했습니다. 저자에게 박수를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 출판물에서 이 코드를 재사용하는 것은 하우스 룰에 의해 관리됩니다. 님은 즐겨찾기로 이 스크립트를 차트에서 쓸 수 있습니다.

차트에 이 스크립트를 사용하시겠습니까?


또한 다음에서도:

면책사항