PROTECTED SOURCE SCRIPT
neeson CME Gaps Complete

CME Gap Detection & Trading Signals Indicator
Originality & Unique Features
This indicator represents a sophisticated approach to CME gap analysis by combining multiple innovative features not found in standard gap indicators:
Dual Visualization System:
Traditional gap boxes that precisely mark the price void between Friday's close and Monday's open
Intelligent bar coloring that instantly identifies gap days through color differentiation
Comprehensive Time Analysis:
Tracks gaps for up to 4 years, providing unprecedented historical context
Maintains gap memory even through chart reloads and timeframe changes
Advanced Signal Generation:
Real-time gap fill detection with customizable threshold levels
Integrated alert system for both new gap formations and gap fill completions
Functionality & Implementation
Core Detection Mechanism
The indicator automatically identifies CME weekend gaps by comparing Friday's closing price with Monday's opening price. When a significant price discontinuity is detected (configurable threshold), it triggers the visualization and tracking system.
Visual Components:
Gap Boxes: Semi-transparent colored rectangles (green for bullish gaps, red for bearish gaps) that precisely cover the price gap area between Friday's close and Monday's open
Extension Lines: Projection lines that extend from gap boundaries into future price action, helping traders visualize potential support/resistance levels
Bar Coloring: Automatic color coding where gap bars are highlighted (green/red) while normal trading bars appear gray, creating immediate visual distinction
Signal Generation:
Buy Signals: Triggered when bearish gaps are filled (price moves upward through the gap zone)
Sell Signals: Activated when bullish gaps are filled (price moves downward through the gap zone)
Smart Thresholds: Configurable fill percentage (0.1%-5.0%) to avoid false signals from minor price fluctuations
Technical Implementation
The script employs sophisticated array management to track multiple gaps simultaneously while maintaining optimal performance. Each gap stores:
Price boundaries (top/bottom)
Gap type (bullish/bearish)
Detection timestamp
Volume data (for potential future analysis)
Fill status
The automatic cleanup system removes gaps older than the configured maximum age (1-10 years) to prevent memory overload while preserving relevant historical context.
Usage Instructions
Basic Operation
Apply to Chart: Add the indicator to any cryptocurrency or futures chart
Automatic Detection: The script automatically scans for Monday openings relative to Friday closes
Visual Analysis: Observe colored bars for gap days and corresponding gap boxes
Configuration Options
Gap Detection Settings:
Show CME Gaps: Enable/disable the entire detection system
Max Gap Age: Set how long to track gaps (1-10 years)
Only Weekend Gaps: Focus exclusively on CME weekend gaps
Visual Customization:
Bullish/Bearish Gap Colors: Customize gap box appearance
Extension Lines: Control projection line visibility and length
Bar Coloring: Toggle bar color differentiation
Trading Signals:
Show Trading Signals: Enable/disable buy/sell alerts
Gap Fill Threshold: Set sensitivity for gap fill detection
Enable Alerts: Activate platform notifications
Trading Strategy Integration
Gap Fill Strategy:
Monitor for gap fill completion signals
Enter positions in the direction of the fill (buy on bearish gap fills, sell on bullish gap fills)
Use extension lines as potential profit targets or stop-loss levels
Support/Resistance Identification:
Historical gaps often act as future support/resistance
Use the 4-year gap memory to identify key price levels
Combine with other technical analysis tools for confirmation
Core Calculation Philosophy
Market Psychology Foundation
The indicator operates on the well-established market principle that "gaps tend to fill." This phenomenon stems from:
Market Memory: Traders remember significant price discontinuities and often trade to close them
Liquidity Gaps: Gaps represent areas of low liquidity that markets naturally seek to revisit
Psychological Levels: Round numbers and significant price levels often coincide with gap boundaries
Statistical Edge
By systematically tracking gaps across extended timeframes (up to 4 years), the indicator provides:
Probability Assessment: Historical gap fill rates help assess current gap fill probabilities
Risk Management: Clear visual boundaries for stop-loss placement and position sizing
Time Analysis: Understanding how quickly different types of gaps tend to fill
Adaptive Detection
The algorithm incorporates:
Dynamic Thresholds: Configurable sensitivity to ignore insignificant gaps
Multi-Timeframe Awareness: Consistent performance across different chart timeframes
Market Condition Adaptation: Automatic adjustment to varying volatility environments
This comprehensive approach transforms simple gap detection into a sophisticated trading tool that combines visual clarity, historical context, and actionable signals for improved trading decisions.
Originality & Unique Features
This indicator represents a sophisticated approach to CME gap analysis by combining multiple innovative features not found in standard gap indicators:
Dual Visualization System:
Traditional gap boxes that precisely mark the price void between Friday's close and Monday's open
Intelligent bar coloring that instantly identifies gap days through color differentiation
Comprehensive Time Analysis:
Tracks gaps for up to 4 years, providing unprecedented historical context
Maintains gap memory even through chart reloads and timeframe changes
Advanced Signal Generation:
Real-time gap fill detection with customizable threshold levels
Integrated alert system for both new gap formations and gap fill completions
Functionality & Implementation
Core Detection Mechanism
The indicator automatically identifies CME weekend gaps by comparing Friday's closing price with Monday's opening price. When a significant price discontinuity is detected (configurable threshold), it triggers the visualization and tracking system.
Visual Components:
Gap Boxes: Semi-transparent colored rectangles (green for bullish gaps, red for bearish gaps) that precisely cover the price gap area between Friday's close and Monday's open
Extension Lines: Projection lines that extend from gap boundaries into future price action, helping traders visualize potential support/resistance levels
Bar Coloring: Automatic color coding where gap bars are highlighted (green/red) while normal trading bars appear gray, creating immediate visual distinction
Signal Generation:
Buy Signals: Triggered when bearish gaps are filled (price moves upward through the gap zone)
Sell Signals: Activated when bullish gaps are filled (price moves downward through the gap zone)
Smart Thresholds: Configurable fill percentage (0.1%-5.0%) to avoid false signals from minor price fluctuations
Technical Implementation
The script employs sophisticated array management to track multiple gaps simultaneously while maintaining optimal performance. Each gap stores:
Price boundaries (top/bottom)
Gap type (bullish/bearish)
Detection timestamp
Volume data (for potential future analysis)
Fill status
The automatic cleanup system removes gaps older than the configured maximum age (1-10 years) to prevent memory overload while preserving relevant historical context.
Usage Instructions
Basic Operation
Apply to Chart: Add the indicator to any cryptocurrency or futures chart
Automatic Detection: The script automatically scans for Monday openings relative to Friday closes
Visual Analysis: Observe colored bars for gap days and corresponding gap boxes
Configuration Options
Gap Detection Settings:
Show CME Gaps: Enable/disable the entire detection system
Max Gap Age: Set how long to track gaps (1-10 years)
Only Weekend Gaps: Focus exclusively on CME weekend gaps
Visual Customization:
Bullish/Bearish Gap Colors: Customize gap box appearance
Extension Lines: Control projection line visibility and length
Bar Coloring: Toggle bar color differentiation
Trading Signals:
Show Trading Signals: Enable/disable buy/sell alerts
Gap Fill Threshold: Set sensitivity for gap fill detection
Enable Alerts: Activate platform notifications
Trading Strategy Integration
Gap Fill Strategy:
Monitor for gap fill completion signals
Enter positions in the direction of the fill (buy on bearish gap fills, sell on bullish gap fills)
Use extension lines as potential profit targets or stop-loss levels
Support/Resistance Identification:
Historical gaps often act as future support/resistance
Use the 4-year gap memory to identify key price levels
Combine with other technical analysis tools for confirmation
Core Calculation Philosophy
Market Psychology Foundation
The indicator operates on the well-established market principle that "gaps tend to fill." This phenomenon stems from:
Market Memory: Traders remember significant price discontinuities and often trade to close them
Liquidity Gaps: Gaps represent areas of low liquidity that markets naturally seek to revisit
Psychological Levels: Round numbers and significant price levels often coincide with gap boundaries
Statistical Edge
By systematically tracking gaps across extended timeframes (up to 4 years), the indicator provides:
Probability Assessment: Historical gap fill rates help assess current gap fill probabilities
Risk Management: Clear visual boundaries for stop-loss placement and position sizing
Time Analysis: Understanding how quickly different types of gaps tend to fill
Adaptive Detection
The algorithm incorporates:
Dynamic Thresholds: Configurable sensitivity to ignore insignificant gaps
Multi-Timeframe Awareness: Consistent performance across different chart timeframes
Market Condition Adaptation: Automatic adjustment to varying volatility environments
This comprehensive approach transforms simple gap detection into a sophisticated trading tool that combines visual clarity, historical context, and actionable signals for improved trading decisions.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Protected script
This script is published as closed-source. However, you can use it freely and without any limitations – learn more here.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.