OPEN-SOURCE SCRIPT

Fractal Timeframe Collision Node [MarkitTick]

5 502
💡 The financial markets operate across multiple interacting timeframes, creating complex structural geometries that cannot be accurately analyzed through a single, isolated lens. The tool presented here acts as a comprehensive multi-timeframe aggregation engine, designed to isolate highly significant structural support and resistance clusters. By evaluating pivot points across four distinct time spans and merging them based on volatility-adjusted proximity, this system identifies high-probability reaction zones where structural exhaustion is most likely to occur. It is built strictly for the modern Pine Script environment, utilizing an entirely non-repainting architecture that respects the highest standards of data integrity and execution logic.

● ✨ Originality and Utility
Standard pivot or support/resistance scripts typically plot historical swing highs and lows independently. This creates chart clutter and often leaves the analyst guessing which level holds the most technical weight. This tool introduces the concept of "Collision Nodes." Instead of simply drawing every pivot, the algorithm scans higher timeframe data, identifies structural extremes, and clusters them together using a dynamic, adaptive mechanism.
  • When multiple higher timeframes project a pivot at the exact same price zone, a structural "Collision Node" is formed.
  • The utility lies in its objective strength grading: a node formed by the confluence of the 1-hour, 4-hour, and Daily charts mathematically demands more respect than a single localized swing point on a lower timeframe.
  • By filtering out the noise and only projecting nodes that meet a user-defined minimum strength threshold, the analyst is presented with a remarkably clean chart displaying only the most critical, high-liquidity zones.
  • Furthermore, the script automatically generates full trade execution parameters (Entry, Stop Loss, and multiple Take Profits) directly on the chart when a valid structural rejection occurs.


● 🔬 Methodology and Concepts
快照
• Multi-Timeframe Pivot Extraction
The core engine relies on detecting localized extrema (Pivot Highs and Pivot Lows) over a user-defined lookback window. The script fetches these pivot values simultaneously from three higher timeframes plus the current chart's timeframe. To ensure absolute data integrity and prevent any future data leakage (repainting), the algorithm strictly requests historical, confirmed data using offset historical referencing.

• Volatility-Normalized Spatial Clustering
Once the pivots are extracted, the algorithm must determine if they "collide" or overlap. Because absolute price distance is irrelevant across different assets, the script uses a dynamic clustering mechanism normalized by the Average True Range (ATR).
  • A tolerance band is calculated by multiplying the current ATR by a user-defined coefficient.
  • If a newly discovered higher timeframe pivot falls within this exact tolerance band of an existing pivot cluster, it is merged into that cluster, and the cluster's "strength" rating is incremented.
  • If it falls outside the tolerance band, a new independent node is registered.


• Memory Management and Age Pruning
Financial markets possess a memory, but structural relevance decays over time. The script incorporates a memory management protocol that continually monitors the age of all registered nodes. If a node has not been tested or updated within a specific bar count limit, it is automatically pruned from the active array, ensuring that only highly relevant, modern liquidity pools are analyzed.

• Automated Signal Validation
A visual node is not a signal; it is an area of interest. The script validates trade signals by combining spatial location with price action. A valid signal requires the price to close inside the tolerance zone of a high-strength node, accompanied by a rejection candle (where the wick constitutes a significant percentage of the total candle range), and a structural close confirming the directional bias.

● 🎨 Visual Guide
快照
• Collision Nodes
  • Teal Horizontal Lines: Represent bullish support nodes. The opacity of the line dynamically shifts based on the strength of the node (darker/more solid lines indicate higher timeframe confluence).
  • Red Horizontal Lines: Represent bearish resistance nodes. Like the bullish nodes, their visibility scales with structural strength.
  • Diamond Labels (◆×2, ◆×3): Attached to the end of the node lines, these labels explicitly display the node's strength rating. A "◆×3" label means three separate timeframes have confirmed a pivot at this exact mathematical level.


• Trade Execution Box
  • Dashed Blue Line: Indicates the exact Entry price upon signal confirmation.
  • Solid Red Line: Represents the dynamic Stop Loss, which is placed behind the collision node with an added ATR-based buffer to avoid premature liquidation.
  • Dashed Teal Lines (TP1, TP2, TP3): Represent calculated Take Profit levels projected automatically based on the user's defined Risk-to-Reward (RR) multipliers.
  • Red Background Fill: Visually maps the total risk zone between the Entry and the Stop Loss.
  • Teal Background Fill: Visually maps the total reward zone extending from the Entry up to the final Take Profit target.


• Real-time Dashboard
  • Located by default in the top right corner, this data table provides an instant summary of the market structure.
  • Bias: Displays the current active signal direction (LONG, SHORT, or NONE).
  • Active Nodes & Strengths: Lists the exact price levels of the nearest active bull and bear nodes, accompanied by visual progress bars displaying their respective strengths (Green for high strength, Yellow for medium, Red for low).
  • Trade Tracking: Displays the currently active Stop Loss and primary Take Profit levels if a trade configuration is locked on the chart.


● 📖 How to Use
快照
  1. Apply the indicator to your chart and set your three preferred higher timeframes in the settings (e.g., if trading on the 15-minute chart, you might select 1-Hour, 4-Hour, and Daily).
  2. Observe the chart for the formation of high-strength Collision Nodes (look for ◆×3 or ◆×4 labels). These are your primary zones of interest.
  3. Wait for price action to approach these nodes. Do not place blind limit orders.
  4. Allow the script's internal logic to identify a structural rejection. When a valid rejection candle forms and closes at a node, a trade execution box will automatically populate on the chart.
  5. Use the provided Entry, Stop Loss, and Take Profit lines to format your position sizing and manage the trade according to the mapped risk-to-reward parameters.
  6. Optionally, link the script's advanced JSON webhook alerts to an external execution platform for automated trade routing.


● ⚙️ Inputs and Settings
快照
• Core Settings
  • Pivot Lookback: The structural length required to confirm a swing high or low.
  • TF 1, TF 2, TF 3: The three higher timeframes used to scan for structural confluence.
  • Include Chart TF: Determines if the current chart's timeframe should also contribute to node strength.
  • Node Tolerance (×ATR): The spatial bandwidth used to cluster pivots together, measured as a multiplier of current volatility.
  • Min Node Strength: The minimum number of overlapping timeframes required for a node to be rendered on the chart.


• Filters
  • Require Rejection Candle: Enforces strict price action criteria, demanding that signals only fire if the candle displays a prominent rejection wick.
  • Min Wick % of Range: The exact percentage of the candle that must be composed of the wick to validate a rejection.
  • Max Node Age (bars): The duration a node remains active without being re-tested before being permanently purged from memory.


• Trade Tools
  • SL Buffer (×ATR): Adds a dynamic volatility buffer beyond the structural node to determine the absolute invalidation point.
  • TP1, TP2, TP3 (×SL Risk): The respective risk-to-reward multipliers used to dynamically project profit targets.
  • Lock Current Trade Levels: Freezes the visual risk/reward box on the chart until the trade hits either the final target or the stop loss, ignoring subsequent signals.


• Dashboard & Alerts
  • Show Dashboard: Toggles the visibility of the real-time data table.
  • Alert Actions: Customizable text fields allowing users to define specific JSON payload strings for long, short, and exit triggers.


● 🔍 Deconstruction of the Underlying Scientific and Academic Framework
The architectural foundation of this algorithm is heavily rooted in the Fractal Market Hypothesis (FMH), which posits that financial markets exhibit self-similar statistical structures across varying scales of time. In practical terms, a distribution pattern on a 5-minute chart mathematically resembles a distribution pattern on a Weekly chart. By aggregating pivot extrema from multiple independent time scales, this script exploits these fractal geometries to identify areas of harmonic resonance—price zones where liquidity pools overlap across different cohorts of market participants.

To resolve the spatial clustering problem, the system utilizes a volatility-normalized one-dimensional grouping algorithm conceptually akin to Density-Based Spatial Clustering of Applications with Noise (DBSCAN). Instead of utilizing fixed scalar distances (which fail as asset prices scale), the algorithm calculates an epsilon distance bounded by the Average True Range (ATR). This ensures that the clustering logic expands and contracts organically with market entropy. The ultimate output is a mathematically objective reduction of structural noise, isolating only the highest-density liquidity nodes that possess the greatest statistical probability of halting directional momentum.

⚠️ Disclaimer
All provided scripts and indicators are strictly for educational exploration and must not be interpreted as financial advice or a recommendation to execute trades. We expressly disclaim all liability for any financial losses or damages that may result, directly or indirectly, from the reliance on or application of these tools. Market participation carries inherent risk where past performance never guarantees future returns, leaving all investment decisions and due diligence solely at your own discretion.

免责声明

这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。