OPEN-SOURCE SCRIPT
Structural Leg Profiler [LuxAlgo]

The Structural Leg Profiler indicator is a comprehensive structural analysis tool that dynamically maps lower-timeframe volume distributions onto major market swings to reveal where the most significant trading activity occurs within a trend.
🔶 USAGE
The tool is designed to bridge the gap between traditional price action swings and order flow analysis. By using an ATR-based swing detection mechanism, the indicator automatically identifies structural "legs" (upward or downward price movements) and generates a detailed volume distribution profile for each one.
Users can leverage this tool to identify high-interest zones (Point of Control) and determine whether a move is supported by aggressive buying or selling volume through the Delta coloring mode.
🔹 Interpreting the Profiles
Each structural leg displays a volume profile across its duration, constructed from lower-timeframe data to ensure precision.
🔹 Volume Anomalies
The script automatically detects and highlights candles with unusual volume spikes using dynamic "bubbles." This helps in identifying potential exhaustion points or strong breakout momentum.
🔶 DETAILS
🔹 Untested POC Extensions
A core feature of this script is the "Naked POC" logic. When a structural leg is completed, its Point of Control is projected forward as a dashed line. These levels often act as high-probability support or resistance zones. The line continues to extend until price eventually "tests" or crosses it, at which point it automatically terminates to keep the chart clean.
🔹 Lower Timeframe Precision
Unlike standard profiles that use only chart-resolution data, this script utilizes
Pine Script®
to pull granular data. This provides a much more accurate view of how volume was distributed within each leg compared to simple OHLC-based approximations.
🔶 SETTINGS
🔹 Swing Detection
🔹 Profile Settings
🔹 Volume Anomalies
🔹 Style & Colors
🔶 USAGE
The tool is designed to bridge the gap between traditional price action swings and order flow analysis. By using an ATR-based swing detection mechanism, the indicator automatically identifies structural "legs" (upward or downward price movements) and generates a detailed volume distribution profile for each one.
Users can leverage this tool to identify high-interest zones (Point of Control) and determine whether a move is supported by aggressive buying or selling volume through the Delta coloring mode.
🔹 Interpreting the Profiles
Each structural leg displays a volume profile across its duration, constructed from lower-timeframe data to ensure precision.
- Volume Gradient Mode: Highlights nodes based on total activity. The colors transition from low-volume areas to high-volume nodes, with the Point of Control (POC) being the most prominent.
- Delta Mode: Colors the profile blocks based on the net difference between buying and selling volume. Bright green indicates heavy aggressive buying, while bright red indicates heavy aggressive selling.
- Summary Labels: Each leg includes a summary label showing the Total Leg Volume, the Net Delta, and the exact POC price.
🔹 Volume Anomalies
The script automatically detects and highlights candles with unusual volume spikes using dynamic "bubbles." This helps in identifying potential exhaustion points or strong breakout momentum.
- Standard Bubbles: Indicate volume that is significantly above the 20-period average.
- Large Bubbles with Values: Indicate extreme volume spikes, with the exact volume printed inside the bubble for immediate context.
🔶 DETAILS
🔹 Untested POC Extensions
A core feature of this script is the "Naked POC" logic. When a structural leg is completed, its Point of Control is projected forward as a dashed line. These levels often act as high-probability support or resistance zones. The line continues to extend until price eventually "tests" or crosses it, at which point it automatically terminates to keep the chart clean.
🔹 Lower Timeframe Precision
Unlike standard profiles that use only chart-resolution data, this script utilizes
to pull granular data. This provides a much more accurate view of how volume was distributed within each leg compared to simple OHLC-based approximations.
🔶 SETTINGS
🔹 Swing Detection
- ATR Period: The lookback period used to calculate volatility for swing detection.
- Swing Multiplier (ATR): Controls the sensitivity of the legs. Higher values capture major trends; lower values capture micro-swings.
🔹 Profile Settings
- Max Profile Boxes: Defines the vertical resolution and maximum number of rows in the profiles.
- Profile Alignment: Determines where the volume bars are anchored (Left, Right, or Center) within the leg area.
- Show Volume Value: Toggles the visibility of numeric volume values inside the profile boxes.
- Extend Untested POCs: Enables the forward projection of POC lines until they are mitigated by price.
🔹 Volume Anomalies
- Show Volume Bubbles: Toggles the volume anomaly visualization.
- Spike Threshold: The multiplier relative to the 20-period average volume that triggers an anomaly bubble.
🔹 Style & Colors
- Box Color Mode: Choose between "Volume Gradient" (Total Volume focus) or "Delta" (Buy vs. Sell focus).
- Up/Down Leg Colors: Customizable color gradients for both bullish and bearish structural legs.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Build your own edge with AI: luxalgo.com
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Build your own edge with AI: luxalgo.com
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
All content provided by LuxAlgo is for informational & educational purposes only. Past performance does not guarantee future results.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.