OPEN-SOURCE SCRIPT
Güncellendi berkusa Weekend and Daily virtual gap

The gap formed during weekends and weekdays on the CME exchange is virtually created because it does not occur on exchanges like Binance, which operate 24/7.
You need to use on crypto exchanges like Binance etc, which operate 24/7.
Weekend and Daily virtualgap Indicator and CME Gap UsageIndicator Overview
This Pine Script indicator visualizes weekend and daily trading sessions on the Bitcoin CME Futures chart, serving as a powerful tool for analyzing CME gaps. The Chicago Mercantile Exchange (CME) operates with limited trading hours (Sunday 18:00 to Friday 17:00, with a daily 1-hour break from 17:00 to 18:00, New York time), unlike the 24/7 spot Bitcoin market. This mismatch creates "gaps" on the CME chart during weekend closures, which this indicator helps identify and analyze alongside session ranges.Key Features Weekend Session (Friday 17:00 - Sunday 18:00): Starts at Friday 17:00 and ends at Sunday 18:00 (New York time).
Box extends to the next Friday 17:00 (yellow, customizable).
Session name and price range (e.g., "WEEKEND 2025-07-18\n(123.45)") displayed in the top-right corner (size.tiny).
Historical sessions: Default 3 weeks (weeksBack).
Midpoint line: Drawn at the session’s high-low midpoint, cyan (#00fffb).
Daily Session (17:00-18:00): Runs daily from 17:00 to 18:00 (New York time, excluding weekends).
Box extends to the next day’s 17:00 (blue, customizable).
Session name and price range in the top-right corner (size.tiny).
Historical sessions: Default 7 days (dailySessionsBack).
Midpoint line: Red (#FF0000).
Open Lines: Friday 17:00 or Sunday 18:00 Open Line: User selects “Friday” or “Sunday” (fridayOrSunday). Friday: Open price line extends to the next Friday 17:00.
Sunday: Open price line extends to the same day’s Sunday 18:00 (end of weekend session).
Line count: Default 2 (maxFridayLines), orange (fridayOpenColor).
Daily 18:00 Open Line: Daily 18:00 open price (excluding weekends), extends to the next day’s 18:00 (green, maxDailyLines=2).
Customization: Show/hide options: Weekend sessions (showWeekend), daily sessions (showDaily), open lines (showFridayOpenLines, showDailyOpenLines).
Color settings: Weekend box, daily box, midpoints, open lines.
Text settings: Session name (showSessionName) and range size (showRangeSize).
What Are CME Gaps and How to Use Them?
CME gaps occur when Bitcoin’s spot market moves during CME’s closed hours (Friday 17:00 to Sunday 18:00). For example, if CME closes at 50,000 USDT on Friday and opens at 52,000 USDT on Sunday, a gap forms between 50,000-52,000. Studies suggest that over 70% of these gaps are "filled" (price revisits the gap zone).
Usage in Trading: Support and Resistance: Gap zones often act as support or resistance levels. For instance, a gap between 50,000-52,000 may resist price at 52,000 or support at 50,000.
Entry/Exit Points: Traders can use gaps for entry or exit. Buy when price dips to the gap’s lower bound, or sell when it hits the upper bound.
Market Sentiment: Large gaps indicate sharp weekend sentiment shifts, useful for gauging market direction.
Risk Management: Use gap levels for stop-loss or take-profit points.
Application: Add this indicator to your TradingView chart.
Customize settings: Show/hide weekend or daily sessions.
Choose “Friday” or “Sunday” for open lines.
Adjust colors and historical session counts.
To analyze CME gaps: Use weekend session boxes (Friday 17:00 - Sunday 18:00) to visualize gap zones.
Use Friday 17:00 or Sunday 18:00 open lines to mark gap start or end points.
Monitor price revisiting gap zones, confirming with other indicators (RSI, moving averages).
Notes: Best used on CME Bitcoin Futures (BTC1!) charts.
Not all gaps fill immediately; some may persist for weeks or months.
Questions? Drop a comment, and I’ll help promptly!
You need to use on crypto exchanges like Binance etc, which operate 24/7.
Weekend and Daily virtualgap Indicator and CME Gap UsageIndicator Overview
This Pine Script indicator visualizes weekend and daily trading sessions on the Bitcoin CME Futures chart, serving as a powerful tool for analyzing CME gaps. The Chicago Mercantile Exchange (CME) operates with limited trading hours (Sunday 18:00 to Friday 17:00, with a daily 1-hour break from 17:00 to 18:00, New York time), unlike the 24/7 spot Bitcoin market. This mismatch creates "gaps" on the CME chart during weekend closures, which this indicator helps identify and analyze alongside session ranges.Key Features Weekend Session (Friday 17:00 - Sunday 18:00): Starts at Friday 17:00 and ends at Sunday 18:00 (New York time).
Box extends to the next Friday 17:00 (yellow, customizable).
Session name and price range (e.g., "WEEKEND 2025-07-18\n(123.45)") displayed in the top-right corner (size.tiny).
Historical sessions: Default 3 weeks (weeksBack).
Midpoint line: Drawn at the session’s high-low midpoint, cyan (#00fffb).
Daily Session (17:00-18:00): Runs daily from 17:00 to 18:00 (New York time, excluding weekends).
Box extends to the next day’s 17:00 (blue, customizable).
Session name and price range in the top-right corner (size.tiny).
Historical sessions: Default 7 days (dailySessionsBack).
Midpoint line: Red (#FF0000).
Open Lines: Friday 17:00 or Sunday 18:00 Open Line: User selects “Friday” or “Sunday” (fridayOrSunday). Friday: Open price line extends to the next Friday 17:00.
Sunday: Open price line extends to the same day’s Sunday 18:00 (end of weekend session).
Line count: Default 2 (maxFridayLines), orange (fridayOpenColor).
Daily 18:00 Open Line: Daily 18:00 open price (excluding weekends), extends to the next day’s 18:00 (green, maxDailyLines=2).
Customization: Show/hide options: Weekend sessions (showWeekend), daily sessions (showDaily), open lines (showFridayOpenLines, showDailyOpenLines).
Color settings: Weekend box, daily box, midpoints, open lines.
Text settings: Session name (showSessionName) and range size (showRangeSize).
What Are CME Gaps and How to Use Them?
CME gaps occur when Bitcoin’s spot market moves during CME’s closed hours (Friday 17:00 to Sunday 18:00). For example, if CME closes at 50,000 USDT on Friday and opens at 52,000 USDT on Sunday, a gap forms between 50,000-52,000. Studies suggest that over 70% of these gaps are "filled" (price revisits the gap zone).
Usage in Trading: Support and Resistance: Gap zones often act as support or resistance levels. For instance, a gap between 50,000-52,000 may resist price at 52,000 or support at 50,000.
Entry/Exit Points: Traders can use gaps for entry or exit. Buy when price dips to the gap’s lower bound, or sell when it hits the upper bound.
Market Sentiment: Large gaps indicate sharp weekend sentiment shifts, useful for gauging market direction.
Risk Management: Use gap levels for stop-loss or take-profit points.
Application: Add this indicator to your TradingView chart.
Customize settings: Show/hide weekend or daily sessions.
Choose “Friday” or “Sunday” for open lines.
Adjust colors and historical session counts.
To analyze CME gaps: Use weekend session boxes (Friday 17:00 - Sunday 18:00) to visualize gap zones.
Use Friday 17:00 or Sunday 18:00 open lines to mark gap start or end points.
Monitor price revisiting gap zones, confirming with other indicators (RSI, moving averages).
Notes: Best used on CME Bitcoin Futures (BTC1!) charts.
Not all gaps fill immediately; some may persist for weeks or months.
Questions? Drop a comment, and I’ll help promptly!
Sürüm Notları
added sunday gap tooAçık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.