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提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。