OPEN-SOURCE SCRIPT
Cập nhật

Bitcoin CME gaps multi-timeframe auto finder

1 207
1. Overview

The Bitcoin CME Gap Multi-Timeframe Detector automatically identifies price gaps in the Bitcoin CME (Chicago Mercantile Exchange) futures market and visually displays them on the TradingView chart.

Because the CME futures market closes for about an hour after each weekday session and remains closed over the weekend, price gaps frequently appear when trading resumes on Monday.

This indicator analyzes gaps across six major timeframes, from 5-minute to 1-day charts, allowing traders to easily identify structural imbalances and potential support/resistance zones.

It is the most accurate and feature-rich CME gaps indicator available on TradingView.



2. Key Features

■ Multi-Timeframe Gap Detection
  • Analyzes 5m, 15m, 30m, 1h, 4h, and 1D charts simultaneously.
  • This enables traders to observe both short-term volatility and mid-to-long-term structure, providing a multi-dimensional view of market dynamics.


■ Gap Direction Classification
  • Up Gap: When the next candle’s open is higher than the previous candle’s high (default color: green tone)
  • Down Gap: When the next candle’s open is lower than the previous candle’s low (default color: red tone)
  • Gaps are color-coded to intuitively visualize potential support and resistance zones.


■ Highlight Function
  • Gaps exceeding a user-defined threshold (%) are highlighted (default color: yellow).
  • This helps quickly identify zones with abnormal volatility or sharp price dislocations.


■ Labels and Box Extension
  • Each gap displays a percentage label indicating its relative size and significance.
  • Gap zones are extended to the right as boxes, allowing traders to visually track when and how the gap gets filled over time.


■ Alert System
  • When a gap forms on the selected timeframe (or across all timeframes), a TradingView alert is triggered.
  • This enables real-time response to significant gap events.




3. Trading Strategies

■ Gap Fill Behavior
CME gaps statistically tend to get filled over time.
Gap boxes help distinguish between filled and unfilled gaps at a glance.
  • Up Gap: Price tends to decline to fill the previous high–next open zone.
  • Down Gap: Price often rises later to fill the previous low–next open zone.


■ Support & Resistance Levels
Gap zones frequently act as strong support or resistance.
When price retests a gap area, observing the reaction of buyers and sellers can provide valuable trading insights.
Overlapping gap boxes across multiple timeframes indicate high-confidence support/resistance zones.

■ Market Sentiment & Volatility Analysis
Large gaps usually result from shifts in market sentiment or major news events.
This indicator allows traders to detect volatility spikes early and prepare for potential trend reversals.

■ Combination with Other Technical Tools
While fully functional on its own, this indicator works even better when combined with tools like moving averages (MA), RSI, MACD, or Fibonacci retracements.
For example, if the bottom of a gap coincides with the 0.618 Fibonacci level, it may signal a strong rebound zone.



4. Settings Options

Minimum Gap % | Sets the minimum percentage movement required to detect a gap (lower values show smaller gaps)
Display Timeframes | Choose which timeframes to display (5m, 15m, 30m, 1h, 4h, 1D)
Box Colors | Assign colors for up and down gaps
Box Extension (Bars) | Number of bars to extend gap boxes to the right
Show Labels | Toggle display of gap percentage labels
Label Position / Size | Adjust label position and size
Highlight Gap ≥ % | Highlight gaps exceeding a specified percentage
Highlight Colors | Set highlight color for labels and boxes
Enable Alerts | Enable or disable alerts
Alert Timeframe | Select timeframe(s) for alerts (“All” = all timeframes)



5. Summary

This indicator is a professional trading tool that provides quantitative and visual analysis of price gaps in the Bitcoin CME futures market.
By combining multi-timeframe detection, highlighting, and alert systems, it helps traders clearly identify zones of market imbalance and potential reversal areas.
Phát hành các Ghi chú
2025-10-30
Updated so that CME gaps are now displayed not only on the Bitcoin CME exchange symbol BTC1!, but also on other exchange charts such as BTCUSDT or BTCUSDT.P.
Phát hành các Ghi chú
2025-10-31
Added input option to adjust the line thickness of the CME gap highlight boxes.
Phát hành các Ghi chú
New Core Feature: Adjusting Gap Prices to Your Chart with the "Chart_price" Option!

Previously, the CME gap boxes were displayed based solely on the CME exchange's prices. However, Bitcoin is traded on various exchanges, and prices can differ slightly between them. Notably, CME Bitcoin futures prices often have a premium or discount compared to spot prices.
That's why this update introduces a new setting: under the "Select Exchanges to Display gap price" option, you now have the choice of "Chart_price".

"CME_price" (Original Method): If you select this option, the gap box prices will be based strictly on the actual CME exchange prices. Even if you're viewing a chart from a different exchange (e.g., Binance, Upbit, etc.), the top and bottom prices of the gap box will reflect the raw CME prices.

"Chart_price" (New Method - Recommended!): This is where the magic happens!
The indicator automatically calculates the price difference (premium/discount) between the chart you are currently viewing and the CME exchange price.
This price difference is then applied to adjust the prices of the CME gap boxes.
As a result, the gap boxes will be displayed at a price level that is adjusted to match the prices on your current chart.

Why is the "Chart_price" option beneficial?

For example, imagine you are viewing a Binance chart, and a CME gap occurs:
Using "CME_price", the gap box would be displayed based on CME prices, which might appear at a slightly different price level than your Binance chart. (e.g., the top of the gap might appear slightly higher or lower than the corresponding price on your Binance chart).

Using "Chart_price", the indicator compensates for the price difference between Binance and CME, making the gap box appear as if it's naturally integrated within the price range of your Binance chart.

This allows you to much more intuitively understand how CME gaps might influence the actual price movements on the exchange chart you are using. Now, the prices on your chart and the positions of the gap boxes will align much better!

Thông báo miễn trừ trách nhiệm

Thông tin và ấn phẩm không có nghĩa là và không cấu thành, tài chính, đầu tư, kinh doanh, hoặc các loại lời khuyên hoặc khuyến nghị khác được cung cấp hoặc xác nhận bởi TradingView. Đọc thêm trong Điều khoản sử dụng.