OPEN-SOURCE SCRIPT

Fibonacci 3-D

🟩 The Fibonacci 3-D indicator is a visual tool that introduces a three-dimensional approach to Fibonacci projections, leveraging market geometry. Unlike traditional Fibonacci tools that rely on two points and project horizontal levels, this indicator leverages slopes derived from three points to introduce a dynamic element into the calculations. The Fibonacci 3-D indicator uses three user-defined points to form a triangular structure, enabling multi-dimensional projections based on the relationships between the triangle’s sides.

This triangular framework forms the foundation for the indicator’s calculations, with each slope (⌳AB, ⌳AC, and ⌳BC) representing the rate of price change between its respective points. By incorporating these slopes into Fibonacci projections, the indicator provides an alternate approach to identifying potential support and resistance levels. The Fibonacci 3-D expands on traditional methods by integrating both historical price trends and recent momentum, offering deeper insights into market dynamics and aligning with broader market geometry.

The indicator operates across three modes, each defined by the triangular framework formed by three user-selected points (A, B, and C):
  • 1-Dimensional (1-D): Fibonacci levels are based on a single side of the triangle, such as AB, AC, or BC. The slope of the selected side determines the angle of the projection, allowing users to analyze linear trends or directional price movements.

  • 2-Dimensional (2-D): Combines two slopes derived from the sides of the triangle, such as AB and BC or AC and BC. This mode adds depth to the projections, accounting for both historical price swings and recent market momentum.

  • 3-Dimensional (3-D): Integrates all three slopes into a unified projection. This mode captures the full geometric relationship between the points, revealing a comprehensive view of geometric market structure.


🌀 THEORY & CONCEPT 🌀

The Fibonacci 3-D indicator builds on the foundational principles of traditional Fibonacci analysis while expanding its scope to capture more intricate market structures. At its core, the indicator operates based on three user-selected points (A, B, and C), forming the vertices of a triangle that provides the structural basis for all calculations. This triangle determines the slopes, projections, and Fibonacci levels, aligning with the unique geometric relationships between the chosen points. By introducing multiple dimensions and leveraging this triangular framework, the indicator enables a deeper examination of price movements.


1️⃣ First Dimension (1-D)

In technical analysis, traditional Fibonacci retracement and extension tools operate as one-dimensional instruments. They rely on two price points, often a swing high and a swing low, to calculate and project horizontal levels at predefined Fibonacci ratios. These levels identify potential support and resistance zones based solely on the price difference between the selected points.
istantaneaA one-dimensional Fibonacci showing levels derived from two price points (B and C).


The Fibonacci 3-D indicator extends this one-dimensional concept by introducing Ascending and Descending projection options. These options calculate the levels to align with the directional movement of price, creating sloped projections instead of purely horizontal levels.
istantanea 1-D mode with an ascending projection along the ⌳BC slope aligned to the market's slope. Potential support is observed at 0.236 and 0.382, while resistance appears at 1.0 and 0.5.



2️⃣ Second Dimension (2-D)

The second dimension incorporates a second side of the triangle, introducing relationships between two slopes (e.g., ⌳AB and ⌳BC) to form a more dynamic three-point structure (A, B, and C) on the chart. This structure enables the indicator to move beyond the single-axis (price) calculations of traditional Fibonacci tools. The sides of the triangle (AB, AC, BC) represent slopes calculated as the rate of price change over time, capturing distinct components of market movement, such as trend direction and momentum.
istantanea2-D mode of the Fibonacci 3-D indicator using the ⌳AC slope with a descending projection. The Fibonacci projections align closely with observed market behavior, providing support at 0.236 and resistance at 0.618. Unlike traditional zigzag setups, this configuration uses two swing highs (A and B) and a swing low (C). The alignment along the descending slope highlights the geometric relationships between selected points in identifying potential support and resistance levels.



3️⃣ Third Dimension (3-D)

The third dimension expands the analysis by integrating all three slopes into a unified calculation, encompassing the entire triangle structure formed by points A, B, and C. Unlike the second dimension, which analyzes pairwise slope relationships, the 3-D mode reflects the combined geometry of the triangle. Each slope contributes a distinct perspective: AB and AC provide historical context, while BC emphasizes the most recent price movement and is given greater weight in the calculations to ensure projections remain responsive to current dynamics.

Using this integrated framework, the 3-D mode dynamically adjusts Fibonacci projections to balance long-term patterns and short-term momentum. The projections extend outward in alignment with the triangle’s geometry, offering a comprehensive framework for identifying potential support and resistance zones and capturing market structures beyond the scope of simpler 1-D or 2-D modes.

istantanea Three-dimensional Fibonacci projection using the ⌳AC slope, aligning closely with the market's directional movement. The projection highlights key levels: resistance at 0.0 and 0.618, and support at 1.0, 0.786, and 0.382.


By leveraging all three slopes simultaneously, the 3-D mode introduces a level of complexity particularly suited for volatile or non-linear markets. The weighted slope calculations ensure no single price movement dominates the analysis, allowing the projections to adapt dynamically to the broader market structure while remaining sensitive to recent momentum.

istantanea Three-dimensional ascending projection. In 3D mode, the indicator integrates all three slopes to calculate the angle of projection for the Fibonacci levels. The resulting projections adapt dynamically to the overall geometry of the ABC structure, aligning with the market’s current direction.



🔂 Interactions: Dimensions. Slope Source, Projections, and Orientation

The Dimensions, Projections, and Orientation settings work together to define Fibonacci projections within the triangular framework. Each setting plays a specific role in the geometric analysis of price movements.

♾️ Dimension determines which of the three modes (1-D, 2-D, or 3-D) is used for Fibonacci projections. In 1-D mode, the projections are based on a single side of the triangle, such as AB, AC, or BC. In 2-D mode, two sides are combined, producing levels based on their geometric relationship. The 3-D mode integrates all three sides of the triangle, calculating projections using weighted averages that emphasize the BC side for its relevance to recent price movement while maintaining historical context from the AB and AC sides.
istantanea A one-dimensional Fibonacci projection using the ⌳AB slope with a neutral projection. Important levels of interaction are highlighted: repeated resistance at Level 1.0 and repeated support at Levels 0.5 and 0.618. The projection aligns horizontally, reflecting the relationship between points A, B, and C while identifying recurring zones of market structure.


🧮 Slope Source determines which side of the triangle (AB, AC, or BC) serves as the foundation for Fibonacci projections. This selection directly impacts the calculations by specifying the slope that anchors the geometric relationships within the chosen Dimension mode (1-D, 2-D, or 3-D).

In 1-D mode, the selected Source defines the single side used for the projection. In 2-D and 3-D modes, the Source works in conjunction with other settings to refine projections by integrating the selected slope into the multi-dimensional framework.
istantanea One-dimensional Fibonacci projection using the ⌳AC Slope Source and Ascending projection. The projection continues on the AC slope line.


🎯 Projection controls the direction and alignment of Fibonacci levels. Neutral projections produce horizontal levels, similar to traditional Fibonacci tools. Ascending and Descending projections adjust the levels along the calculated slope to reflect market trends. These options allow the indicator’s outputs to align with different market behaviors.
istantanea An ascending projection along the ⌳BC slope aligns with resistance levels at 1.0, 0.618, and 0.236. The geometric relationship between points A, B, and C illustrates how the projection adapts to market structure, identifying resistance zones that may not be captured by traditional Fibonacci tools.


🧭 Orientation modifies the alignment of the setup area defined by points A, B, and C, which influences Fibonacci projections in 2-D and 3-D modes. In Default mode, the triangle aligns naturally based on the relative positions of points B and C. In Inverted mode, the geometric orientation of the setup area is reversed, altering the slope calculations while preserving the projection direction specified in the Projection setting. In 1-D mode, Orientation has no effect since only one side is used for the projection.

Adjusting the Orientation setting provides alternative views of how Fibonacci levels align with the market's structure. By recalibrating the triangle’s setup, the inverted orientation can highlight different relationships between the sides, providing additional perspectives on support and resistance zones.
istantanea2-D inverted. The ⌳AC slope defines the projection, and the inverted orientation adjusts the alignment of the setup area, altering the angles used in level calculations. Key levels are highlighted: resistance at 0.786, strong support at 0.5 and 0.236, and a resistance-turned-support interaction at 0.618.



🛠️ CONFIGURATION AND SETTINGS 🛠️

The Fibonacci 3-D indicator includes configurable settings to adjust its functionality and visual representation. These options include customization of the dimensions (1-D, 2-D, or 3-D), slope calculations, orientations, projections, Fibonacci levels, and visual elements.

When adding the indicator to a new chart, select three reference points (A, B, and C). These are usually set to recent swing points. All three points can be easily changed at any time by clicking on the reference point and dragging it to a new location.

By default, all settings are set to Auto. The indicator uses an internal algorithm to estimate the projections based on the orientation and relative positions of the reference points. However, all values can be overridden to reflect the user's interpretation of the current market geometry.


⚙️ Core Settings
istantanea
Dimensions: Defines how many sides of the triangle formed by points A, B, and C are incorporated into the calculations for Fibonacci projections. This setting determines the level of complexity and detail in the analysis.
  • 1-D: Projects levels along the angle of a single user-selected side of the triangle.
  • 2-D: Projects levels based on a composite slope derived from the angles of two sides of the triangle.
  • 3-D: Projects levels based on a composite slope derived from all three sides of the triangle (A-B, A-C, and B-C), providing a multi-dimensional projection that adapts to both historical and recent market movements.

Slope Source: Determines which side of the triangle is used as the basis for slope calculations.
  • A–B: The slope between points A and B. In 1-D mode, this determines the projection. In 2-D and 3-D modes, it contributes to the composite slope calculation.
  • A–C: The slope between points A and C. In 1-D mode, this determines the projection. In 2-D and 3-D modes, it contributes to the composite slope calculation.
  • B--C: The slope between points B and C. In 1-D mode, this determines the projection. In 2-D and 3-D modes, it contributes to the composite slope calculation.

Orientation: Defines the triangle's orientation formed by points A, B, and C, influencing slope calculations.
  • Auto: Automatically determines orientation based on the relative positions of points B and C. If point C is to the right of point B, the orientation is "normal." If point C is to the left, the orientation is inverted.
  • Inverted: Reverses the orientation set in "Auto" mode. This flips the triangle, reversing slope calculations ⌳AB becomes ⌳BA).

Projection: Determines the direction of Fibonacci projections:
  • Auto: Automatically determines projection direction based on the triangle formed by A, B, and C.
  • Ascending: Projects the levels upward.
  • Neutral: Projects the levels horizontally, similar to traditional Fibonacci retracements.
  • Descending: Projects the levels downward.


⚙️ Fibonacci Level Settingsistantanea
  • Show or hide specific levels.
  • Level Value: Adjust Fibonacci ratios for each level. The 0.0 and 1.0 levels are fixed.
  • Color: Set level colors.


⚙️Visibility Settingsistantanea
  • Show Setup: Toggle the display of the setup area, which includes the projected lines used in calculations.
  • Show Triangle: Toggle the display of the triangle formed by points A, B, and C.
  • Triangle Color: Set triangle line colors.
  • Show Point Labels: Toggle the display of labels for points A, B, and C.
  • Show Left/Right Labels: Toggle price labels on the left and right sides of the chart.
  • Fill %: Adjust the fill intensity between Fibonacci levels (0% for no fill, 100% for full fill).
  • Info: Set the location or hide the Slope Source and Dimension. If Orientation is Inverted, the Slope Source will display with an asterisk (*).


⚙️ Time-Price Points:
  • Set the time and price for points A, B, and C, which define the Fibonacci projections.
  • A, B, and C Points: User-defined time and price coordinates that form the foundation of the indicator's calculations.
  • Interactive Adjustments: Changes made to points on the chart automatically synchronize with the settings panel and update projections in real time.


Notes
  • Unlike traditional Fibonacci tools that include extensions beyond 1.0 (e.g., 1.618 or 2.618), the Fibonacci 3-D indicator restricts Fibonacci levels to the range between 0.0 and 1.0. This is because the projections are tied directly to the proportional relationships along the sides of the triangle formed by points A, B, and C, rather than extending beyond its defined structure.

  • The indicator's calculations dynamically sort the user-defined A, B, and C points by time, ensuring point A is always the earliest, point C the latest, and point B the middle. This automatic sorting allows users to freely adjust the points directly on the chart without concern for their sequence, maintaining consistency in the triangular structure.



🖼️ ADDITIONAL CHART EXAMPLES 🖼️

istantaneaThree-dimensional ⌳AC slope is used with an ascending projection, even as the broader market trend moves downward. Despite the apparent contradiction, the projected Fibonacci levels align closely with price action, identifying zones of support and resistance. These levels highlight smaller countertrend movements, such as pullbacks to 0.382 and 0.236, followed by continuations at resistance levels like 0.618 and 0.786.


istantanea In 2-D mode, an ascending projection based on the BC slope highlights the market's geometric structure. A setup triangle, defined by a swing high (A), a swing low (B), and another swing high (C), reveals Fibonacci projections aligning with support at 0.236, 0.382, and 0.5, and resistance at 0.618, 0.786, and 1.0, as shown by the green and red arrows. This demonstrates the ability to uncover dynamic support and resistance levels not calculated in traditional Fibonacci tools.


istantaneaIn 2-D mode with an ascending projection from the ⌳AB slope, price movement is contained within the 0.5 and 0.786 levels. The 0.5 level serves as support, while the 0.786 level acts as resistance, with price action consistently interacting with these boundaries.


istantaneaAn AC (2-D) ascending projection is derived from two swing highs (A and B) and a swing low (C), reflecting a non-linear market structure that deviates from traditional zigzag patterns. The ascending projection aligns closely with the market's upward trajectory, forming a channel between the 0.0 and 0.5 Fibonacci levels. Note how price action interacts with the projected levels, showing support at 0.236 and 0.382, with the 0.5 level acting as a mid-channel equilibrium.


istantaneaTwo-dimensional ascending Fibonacci projection using the ⌳AC slope. Arrows highlight resistance at 0.786 and support at 0.0 and 0.236. The projection follows the ⌳AC slope, reflecting the geometric relationship between points A, B, and C to identify these levels.


istantanea Three-dimensional Fibonacci projection using the ⌳AC slope, aligned with the actual market's directional trend. By removing additional Fibonacci levels, the image emphasizes key areas: resistance at Level 0.0 and support at Levels 1.0 and 0.5. The projection dynamically follows the ⌳AC slope, adapting to the market's structure as defined by points A, B, and C.


istantaneaA three-dimensional configuration uses the ⌳AB slope as the baseline for projections while incorporating the geometric influence of point C. Only the 0.0 and 0.618 levels are enabled, emphasizing the relationship between support at 0.0 and resistance at 0.618. Unlike traditional Fibonacci tools, which operate in a single plane, this setup reveals levels that rely on the triangular relationship between points A, B, and C. The third dimension allows for projections that align more closely with the market’s structure and reflect its multi-dimensional geometry.


istantaneaThe Fibonacci 3-D indicator can adapt to non-traditional point selection. Point A serves as a swing low, while points B and C are swing highs, forming an unconventional configuration. ⌳The BC slope is used in 2-D mode with an inverted orientation, flipping the projection direction and revealing resistance at Level 0.786 and support at Levels 0.618 and 0.5.


⚠️ DISCLAIMER ⚠️

The Fibonacci 3-D indicator is a visual analysis tool designed to illustrate Fibonacci relationships. While the indicator employs precise mathematical and geometric formulas, no guarantee is made that its calculations will align with other Fibonacci tools or proprietary methods. Like all technical and visual indicators, the Fibonacci projections generated by this tool may appear to visually align with key price zones in hindsight. However, these projections are not intended as standalone signals for trading decisions. This indicator is intended for educational and analytical purposes, complementing other tools and methods of market analysis.

🧠 BEYOND THE CODE 🧠

The Fibonacci 3-D indicator, like other xxattaxx indicators, is designed to encourage both education and community engagement. Your feedback and insights are invaluable to refining and enhancing the Fibonacci 3-D indicator. We look forward to the creative applications, adaptations, and observations this tool inspires within the trading community.

Declinazione di responsabilità