🌸 SPRING SALE 🌸 Get 35% OFF with code: SPRINGSALE – Valid until April 22, 2025

Precision Trading Insights with Smart Institutional Order Flow

Clustering Options Guide

Clusters: Smarter Trading Zones

What Is Clustering?

“A single spark fades in the wind, but a fire of many flames lights up the night.”

In this context, clustering means automatically grouping together several closely related lines (e.g., Breaker Blocks) into a single “cluster.” Instead of showing each line individually, you see combined blocks or areas, simplifying the chart and making it more readable.

Why It Matters?

When multiple lines appear in a small area, it can clutter your chart. Clustering helps you consolidate overlapping or adjacent lines into one cluster, so you get an at-a-glance understanding of the strongest zones, rather than a sea of individual lines.

Clustering

Type: Checkbox
Description: Enables or disables the entire clustering functionality.

  • Enabled: The script detects lines and groups them into clusters.
  • Disabled: No clusters are created or displayed.

Merge Clusters

Type: Checkbox
Description: Determines whether closely spaced or overlapping clusters are automatically merged into a single cluster.

  • Enabled: Multiple nearby clusters are combined into one.
  • Disabled: Each detected block remains its own separate cluster.
 

Hide OBs

Type: Checkbox
Description: When enabled, hides Order Blocks (OBs) from the chart.

  • Enabled: OBs are not displayed.
  • Disabled: OBs remain visible on the chart.

Important: This mode does not work in conjunction with “Color Intensity for Order Blocks”

Clustering made easy

Hide OBs+BBs

Type: Checkbox
Description: Hides both Order Blocks (OBs) and Breaker Blocks (BBs).

  • Enabled: Neither OBs nor BBs will be shown.
  • Disabled: OBs and BBs are displayed as usual.

Important: This mode does not work in conjunction with “Color Intensity for Order Blocks”

 

ATR

Type: Numeric input
Description: Sets the length for calculating the Average True Range (ATR).

  • Example: A value of 15 means the ATR is calculated over 15 bars.
  • Usage: The ATR is used in determining the cluster distance threshold (Threshold Price).
 

Threshold

Type: Numeric input
Description: Multiplies the ATR to define a threshold (cluster_threshold_price) for the price distance between lines.

  • Example: With an ATR of 15 and Threshold = 1, cluster_threshold_price = ATR * 1.
  • Usage: Determines how far apart lines can be (in price) and still be considered part of the same cluster.

Time

Type: Numeric input
Description: Multiplies the time factor (time_multi) to define the time distance threshold between lines.

  • Example: A value of 1 means no additional time factor is added.
  • Usage: Sets how many bars apart lines can be to still be considered part of the same cluster.

Show total timeframe

Type: Checkbox
Description: Indicates whether to sum up all timeframes (in seconds) across clustered lines and display the total in the cluster label.

  • Enabled: The total of all timeframes (converted to seconds) is shown, which can indicate cluster strength — a higher sum suggests a stronger cluster.
  • Disabled: The sum of all timeframes is not displayed.

Stats

Type: Checkbox
Description: Toggles additional statistical info in the label.

  • Enabled: Displays details like the count of bull/bear/bb lines per cluster.
  • Disabled: No extra stats in the label.

The value on the far right in the square brackets is the current name of the cluster. This is important for alarms so that they can be clearly assigned.

Max. boxes

Type: Numeric input
Description: Sets the maximum number of box objects that can be displayed in the chart.

  • Example: A value of 60 means up to 60 cluster boxes can be shown. If more than 60 clusters exist, the oldest ones are removed (FIFO).
  • Usage: Prevents exceeding the Pine Script object limit by capping the number of boxes.

 

The order of the labels follows the sequence of the 38 timeframes in the settings. A cluster should always be viewed as a single unit. Therefore, clusters should be defined as small as possible so that the internal structure does not become relevant. If a cluster is too large, it should be redefined on a lower timeframe. In other words, if the order of the order blocks within a cluster becomes important, then the cluster is too large.

Â