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提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。