OPEN-SOURCE SCRIPT
Gaussian Volume Profile [LuxAlgo]

The Gaussian Volume Profile indicator is a sophisticated volume analysis tool that uses the Levenberg-Marquardt optimization algorithm to fit a Sum of Gaussians model to historical volume distribution.
This approach transcends traditional discrete volume profiles by providing a continuous, noise-reduced representation of liquidity clusters, allowing for the precise identification of high-volume nodes and their respective price boundaries.
🔶 USAGE
The indicator projects a lateral volume density map to the right of the current price action. Users can utilize this tool to identify "fair value" zones where the Gaussian peaks are most concentrated. Unlike standard profiles that show jagged horizontal bars, this tool provides a smooth "fit" line that highlights the true center of gravity for volume at specific price levels.
🔹 Identifying High-Volume Nodes
The script automatically detects local maxima (peaks) within the fitted Gaussian model. These peaks represent the most significant price levels where the highest density of trading occurred. Horizontal dashed lines are drawn at these apexes, color-coded to match the specific Gaussian component that is most dominant at that price.
🔹 Zone Width and Volatility
By observing the width (standard deviation) of the individual Gaussian components (the dotted curves), traders can gauge the "breadth" of a value area. A narrow, sharp peak suggests a very specific price level of agreement, while a wide, shallow curve indicates a broad range where volume was distributed less precisely.
🔶 DETAILS
This tool represents a scientific advancement over regular Volume Profiles by applying a Gaussian Density model to market data:
The visual output combines a lateral histogram with a bold Gaussian density curve, color-coded components, and auto-detected peak levels for a comprehensive view of institutional interest.
🔶 SETTINGS
🔹 Profile Settings
🔹 Gaussian Settings
🔹 Visuals
This approach transcends traditional discrete volume profiles by providing a continuous, noise-reduced representation of liquidity clusters, allowing for the precise identification of high-volume nodes and their respective price boundaries.
🔶 USAGE
The indicator projects a lateral volume density map to the right of the current price action. Users can utilize this tool to identify "fair value" zones where the Gaussian peaks are most concentrated. Unlike standard profiles that show jagged horizontal bars, this tool provides a smooth "fit" line that highlights the true center of gravity for volume at specific price levels.
🔹 Identifying High-Volume Nodes
The script automatically detects local maxima (peaks) within the fitted Gaussian model. These peaks represent the most significant price levels where the highest density of trading occurred. Horizontal dashed lines are drawn at these apexes, color-coded to match the specific Gaussian component that is most dominant at that price.
🔹 Zone Width and Volatility
By observing the width (standard deviation) of the individual Gaussian components (the dotted curves), traders can gauge the "breadth" of a value area. A narrow, sharp peak suggests a very specific price level of agreement, while a wide, shallow curve indicates a broad range where volume was distributed less precisely.
🔶 DETAILS
This tool represents a scientific advancement over regular Volume Profiles by applying a Gaussian Density model to market data:
- Noise Reduction: Discrete profiles are often "noisy," with small volume gaps between price ticks. The Sum of Gaussians model acts as a sophisticated filter, smoothing out insignificant variances to reveal the underlying structural liquidity.
- Levenberg-Marquardt Optimization: The script utilizes the LM algorithm, a standard in non-linear least squares problems, to iteratively refine the fit of multiple Gaussian pulses. This ensures the model converges on the most mathematically accurate representation of the volume data.
- Precise Liquidity Centers: While a standard profile bin might be several ticks wide, the Gaussian apex provides a mathematically derived "center" ($\mu$) for liquidity, often offering more precise support and resistance levels.
- Continuous Distribution: Because it models volume as a continuous function, it can estimate volume density between discrete price bins, providing a more fluid view of market interest.
The visual output combines a lateral histogram with a bold Gaussian density curve, color-coded components, and auto-detected peak levels for a comprehensive view of institutional interest.
🔶 SETTINGS
🔹 Profile Settings
- Lookback Window: The number of historical bars used to calculate the volume profile distribution.
- Number of Bins: Determines the vertical resolution of the profile. More bins provide more detail but require more computation.
🔹 Gaussian Settings
- Max Potential Peaks: The maximum number of Gaussian components (nodes) the algorithm will attempt to fit to the data.
- Max Iterations: Controls how many times the LM optimizer refines the fit. Higher values improve accuracy but may impact performance.
- Initial Lambda: The damping factor for the optimization algorithm, affecting the early steps of the fitting process.
🔹 Visuals
- Histogram Resolution: The maximum horizontal length of the projected histogram and fit line, measured in bar widths.
- Highlight Window Range: Toggles a visual background box covering the historical lookback area for context.
- Highlight Detected Peaks: Detects local maxima in the final fit and draws horizontal dashed levels at those price points.
- Fit Color: Sets the static color for the main density curve.
- Auto: When enabled, the fit color automatically adapts to your chart's foreground color (e.g., white on dark backgrounds).
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
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.
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
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.
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。