Momentum Terrain 3D [LuxAlgo]The Momentum Terrain 3D tool visualizes multi-dimensional RSI momentum by mapping various lookback lengths across time into a single 3D topographical landscape.
🔶 USAGE
The script provides a comprehensive view of momentum by calculating multiple RSI lengths simultaneously. This allows users to see how short-term momentum (foreground) interacts with long-term structural momentum (background) in a single visual pane, offering a unique perspective on trend strength and exhaustion.
🔹 Understanding the Dimensions
To navigate the 3D map, it is essential to understand the three axes:
X-Axis (Width): Represents Time. The rightmost edge of the terrain represents the current bar, while moving left traverses historical data.
Y-Axis (Depth): Represents the RSI Lookback Length. The front of the terrain shows fast, reactive momentum (short lookbacks), while the back shows slow, structural momentum (long lookbacks).
Z-Axis (Height): Represents the RSI Value. A semi-transparent "Neutral Plane" is fixed at the 50 level. Peaks above this plane represent bullish momentum, while valleys below represent bearish momentum.
🔹 Interpreting the Topography
Trend Alignment: When the entire landscape from back to front rises together, it indicates a "unified" momentum where all timeframes are in bullish agreement.
Spotting Pullbacks: If the background (long-term) remains a high mountain but the foreground (short-term) drops into a valley, it identifies a pullback within a macro uptrend.
Trend Compression: If the terrain appears flat and stays near the 50 neutral plane, the market is ranging or in a period of indecision.
🔹 OB/OS Pillars
The script identifies extreme momentum through vertical color pillars. Red pillars indicate overbought conditions (RSI > 70), while cyan pillars indicate oversold conditions (RSI < 30). These help traders quickly spot exhaustion points across the entire momentum spectrum without checking multiple individual indicators.
🔶 DETAILS
The indicator utilizes an optimized 3D rendering engine built with Pine Script's polyline and matrix systems. By calculating a range of RSI lengths (e.g., from a minimum of 5 to a maximum of 60) for every historical bar within the defined window, it creates a "momentum matrix."
This matrix is then projected into 3D space using trigonometric transformations (Yaw and Pitch). The "Terrain Smoothing" feature uses an exponential smoothing calculation on the raw RSI data to transform jagged spikes into readable topographical features, making it easier to identify the flow of capital and the weight of momentum shifts.
🔶 SETTINGS
🔹 Terrain & Matrix
Time History (Width): Determines how many historical bars are rendered on the X-axis.
Lookback Layers (Depth): The number of different RSI lengths calculated. Increasing this creates a denser, more detailed surface.
Terrain Smoothing: Applies smoothing to the RSI values to create a more natural, less noisy landscape.
Minimum/Maximum Lookback: Defines the range of RSI lengths used for the front (fast) and back (slow) edges.
🔹 Camera Projection
Yaw/Pitch: Rotates the landscape horizontally or tilts it vertically to change the visual perspective.
Scale X/Y/Z: Adjusts the width, depth, and height intensity of the 3D model.
Offset X/Y: Moves the entire 3D object on the chart pane horizontally or vertically for better positioning.
🔹 Style & Colors
Show Wireframe/Surface: Toggles the visibility of the grid lines and the solid surface fill.
Show OB/OS Volume Fills: Enables the vertical pillars that highlight extreme RSI levels.
Show Current Price Marker: Highlights the most recent momentum profile and displays the current price label on the 3D grid.
Neutral Plane Color: Adjusts the color and transparency of the RSI 50 reference floor.
Indicador Pine Script®






















