OPEN-SOURCE SCRIPT
Gap Level Plotter (4H)

# Gap Level Plotter (4H) - User Guide
## Overview
This indicator automatically detects and plots 4-hour gap zones on any chart timeframe. Gaps are price discontinuities where one 4H candle's low is above the previous 4H candle's high (gap up) or where one 4H candle's high is below the previous 4H candle's low (gap down). These levels often act as key support/resistance zones.
## Key Features
- **Works on any timeframe**: View 4-hour gaps on 1-minute, 5-minute, 15-minute, daily charts, etc.
- **Visual gap zones**: Displays translucent purple zones (customizable) that extend into the future
- **Configurable lookback**: Choose how many days of history to scan (30, 45, 60, or 90 days)
- **Gap filtering**: Filter out noise by setting minimum gap sizes in points or percentage
- **Clean and simple**: Gaps remain plotted even after being filled, providing historical context
## Settings
### Lookback Days (Default: 45)
Controls how far back in time to search for gaps.
- **Options**: 30, 45, 60, 90 days
- **Use case**: Increase for long-term analysis, decrease for short-term trading
### Zone Color (Default: Purple)
Customize the color of gap zones to match your chart theme or personal preference.
### Filter Method (Default: Points)
Choose how to filter out small/insignificant gaps:
- **None**: Show all gaps regardless of size
- **Points**: Filter by absolute price points (recommended for futures like NQ/ES)
- **Percentage**: Filter by percentage of price (recommended for stocks)
### Minimum Gap Size (Default: 5.0)
The threshold for filtering gaps based on your selected filter method.
**Recommended settings:**
- **NQ futures**: 5-10 points
- **ES futures**: 2-5 points
- **Stocks (percentage)**: 0.25-0.5%
Adjust based on the instrument's volatility and your trading style.
## Best Practices
1. **For futures (NQ/ES)**: Use "Points" filter with 5-10 point minimum
2. **For stocks**: Use "Percentage" filter with 0.25-0.5% minimum
3. **Clean charts**: If too many gaps clutter your view, increase the minimum gap size or reduce lookback days
4. **Multiple timeframes**: The same gaps appear on all chart timeframes - use this to identify key levels across your analysis
## How to Use
1. Add the indicator to your chart
2. Adjust settings based on your instrument and preferences
3. Gap zones automatically update as new 4H candles form
4. Use zones as potential support/resistance levels for entries, exits, or targets
## Notes
- Gaps are plotted when detected and remain visible even after being filled
- The indicator focuses on 4-hour timeframe gaps specifically, as these tend to be significant levels for intraday and swing trading
- Purple zones extend infinitely to the right to show where price might return to fill or test the gap
---
**Enjoy trading with cleaner gap visualization! 📊**
## Overview
This indicator automatically detects and plots 4-hour gap zones on any chart timeframe. Gaps are price discontinuities where one 4H candle's low is above the previous 4H candle's high (gap up) or where one 4H candle's high is below the previous 4H candle's low (gap down). These levels often act as key support/resistance zones.
## Key Features
- **Works on any timeframe**: View 4-hour gaps on 1-minute, 5-minute, 15-minute, daily charts, etc.
- **Visual gap zones**: Displays translucent purple zones (customizable) that extend into the future
- **Configurable lookback**: Choose how many days of history to scan (30, 45, 60, or 90 days)
- **Gap filtering**: Filter out noise by setting minimum gap sizes in points or percentage
- **Clean and simple**: Gaps remain plotted even after being filled, providing historical context
## Settings
### Lookback Days (Default: 45)
Controls how far back in time to search for gaps.
- **Options**: 30, 45, 60, 90 days
- **Use case**: Increase for long-term analysis, decrease for short-term trading
### Zone Color (Default: Purple)
Customize the color of gap zones to match your chart theme or personal preference.
### Filter Method (Default: Points)
Choose how to filter out small/insignificant gaps:
- **None**: Show all gaps regardless of size
- **Points**: Filter by absolute price points (recommended for futures like NQ/ES)
- **Percentage**: Filter by percentage of price (recommended for stocks)
### Minimum Gap Size (Default: 5.0)
The threshold for filtering gaps based on your selected filter method.
**Recommended settings:**
- **NQ futures**: 5-10 points
- **ES futures**: 2-5 points
- **Stocks (percentage)**: 0.25-0.5%
Adjust based on the instrument's volatility and your trading style.
## Best Practices
1. **For futures (NQ/ES)**: Use "Points" filter with 5-10 point minimum
2. **For stocks**: Use "Percentage" filter with 0.25-0.5% minimum
3. **Clean charts**: If too many gaps clutter your view, increase the minimum gap size or reduce lookback days
4. **Multiple timeframes**: The same gaps appear on all chart timeframes - use this to identify key levels across your analysis
## How to Use
1. Add the indicator to your chart
2. Adjust settings based on your instrument and preferences
3. Gap zones automatically update as new 4H candles form
4. Use zones as potential support/resistance levels for entries, exits, or targets
## Notes
- Gaps are plotted when detected and remain visible even after being filled
- The indicator focuses on 4-hour timeframe gaps specifically, as these tend to be significant levels for intraday and swing trading
- Purple zones extend infinitely to the right to show where price might return to fill or test the gap
---
**Enjoy trading with cleaner gap visualization! 📊**
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。