3D MACD Bar Plot [LuxAlgo]The 3D MACD Bar Plot indicator provides a multi-dimensional visualization of MACD values across a user-defined range of fast and slow EMA lengths. By projecting these values into a 3D grid, the tool allows traders to observe momentum clusters and identify robust trends that persist across various parameter settings.
🔶 USAGE
The indicator aims to solve the problem of "parameter sensitivity" by showing the MACD histogram for many different settings simultaneously. Instead of looking at a single (12, 26, 9) MACD, users can see a surface of momentum.
🔹 Identifying Momentum Clusters
When the majority of the 3D bars are tall and colored with the bullish color, it indicates a "momentum cluster" where most EMA combinations agree on a strong uptrend. Conversely, a mix of small bullish and bearish bars suggests a choppy or transitioning market where different settings are providing conflicting signals.
🔹 Trend Robustness
A robust trend is visible when the entire 3D surface slopes steeply in one direction. If only a small corner of the grid (specific EMA combinations) is showing strength while the rest remains flat, the trend may be fragile or limited to a specific timeframe/sensitivity.
🔹 3D Projection
The script uses a pseudo-3D isometric projection.
The Fast Axis represents variations in the Fast EMA length.
The Slow Axis represents variations in the Slow EMA length.
The Height (Z-axis) represents the resulting MACD value (Fast EMA - Slow EMA).
🔶 DETAILS
The tool calculates a matrix of MACD values by iterating through the "Step" values provided in the settings. It then maps these values to a 2D coordinate system on the chart to create the illusion of depth.
To maintain performance and visual clarity, the script uses a snaking polyline algorithm to draw the grid and surface. The bars also feature dynamic transparency: bars further back in the "depth" of the 3D space are more transparent, helping the user focus on the overall shape of the momentum surface rather than individual lines.
🔶 SETTINGS
🔹 Grid Configuration
Fast Min/Max/Step : Defines the range and increments for the Fast EMA lengths used in the calculation.
Slow Min/Max/Step : Defines the range and increments for the Slow EMA lengths used in the calculation.
🔹 3D Projection Settings
Y Baseline Price : Adjusts the vertical anchor point of the 3D plot.
X Spacing (bars) : Controls the horizontal spread between the 3D grid points.
Z Height : Scales the height of the MACD bars relative to the grid spacing.
🔹 Style
Bullish/Bearish Color : Sets the colors for positive and negative MACD bars.
Grid Color : Controls the color of the connecting surface lines and the base grid.
Индикатор Pine Script®






















