Volume Weighted Relative Strength IndexThis indicator calculates the Relative Strength Index (RSI) and enhances it with optional volume weighting (VWRSI). It also includes a customizable signal line and a built-in divergence detection engine.
Key Features:
Volume-Weighted Calculation: An option (Volume weighted) allows for volume to be incorporated into the calculation of both the RSI itself and its moving average signal line, making the oscillator more sensitive to high-volume price changes.
Customizable Signal Line: Includes an optional moving average of the VWRSI, which serves as a signal line. The type of MA (Smooth Method) and its length can be customized.
Full Divergence Suite (Class A, B, C): The primary feature is the integrated divergence engine. It automatically detects and plots all three major types of divergences:
Regular (A): Signals potential trend reversals.
Hidden (B): Signals potential trend continuations.
Exaggerated (C): Signals weakness at double tops/bottoms.
Divergence Filtering and Visualization:
Price Tolerance Filter: Divergence detection is enhanced with a percentage-based price tolerance (pivPrcTol) to filter out insignificant market noise.
Persistent Visualization: Divergence markers are plotted for the entire duration of the signal and are visually anchored to the VWRSI level of the confirming pivot.
Note on Confirmation (Lag): Divergence signals rely on a pivot confirmation method to ensure they do not repaint.
The Start of a- divergence is only detected after the confirming pivot is fully formed (a delay based on Pivot Right Bars).
The End of a divergence is detected either instantly (if the signal is invalidated by price action) or with a delay (when a new, non-divergent pivot is confirmed).
Multi-Timeframe (MTF) Capability:
MTF VWRSI Line: The VWRSI and its signal line can be calculated on a higher timeframe, with standard options to handle gaps (Fill Gaps) and prevent repainting (Wait for...).
Limitation: The Divergence detection engine (pivDiv) is disabled if a timeframe other than the chart's timeframe is selected. Divergences are only calculated on the active chart timeframe.
Integrated Alerts: Includes 20 comprehensive alerts for:
The start and end of all 6 divergence types.
The VWRSI crossing its signal line.
The VWRSI crossing the Overbought, Oversold, or 50-level lines.
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Weighted
Volume Weighted LR Standard DeviationThis indicator analyzes market character by decomposing total volatility into three distinct, interpretable components based on a Linear Regression model.
Key Features:
Three-Component Volatility Decomposition: The indicator separates volatility based on the 'Estimate Bar Statistics' option.
Standard Mode (Estimate Bar Statistics = OFF): Calculates volatility based on the selected Source (dies führt hauptsächlich zu 'Trend'- und 'Residual'-Volatilität).
Decomposition Mode (Estimate Bar Statistics = ON): The indicator uses a statistical model ('Estimator') to calculate within-bar volatility. (Assumption: In this mode, the Source input is ignored, and an estimated mean for each bar is used instead). This separates volatility into:
Trend Volatility (Green/Red): Volatility explained by the regression's slope (Momentum).
Residual Volatility (Yellow): Volatility from price oscillating around the regression line (Mean-Reversion).
Within-Bar Volatility (Blue): Volatility from the high-low range of each bar (Noise/Choppiness).
Dual Display Modes: The indicator offers two modes to visualize this decomposition:
Absolute Mode: Displays the total standard deviation as a stacked area chart, partitioned by the variance ratio of the three components.
Normalized Mode: Displays the direct variance ratio (proportion) of each component relative to the total (0-1), ideal for identifying the dominant market character.
Calculation Options:
Normalization: An optional 'Normalize Volatility' setting calculates an Exponential Regression Curve (log-space), making the analysis suitable for growth assets.
Volume Weighting: An option (Volume weighted) applies volume weighting to all regression and volatility calculations.
Multi-Component Pivot Detection: Includes a pivot detector that identifies significant turning points (highs and lows) in both the Total Volatility and the Trend Volatility Ratio. (Note: These pivots are only plotted when 'Plot Mode' is set to 'Absolute').
Note on Confirmation (Lag): Pivot signals are confirmed using a lookback method. A pivot is only plotted after the Pivot Right Bars input has passed, which introduces an inherent lag.
Multi-Timeframe (MTF) Capability:
MTF Volatility Lines: The volatility lines can be calculated on a higher timeframe, with standard options to handle gaps (Fill Gaps) and prevent repainting (Wait for...).
Limitation: The Pivot detection (Calculate Pivots) is disabled if a Higher Timeframe (HTF) is selected.
Integrated Alerts: Includes 9 comprehensive alerts for:
Volatility character changes (e.g., 'Character Change from Noise to Trend').
Dominant character emerging (e.g., 'Bullish Trend Character Emerging').
Total Volatility pivot (High/Low) detection.
Trend Volatility pivot (High/Low) detection.
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Volume Weighted Average PriceThis indicator provides an implementation of the Volume Weighted Average Price (VWAP), extended with layered standard deviation bands that decompose total market volatility relative to the VWAP anchor period.
Key Features:
Volatility Decomposition: The indicator's primary feature is its ability to separate volatility, controlled by the 'Estimate Bar Statistics' option.
Standard Mode (Estimate Bar Statistics = OFF): Plots a single set of bands representing the standard deviation of the Source price relative to the VWAP.
Decomposition Mode (Estimate Bar Statistics = ON): The indicator uses a statistical model ('Estimator') to calculate within-bar volatility. (Assumption: In this mode, the Source input is ignored, and an estimated mean for each bar is used instead). This mode displays two sets of bands:
Inner Bands: Show only the contribution of the 'between-bar' volatility.
Outer Bands: Show the total volatility (the sum of between-bar and within-bar components).
Periodic & Customizable Anchor: The VWAP calculation is session-based and resets at the beginning of a new period. The anchor timeframe (Anchor Timeframe) can be detected automatically (e.g., 'Session', 'Week') or specified manually.
Weighting Mechanism: The indicator has two levels of weighting:
The baseline is always a VWAP (Volume-Weighted Average Price).
The Volume weighted input additionally applies volume weighting to the volatility (standard deviation) calculation for the bands.
Multi-Timeframe (MTF) Engine: The indicator includes an MTF conversion block. When a Higher Timeframe (HTF) is selected, advanced options become available: Fill Gaps handles data gaps, and Wait for timeframe to close prevents repainting by ensuring the indicator only updates when the HTF bar closes.
Integrated Alerts: Includes a full set of built-in alerts for the source price crossing over or under the central VWAP line and the outermost calculated volatility band.
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Volume Weighted Linear Regression ChannelThis indicator plots a dynamic channel around a Linear Regression trendline. It provides a framework for identifying the prevailing trend and assessing price extremes based on volatility.
Key Features:
Linear Regression Baseline: The channel's centerline is a (Volume-Weighted) Linear Regression line. This line represents the 'best fit' for the recent price action, serving as a responsive baseline for the trend.
Volatility Decomposition: The indicator's primary feature is its ability to decompose volatility, controlled by the 'Estimate Bar Statistics' option.
Standard Mode (Estimate Bar Statistics = OFF): Calculates a standard linear regression channel. The bands represent the standard deviation of the residuals (the error) between the Source price and the regression line.
Decomposition Mode (Estimate Bar Statistics = ON): The indicator uses a statistical model ('Estimator') to calculate within-bar volatility. (Assumption: In this mode, the Source input is ignored, and an estimated mean for each bar is used for the regression). This mode displays two sets of bands:
Inner Bands: Show only the contribution of the 'residual' (trend noise) volatility, calculated proportionally.
Outer Bands: Show the total volatility (the sum of residual and within-bar components).
Volume Weighting: An option (Volume weighted) allows for volume to be incorporated into the calculation of both the linear regression and the volatility decomposition, giving more influence to high-participation bars.
Trend Projection: The calculated channel is plotted as a projection, which can be extended forward (Extend Forward) and backward (Extend Backward) in time to provide a visual guide for potential support and resistance.
Integrated Alerts: Includes a full set of built-in alerts for the Source price crossing over or under the calculated upper band, lower band, and the central regression line.
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Volume Weighted Volatility RegimeThe Volume-Weighted Volatility Regime (VWVR) is a market analysis tool that dissects total volatility to classify the current market 'character' or 'regime'. Using a Linear Regression model, it decomposes volatility into Trend, Residual (mean-reversion), and Within-Bar (noise) components.
Key Features:
Seven-Stage Regime Classification: The indicator's primary output is a regime value from -3 to +3, identifying the market state:
+3 (Strong Bull Trend): High directional, upward volatility.
+2 (Choppy Bull): Moderate upward trend with noise.
+1 (Quiet Bull): Low volatility, slight upward drift.
0 (Neutral): No clear directional bias.
-1 (Quiet Bear): Low volatility, slight downward drift.
-2 (Choppy Bear): Moderate downward trend with noise.
-3 (Strong Bear Trend): High directional, downward volatility.
Advanced Volatility Decomposition: The regime is derived from a three-component volatility model that separates price action into Trend (momentum), Residual (mean-reversion), and Within-Bar (noise) variance. The classification is determined by comparing the 'Trend' ratio against the user-defined 'Trend Threshold' and 'Quiet Threshold'.
Dual-Level Analysis: The indicator analyzes market character on two levels simultaneously:
Inter-Bar Regime (Background Color): Based on the main StdDev Length, showing the overall market character.
Intra-Bar Regime (Column Color): Based on a high-resolution analysis within each single bar ('Intra-Bar Timeframe'), showing the micro-structural character.
Calculation Options:
Statistical Model: The 'Estimate Bar Statistics' option (enabled by default) uses a statistical model ('Estimator') to perform the decomposition. (Assumption: In this mode, the Source input is ignored, and an estimated mean for each bar is used instead).
Normalization: An optional 'Normalize Volatility' setting calculates an Exponential Regression Curve (log-space).
Volume Weighting: An option (Volume weighted) applies volume weighting to all volatility calculations.
Multi-Timeframe (MTF) Capability: The entire dual-level analysis can be run on a higher timeframe (using the Timeframe input), with standard options to handle gaps (Fill Gaps) and prevent repainting (Wait for...).
Integrated Alerts: Includes 22 comprehensive alerts that trigger whenever the 'Inter-Bar Regime' or the 'Intra-Bar Regime' crosses one of the key thresholds (e.g., 'Regime crosses above Neutral Line'), or when the 'Intra-Bar Dominance' crosses the 50% mark.
Caution: Real-Time Data Behavior (Intra-Bar Repainting) This indicator uses high-resolution intra-bar data. As a result, the values on the current, unclosed bar (the real-time bar) will update dynamically as new intra-bar data arrives. This behavior is normal and necessary for this type of analysis. Signals should only be considered final after the main chart bar has closed.
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Volume Weighted Bollinger BandsThis indicator provides a customizable version of Bollinger Bands, enhanced with optional volume weighting and a method for decomposing market volatility.
Key Features:
Volatility Decomposition: The indicator's primary feature is its ability to separate total volatility, controlled by the 'Estimate Bar Statistics' option.
Standard Mode (Estimate Bar Statistics = OFF): The indicator functions as a customizable Bollinger Band. It calculates the standard deviation of the user-selected Source and plots a single set of bands.
Decomposition Mode (Estimate Bar Statistics = ON): The indicator uses a statistical model ('Estimator') to calculate within-bar volatility. (Assumption: In this mode, the Source input is ignored, and an estimated mean for each bar is used instead). This mode displays two sets of bands:
Inner Bands: Show only the contribution of the 'between-bar' volatility.
Outer Bands: Show the total volatility (the sum of between-bar and within-bar components).
Customizable Construction: The indicator is a hybrid:
Basis Line: The central line is calculated using a selectable Moving Average type (e.g., EMA, SMA, WMA).
Volume Weighting: An option (Volume weighted) allows for volume to be incorporated into the calculation of both the basis MA and the volatility decomposition.
Logarithmic Scaling: An optional 'Normalize' mode calculates the bands on a logarithmic scale. This results in bands that maintain a constant percentage distance from the basis, suitable for analyzing exponential markets.
Multi-Timeframe (MTF) Engine: The indicator includes an MTF conversion block. When a Higher Timeframe (HTF) is selected, advanced options become available: Fill Gaps handles data gaps, and Wait for timeframe to close prevents repainting by ensuring the indicator only updates when the HTF bar closes.
Integrated Alerts: Includes a full set of built-in alerts for the source price crossing over or under the central MA line and the outermost calculated volatility band.
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Volume Weighted Average True RangeThis indicator calculates a customizable version of the Average True Range (ATR), a tool for measuring market volatility. It enhances the standard ATR with volume weighting, a dual-smoothing process, normalization, and volatility pivot detection.
Key Features:
Volume Weighting: An option (Volume weighted) allows for volume to be incorporated into the volatility calculation. This provides a measure of "volume-adjusted" volatility that is more responsive to significant market activity.
Dual Smoothing Process: For noise reduction, the indicator employs a two-stage smoothing process. It first calculates a smoothed True Range (TR) over a user-defined period (TR Length) before applying the final ATR moving average (ATR Length & ATR Smooth).
Normalization (Percentage Volatility): An optional 'Normalize' mode calculates the ATR as a percentage of the price. This allows for consistent volatility comparison across different assets and over long time periods.
Volatility Pivot Detection: The indicator includes a built-in pivot detector that identifies significant turning points (highs and lows) in the ATR line itself, signaling potential shifts in volatility.
Note on Confirmation (Lag): Pivot signals are confirmed using a lookback method. A pivot is only plotted after the Pivot Right Bars input has passed. This is essential for ensuring the signal is non-repainting but introduces an inherent lag.
Multi-Timeframe (MTF) Capability:
MTF ATR Line: The ATR line itself can be calculated on a different timeframe, with standard options to handle gaps (Fill Gaps) and prevent repainting (Wait for...).
Limitation: The Pivot detection (Calculate Pivots) is disabled if a Higher Timeframe (HTF) is selected.
Integrated Alerts: Includes alerts that trigger when a new volatility pivot (high or low) is detected in the ATR line.
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Volume Weighted Keltner ChannelThis indicator provides a customizable implementation of Keltner Channels (KC), a volatility-based envelope designed to identify trend direction and potential reversal or breakout zones. It allows deep control over its core components and calculation methods.
Key Features:
Customizable Components: This implementation allows for full control over the channel's construction:
Basis Line: Choose from a wide range of moving average types (e.g., EMA, SMA, WMA) for the central line.
Volatility Bands: Select the volatility measure used to construct the bands: Average True Range (ATR), True Range (TR), or bar Range (High-Low).
Volume Weighting: An option (Volume weighted) allows for volume to be incorporated into the calculation of both the basis moving average and the selected volatility measure (e.g., creating a Volume-Weighted ATR). This makes the channel more responsive to moves backed by high market participation.
Logarithmic Scaling: The indicator includes an optional 'Normalize' mode that calculates the channel on a logarithmic scale. This creates bands that represent a constant percentage distance from the basis, making it a suitable tool for analyzing long-term trends in exponential markets.
Multi-Timeframe (MTF) Engine: The indicator includes an MTF conversion block. When a Higher Timeframe (HTF) is selected, advanced options become available: Fill Gaps handles data gaps, and Wait for timeframe to close prevents repainting by ensuring the indicator only updates when the HTF bar closes.
Integrated Alerts: Includes a full set of built-in alerts for the source price crossing over or under the upper band, lower band, and the central basis line.
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Versatile Moving AverageThe Versatile Moving Average (VMA) is a comprehensive, all-in-one tool for trend analysis. It is designed to act as a central hub for advanced MA calculations by combining a wide selection of average types, calculation modes, and a multi-timeframe engine.
Key Features:
Comprehensive MA Selection: Provides a wide variety of moving average types (e.g., EMA, SMA, WMA, HMA, and their volume-weighted counterparts). Allows full customization of length, source, and offset.
Advanced Calculation Modes:
Volume Weighting: Optionally weights the selected MA calculation by volume, making it more responsive to market participation.
Normalization (Geometric Average): A key feature is the optional 'Normalize' mode. When enabled, the indicator calculates a Geometric Moving Average by averaging the logarithms of the source price. This measures the average compound growth rate, making it well-suited for analyzing assets with exponential price behavior.
Multi-Timeframe (MTF) Engine: The indicator includes an MTF conversion block. When a Higher Timeframe (HTF) is selected, advanced options become available: Fill Gaps handles data gaps, and Wait for timeframe to close prevents repainting by ensuring the indicator only updates when the HTF bar closes.
Integrated Alerts: Comes with built-in alerts for the source price crossing over or under the calculated VMA, allowing for timely notifications.
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Volume Weighted Intra Bar LR Standard DeviationThis indicator analyzes market character by providing a detailed view of volatility. It applies a Linear Regression model to intra-bar price action, dissecting the total volatility of each bar into three distinct components.
Key Features:
Three-Component Volatility Decomposition: By analyzing a lower timeframe ('Intra-Bar Timeframe'), the indicator separates each bar's volatility into:
Trend Volatility (Green/Red): Volatility explained by the intra-bar linear regression slope (Momentum).
Residual Volatility (Yellow): Volatility from price oscillating around the intra-bar trendline (Mean-Reversion).
Within-Bar Volatility (Blue): Volatility derived from the range of each intra-bar candle (Noise/Choppiness).
Layered Column Visualization: The indicator plots these components as a layered column chart. The size of each colored layer visually represents the dominance of each volatility character.
Dual Display Modes: The indicator offers two modes to visualize this decomposition:
Absolute Mode: Displays the total standard deviation as the column height, showing the absolute magnitude of volatility and the contribution of each component.
Normalized Mode: Displays the components as a 100% stacked column chart (scaled from 0 to 1), focusing purely on the percentage ratio of Trend, Residual, and Noise.
Calculation Options:
Statistical Model: The 'Estimate Bar Statistics' option (enabled by default) uses a statistical model ('Estimator') to perform the decomposition. (Assumption: In this mode, the Source input is ignored, and an estimated mean for each bar is used instead).
Normalization: An optional 'Normalize Volatility' setting calculates an Exponential Regression Curve (log-space).
Volume Weighting: An option (Volume weighted) applies volume weighting to all intra-bar calculations.
Multi-Component Pivot Detection: Includes a pivot detector that identifies significant turning points (highs and lows) in both the Total Volatility and the Trend Volatility Ratio. (Note: These pivots are only plotted when 'Plot Mode' is set to 'Absolute').
Note on Confirmation (Lag): Pivot signals are confirmed using a lookback method. A pivot is only plotted after the Pivot Right Bars input has passed, which introduces an inherent lag.
Multi-Timeframe (MTF) Capability:
MTF Analysis: The entire intra-bar analysis can be run on a higher timeframe (using the Timeframe input), with standard options to handle gaps (Fill Gaps) and prevent repainting (Wait for...).
Limitation: The Pivot detection (Calculate Pivots) is disabled if a Higher Timeframe (HTF) is selected.
Integrated Alerts: Includes 9 comprehensive alerts for:
Volatility character changes (e.g., 'Character Change from Noise to Trend').
Dominant character emerging (e.g., 'Bullish Trend Character Emerging').
Total Volatility pivot (High/Low) detection.
Trend Volatility pivot (High/Low) detection.
Caution! Real-Time Data Behavior (Intra-Bar Repainting) This indicator uses high-resolution intra-bar data. As a result, the values on the current, unclosed bar (the real-time bar) will update dynamically as new intra-bar data arrives. This behavior is normal and necessary for this type of analysis. Signals should only be considered final after the main chart bar has closed.
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Volume Weighted Intra Bar Standard DeviationThis indicator provides a high-resolution analysis of market volatility by dissecting each bar on the chart into its fundamental components. It uses data from a lower, intra-bar timeframe to separate the total volatility of a single bar into its 'directional' and 'non-directional' parts.
Key Features:
Intra-Bar Volatility Decomposition: For each bar on the chart, the indicator analyzes the underlying price action on a smaller timeframe ('Intra-Bar Timeframe') and quantifies two types of volatility:
Between-Bar Volatility (Directional): Calculated from price movements between the intra-bar candles. This component represents the directional, trending price action within the main bar.
Within-Bar Volatility (Non-Directional): Calculated from price fluctuations inside each intra-bar candle. This component represents the choppy, noisy, or ranging price action.
Dual Display Modes: The indicator offers two modes to visualize this information:
Absolute Mode: Plots the total standard deviation as a stacked column chart, showing the absolute magnitude of volatility and the contribution of each component.
Normalized Mode: Plots the components as a 100% stacked column chart (scaled from 0 to 1), focusing purely on the percentage ratio of 'between-bar' (trending) and 'within-bar' (choppy) volatility.
Calculation Options:
Statistical Model: The 'Estimate Bar Statistics' option (enabled by default) uses a statistical model ('Estimator') to perform the decomposition. (Assumption: In this mode, the Source input is ignored, and an estimated mean for each bar is used instead).
Normalization: An optional 'Normalize Volatility' setting calculates volatility in percentage terms (log-space).
Volume Weighting: An option (Volume weighted) applies volume weighting to all intra-bar volatility calculations.
Volatility Pivot Detection: Includes a built-in pivot detector that identifies significant turning points (highs and lows) in the total volatility line. (Note: This is only visible in 'Absolute Mode').
Note on Confirmation (Lag): Pivot signals are confirmed using a lookback method. A pivot is only plotted after the Pivot Right Bars input has passed, which introduces an inherent lag.
Multi-Timeframe (MTF) Capability:
MTF Analysis Lines: The entire intra-bar analysis can be run on a higher timeframe (using the Timeframe input), with standard options to handle gaps (Fill Gaps) and prevent repainting (Wait for...).
Limitation: The Pivot detection (Calculate Pivots) is disabled if a Higher Timeframe (HTF) is selected.
Integrated Alerts: Includes 6 alerts for:
Volatility character changes (e.g., 'Character Change from Choppy to Trend').
Dominant character emerging (e.g., 'Trend Character Emerging').
Total Volatility pivot (High/Low) detection.
Caution: Real-Time Data Behavior (Intra-Bar Repainting) This indicator uses high-resolution intra-bar data. As a result, the values on the current, unclosed bar (the real-time bar) will update dynamically as new intra-bar data arrives. This behavior is normal and necessary for this type of analysis. Signals should only be considered final after the main chart bar has closed.
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Volume Weighted Price OscillatorThis indicator calculates the Percentage Price Oscillator (PPO), a momentum oscillator similar to the MACD. It displays the distance between two moving averages as a percentage, making it comparable across different assets. This implementation enhances the PPO with optional volume weighting and a built-in divergence engine.
Key Features:
Customizable MA & Volume Weighting: Both the fast and slow moving averages (and the signal line) can be customized using different MA types (e.g., EMA, SMA, WMA). An option (Volume weighted) applies volume weighting to all three MAs.
MACD-Style Display: Provides the three core components: the PPO line (momentum), a signal line (trigger), and a histogram (momentum acceleration). The histogram is color-coded to show increasing or decreasing momentum.
Full Divergence Suite (Class A, B, C): A built-in divergence engine automatically detects and plots all three major divergence classes between price and the PPO line:
Regular (A): Signals potential trend reversals.
Hidden (B): Signals potential trend continuations.
Exaggerated (C): Signals weakness at double tops/bottoms.
Divergence Filtering and Visualization:
Price Tolerance Filter: Divergence detection is enhanced with a percentage-based price tolerance (pivPrcTol) to filter out insignificant market noise.
Persistent Visualization: Divergence markers are plotted for the entire duration of the signal and are visually anchored to the PPO level of the confirming pivot.
Note on Confirmation (Lag): Divergence signals rely on a pivot confirmation method to ensure they do not repaint.
The Start of a- divergence is only detected after the confirming pivot is fully formed (a delay based on Pivot Right Bars).
The End of a divergence is detected either instantly (if the signal is invalidated by price action) or with a delay (when a new, non-divergent pivot is confirmed).
Multi-Timeframe (MTF) Capability:
MTF PPO Lines: The PPO, signal line, and histogram can be calculated on a higher timeframe, with standard options to handle gaps (Fill Gaps) and prevent repainting (Wait for...).
Limitation: The Divergence detection engine (pivDiv) is disabled if a timeframe other than the chart's timeframe is selected. Divergences are only calculated on the active chart timeframe.
Integrated Alerts: Includes 18 comprehensive alerts for:
The start and end of all 6 divergence types.
The PPO line crossing its signal line.
The PPO line crossing the zero line.
The histogram changing direction (reverting).
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Volume Weighted Stochastic RSIThis indicator calculates the Stochastic RSI, enhanced with optional Volume Weighting (VWStochRSI). It measures the level of a (Volume-Weighted) RSI relative to its high-low range over a set period, providing a sensitive momentum oscillator.
Key Features:
Volume-Weighted Core: The indicator is built on a Relative Strength Index (RSI) that can be optionally volume-weighted (Volume weighted).
Customizable Smoothing: The %K and %D lines are smoothed using a customizable moving average. The MA type (Smooth Method) can be selected (e.g., EMA, SMA, WMA) and will also be volume-weighted if the main Volume weighted option is enabled.
Full Divergence Suite (Class A, B, C): The primary feature is the integrated divergence engine. It automatically detects and plots all three major types of divergences:
Regular (A): Signals potential trend reversals.
Hidden (B): Signals potential trend continuations.
Exaggerated (C): Signals weakness at double tops/bottoms.
Divergence Filtering and Visualization:
Price Tolerance Filter: Divergence detection is enhanced with a percentage-based price tolerance (pivPrcTol) to filter out insignificant market noise.
Persistent Visualization: Divergence markers are plotted for the entire duration of the signal and are visually anchored to the %K line level of the confirming pivot.
Note on Confirmation (Lag): Divergence signals rely on a pivot confirmation method to ensure they do not repaint.
The Start of a- divergence is only detected after the confirming pivot is fully formed (a delay based on Pivot Right Bars).
The End of a divergence is detected either instantly (if the signal is invalidated by price action) or with a delay (when a new, non-divergent pivot is confirmed).
Multi-Timeframe (MTF) Capability:
MTF VWStochRSI Lines: The %K and %D lines can be calculated on a higher timeframe, with standard options to handle gaps (Fill Gaps) and prevent repainting (Wait for...).
Limitation: The Divergence detection engine (pivDiv) is disabled if a timeframe other than the chart's timeframe is selected. Divergences are only calculated on the active chart timeframe.
Integrated Alerts: Includes 20 comprehensive alerts for:
The start and end of all 6 divergence types.
The %K line crossing the %D line.
The %K line crossing the Overbought, Oversold, or 50-level lines.
DISCLAIMER
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
Volume Weighted Linear Regression BandThe Volume-Weighted Linear Regression Band (VWLRBd) is a volatility channel that uses a Linear Regression line as its dynamic baseline. Its primary feature is the decomposition of total volatility into two distinct components, visualized as layered bands.
Key Features:
Volatility Decomposition: The indicator separates volatility based on the 'Estimate Bar Statistics' option.
Standard Mode (Estimate Bar Statistics = OFF): The indicator functions as a standard (Volume-Weighted) Linear Regression Channel. It plots a single set of bands based on the standard deviation of the residuals (the error between the Source price and the regression line).
Decomposition Mode (Estimate Bar Statistics = ON): The indicator uses a statistical model ('Estimator') to calculate within-bar volatility. (Assumption: In this mode, the Source input is ignored, and an estimated mean for each bar is used for the regression). This mode displays two sets of bands:
Inner Bands: Show only the contribution of the 'residual' (trend noise) volatility, calculated proportionally.
Outer Bands: Show the total volatility (the sum of residual and within-bar components).
Regression Baseline (Linear / Exponential): The central line is a (Volume-Weighted) Linear Regression curve. An optional 'Normalize' mode performs all calculations in logarithmic space, transforming the baseline into an Exponential Regression Curve and the bands into constant percentage deviations, suitable for analyzing growth assets.
Volume Weighting: An option (Volume weighted) allows for volume to be incorporated into the calculation of both the regression baseline and the volatility decomposition, giving more influence to high-participation bars.
Multi-Timeframe (MTF) Engine: The indicator includes an MTF conversion block. When a Higher Timeframe (HTF) is selected, advanced options become available: Fill Gaps handles data gaps, and Wait for timeframe to close prevents repainting by ensuring the indicator only updates when the HTF bar closes.
Integrated Alerts: Includes a full set of built-in alerts for the source price crossing over or under the central regression line and the outermost calculated volatility band.
DISCLAIM_
For Informational/Educational Use Only: This indicator is provided for informational and educational purposes only. It does not constitute financial, investment, or trading advice, nor is it a recommendation to buy or sell any asset.
Use at Your Own Risk: All trading decisions you make based on the information or signals generated by this indicator are made solely at your own risk.
No Guarantee of Performance: Past performance is not an indicator of future results. The author makes no guarantee regarding the accuracy of the signals or future profitability.
No Liability: The author shall not be held liable for any financial losses or damages incurred directly or indirectly from the use of this indicator.
Signals Are Not Recommendations: The alerts and visual signals (e.g., crossovers) generated by this tool are not direct recommendations to buy or sell. They are technical observations for your own analysis and consideration.
LibWghtLibrary "LibWght"
This is a library of mathematical and statistical functions
designed for quantitative analysis in Pine Script. Its core
principle is the integration of a custom weighting series
(e.g., volume) into a wide array of standard technical
analysis calculations.
Key Capabilities:
1. **Universal Weighting:** All exported functions accept a `weight`
parameter. This allows standard calculations (like moving
averages, RSI, and standard deviation) to be influenced by an
external data series, such as volume or tick count.
2. **Weighted Averages and Indicators:** Includes a comprehensive
collection of weighted functions:
- **Moving Averages:** `wSma`, `wEma`, `wWma`, `wRma` (Wilder's),
`wHma` (Hull), and `wLSma` (Least Squares / Linear Regression).
- **Oscillators & Ranges:** `wRsi`, `wAtr` (Average True Range),
`wTr` (True Range), and `wR` (High-Low Range).
3. **Volatility Decomposition:** Provides functions to decompose
total variance into distinct components for market analysis.
- **Two-Way Decomposition (`wTotVar`):** Separates variance into
**between-bar** (directional) and **within-bar** (noise)
components.
- **Three-Way Decomposition (`wLRTotVar`):** Decomposes variance
relative to a linear regression into **Trend** (explained by
the LR slope), **Residual** (mean-reversion around the
LR line), and **Within-Bar** (noise) components.
- **Local Volatility (`wLRLocTotStdDev`):** Measures the total
"noise" (within-bar + residual) around the trend line.
4. **Weighted Statistics and Regression:** Provides a robust
function for Weighted Linear Regression (`wLinReg`) and a
full suite of related statistical measures:
- **Between-Bar Stats:** `wBtwVar`, `wBtwStdDev`, `wBtwStdErr`.
- **Residual Stats:** `wResVar`, `wResStdDev`, `wResStdErr`.
5. **Fallback Mechanism:** All functions are designed for reliability.
If the total weight over the lookback period is zero (e.g., in
a no-volume period), the algorithms automatically fall back to
their unweighted, uniform-weight equivalents (e.g., `wSma`
becomes a standard `ta.sma`), preventing errors and ensuring
continuous calculation.
---
**DISCLAIMER**
This library is provided "AS IS" and for informational and
educational purposes only. It does not constitute financial,
investment, or trading advice.
The author assumes no liability for any errors, inaccuracies,
or omissions in the code. Using this library to build
trading indicators or strategies is entirely at your own risk.
As a developer using this library, you are solely responsible
for the rigorous testing, validation, and performance of any
scripts you create based on these functions. The author shall
not be held liable for any financial losses incurred directly
or indirectly from the use of this library or any scripts
derived from it.
wSma(source, weight, length)
Weighted Simple Moving Average (linear kernel).
Parameters:
source (float) : series float Data to average.
weight (float) : series float Weight series.
length (int) : series int Look-back length ≥ 1.
Returns: series float Linear-kernel weighted mean; falls back to
the arithmetic mean if Σweight = 0.
wEma(source, weight, length)
Weighted EMA (exponential kernel).
Parameters:
source (float) : series float Data to average.
weight (float) : series float Weight series.
length (simple int) : simple int Look-back length ≥ 1.
Returns: series float Exponential-kernel weighted mean; falls
back to classic EMA if Σweight = 0.
wWma(source, weight, length)
Weighted WMA (linear kernel).
Parameters:
source (float) : series float Data to average.
weight (float) : series float Weight series.
length (int) : series int Look-back length ≥ 1.
Returns: series float Linear-kernel weighted mean; falls back to
classic WMA if Σweight = 0.
wRma(source, weight, length)
Weighted RMA (Wilder kernel, α = 1/len).
Parameters:
source (float) : series float Data to average.
weight (float) : series float Weight series.
length (simple int) : simple int Look-back length ≥ 1.
Returns: series float Wilder-kernel weighted mean; falls back to
classic RMA if Σweight = 0.
wHma(source, weight, length)
Weighted HMA (linear kernel).
Parameters:
source (float) : series float Data to average.
weight (float) : series float Weight series.
length (int) : series int Look-back length ≥ 1.
Returns: series float Linear-kernel weighted mean; falls back to
classic HMA if Σweight = 0.
wRsi(source, weight, length)
Weighted Relative Strength Index.
Parameters:
source (float) : series float Price series.
weight (float) : series float Weight series.
length (simple int) : simple int Look-back length ≥ 1.
Returns: series float Weighted RSI; uniform if Σw = 0.
wAtr(tr, weight, length)
Weighted ATR (Average True Range).
Implemented as WRMA on *true range*.
Parameters:
tr (float) : series float True Range series.
weight (float) : series float Weight series.
length (simple int) : simple int Look-back length ≥ 1.
Returns: series float Weighted ATR; uniform weights if Σw = 0.
wTr(tr, weight, length)
Weighted True Range over a window.
Parameters:
tr (float) : series float True Range series.
weight (float) : series float Weight series.
length (int) : series int Look-back length ≥ 1.
Returns: series float Weighted mean of TR; uniform if Σw = 0.
wR(r, weight, length)
Weighted High-Low Range over a window.
Parameters:
r (float) : series float High-Low per bar.
weight (float) : series float Weight series.
length (int) : series int Look-back length ≥ 1.
Returns: series float Weighted mean of range; uniform if Σw = 0.
wBtwVar(source, weight, length, biased)
Weighted Between Variance (biased/unbiased).
Parameters:
source (float) : series float Data series.
weight (float) : series float Weight series.
length (int) : series int Look-back length ≥ 2.
biased (bool) : series bool true → population (biased); false → sample.
Returns:
variance series float The calculated between-bar variance (σ²btw), either biased or unbiased.
sumW series float The sum of weights over the lookback period (Σw).
sumW2 series float The sum of squared weights over the lookback period (Σw²).
wBtwStdDev(source, weight, length, biased)
Weighted Between Standard Deviation.
Parameters:
source (float) : series float Data series.
weight (float) : series float Weight series.
length (int) : series int Look-back length ≥ 2.
biased (bool) : series bool true → population (biased); false → sample.
Returns: series float σbtw uniform if Σw = 0.
wBtwStdErr(source, weight, length, biased)
Weighted Between Standard Error.
Parameters:
source (float) : series float Data series.
weight (float) : series float Weight series.
length (int) : series int Look-back length ≥ 2.
biased (bool) : series bool true → population (biased); false → sample.
Returns: series float √(σ²btw / N_eff) uniform if Σw = 0.
wTotVar(mu, sigma, weight, length, biased)
Weighted Total Variance (= between-group + within-group).
Useful when each bar represents an aggregate with its own
mean* and pre-estimated σ (e.g., second-level ranges inside a
1-minute bar). Assumes the *weight* series applies to both the
group means and their σ estimates.
Parameters:
mu (float) : series float Group means (e.g., HL2 of 1-second bars).
sigma (float) : series float Pre-estimated σ of each group (same basis).
weight (float) : series float Weight series (volume, ticks, …).
length (int) : series int Look-back length ≥ 2.
biased (bool) : series bool true → population (biased); false → sample.
Returns:
varBtw series float The between-bar variance component (σ²btw).
varWtn series float The within-bar variance component (σ²wtn).
sumW series float The sum of weights over the lookback period (Σw).
sumW2 series float The sum of squared weights over the lookback period (Σw²).
wTotStdDev(mu, sigma, weight, length, biased)
Weighted Total Standard Deviation.
Parameters:
mu (float) : series float Group means (e.g., HL2 of 1-second bars).
sigma (float) : series float Pre-estimated σ of each group (same basis).
weight (float) : series float Weight series (volume, ticks, …).
length (int) : series int Look-back length ≥ 2.
biased (bool) : series bool true → population (biased); false → sample.
Returns: series float σtot.
wTotStdErr(mu, sigma, weight, length, biased)
Weighted Total Standard Error.
SE = √( total variance / N_eff ) with the same effective sample
size logic as `wster()`.
Parameters:
mu (float) : series float Group means (e.g., HL2 of 1-second bars).
sigma (float) : series float Pre-estimated σ of each group (same basis).
weight (float) : series float Weight series (volume, ticks, …).
length (int) : series int Look-back length ≥ 2.
biased (bool) : series bool true → population (biased); false → sample.
Returns: series float √(σ²tot / N_eff).
wLinReg(source, weight, length)
Weighted Linear Regression.
Parameters:
source (float) : series float Data series.
weight (float) : series float Weight series.
length (int) : series int Look-back length ≥ 2.
Returns:
mid series float The estimated value of the regression line at the most recent bar.
slope series float The slope of the regression line.
intercept series float The intercept of the regression line.
wResVar(source, weight, midLine, slope, length, biased)
Weighted Residual Variance.
linear regression – optionally biased (population) or
unbiased (sample).
Parameters:
source (float) : series float Data series.
weight (float) : series float Weighting series (volume, etc.).
midLine (float) : series float Regression value at the last bar.
slope (float) : series float Slope per bar.
length (int) : series int Look-back length ≥ 2.
biased (bool) : series bool true → population variance (σ²_P), denominator ≈ N_eff.
false → sample variance (σ²_S), denominator ≈ N_eff - 2.
(Adjusts for 2 degrees of freedom lost to the regression).
Returns:
variance series float The calculated residual variance (σ²res), either biased or unbiased.
sumW series float The sum of weights over the lookback period (Σw).
sumW2 series float The sum of squared weights over the lookback period (Σw²).
wResStdDev(source, weight, midLine, slope, length, biased)
Weighted Residual Standard Deviation.
Parameters:
source (float) : series float Data series.
weight (float) : series float Weight series.
midLine (float) : series float Regression value at the last bar.
slope (float) : series float Slope per bar.
length (int) : series int Look-back length ≥ 2.
biased (bool) : series bool true → population (biased); false → sample.
Returns: series float σres; uniform if Σw = 0.
wResStdErr(source, weight, midLine, slope, length, biased)
Weighted Residual Standard Error.
Parameters:
source (float) : series float Data series.
weight (float) : series float Weight series.
midLine (float) : series float Regression value at the last bar.
slope (float) : series float Slope per bar.
length (int) : series int Look-back length ≥ 2.
biased (bool) : series bool true → population (biased); false → sample.
Returns: series float √(σ²res / N_eff); uniform if Σw = 0.
wLRTotVar(mu, sigma, weight, midLine, slope, length, biased)
Weighted Linear-Regression Total Variance **around the
window’s weighted mean μ**.
σ²_tot = E_w ⟶ *within-group variance*
+ Var_w ⟶ *residual variance*
+ Var_w ⟶ *trend variance*
where each bar i in the look-back window contributes
m_i = *mean* (e.g. 1-sec HL2)
σ_i = *sigma* (pre-estimated intrabar σ)
w_i = *weight* (volume, ticks, …)
ŷ_i = b₀ + b₁·x (value of the weighted LR line)
r_i = m_i − ŷ_i (orthogonal residual)
Parameters:
mu (float) : series float Per-bar mean m_i.
sigma (float) : series float Pre-estimated σ_i of each bar.
weight (float) : series float Weight series w_i (≥ 0).
midLine (float) : series float Regression value at the latest bar (ŷₙ₋₁).
slope (float) : series float Slope b₁ of the regression line.
length (int) : series int Look-back length ≥ 2.
biased (bool) : series bool true → population; false → sample.
Returns:
varRes series float The residual variance component (σ²res).
varWtn series float The within-bar variance component (σ²wtn).
varTrd series float The trend variance component (σ²trd), explained by the linear regression.
sumW series float The sum of weights over the lookback period (Σw).
sumW2 series float The sum of squared weights over the lookback period (Σw²).
wLRTotStdDev(mu, sigma, weight, midLine, slope, length, biased)
Weighted Linear-Regression Total Standard Deviation.
Parameters:
mu (float) : series float Per-bar mean m_i.
sigma (float) : series float Pre-estimated σ_i of each bar.
weight (float) : series float Weight series w_i (≥ 0).
midLine (float) : series float Regression value at the latest bar (ŷₙ₋₁).
slope (float) : series float Slope b₁ of the regression line.
length (int) : series int Look-back length ≥ 2.
biased (bool) : series bool true → population; false → sample.
Returns: series float √(σ²tot).
wLRTotStdErr(mu, sigma, weight, midLine, slope, length, biased)
Weighted Linear-Regression Total Standard Error.
SE = √( σ²_tot / N_eff ) with N_eff = Σw² / Σw² (like in wster()).
Parameters:
mu (float) : series float Per-bar mean m_i.
sigma (float) : series float Pre-estimated σ_i of each bar.
weight (float) : series float Weight series w_i (≥ 0).
midLine (float) : series float Regression value at the latest bar (ŷₙ₋₁).
slope (float) : series float Slope b₁ of the regression line.
length (int) : series int Look-back length ≥ 2.
biased (bool) : series bool true → population; false → sample.
Returns: series float √((σ²res, σ²wtn, σ²trd) / N_eff).
wLRLocTotStdDev(mu, sigma, weight, midLine, slope, length, biased)
Weighted Linear-Regression Local Total Standard Deviation.
Measures the total "noise" (within-bar + residual) around the trend.
Parameters:
mu (float) : series float Per-bar mean m_i.
sigma (float) : series float Pre-estimated σ_i of each bar.
weight (float) : series float Weight series w_i (≥ 0).
midLine (float) : series float Regression value at the latest bar (ŷₙ₋₁).
slope (float) : series float Slope b₁ of the regression line.
length (int) : series int Look-back length ≥ 2.
biased (bool) : series bool true → population; false → sample.
Returns: series float √(σ²wtn + σ²res).
wLRLocTotStdErr(mu, sigma, weight, midLine, slope, length, biased)
Weighted Linear-Regression Local Total Standard Error.
Parameters:
mu (float) : series float Per-bar mean m_i.
sigma (float) : series float Pre-estimated σ_i of each bar.
weight (float) : series float Weight series w_i (≥ 0).
midLine (float) : series float Regression value at the latest bar (ŷₙ₋₁).
slope (float) : series float Slope b₁ of the regression line.
length (int) : series int Look-back length ≥ 2.
biased (bool) : series bool true → population; false → sample.
Returns: series float √((σ²wtn + σ²res) / N_eff).
wLSma(source, weight, length)
Weighted Least Square Moving Average.
Parameters:
source (float) : series float Data series.
weight (float) : series float Weight series.
length (int) : series int Look-back length ≥ 2.
Returns: series float Least square weighted mean. Falls back
to unweighted regression if Σw = 0.
Crypto Index Price# Crypto Index Price - Indicator Description
## 📊 What is this indicator?
**Crypto Index Price** is an indicator for creating your own cryptocurrency index based on an equal-weighted portfolio. It allows you to track the overall dynamics of the cryptocurrency market through a composite index of selected assets.
## 🎯 Key Features
- **Up to 20 assets in the index** — create an index from any trading pairs
- **Equal-weighted methodology** — each asset has the same weight in the index
- **Moving average** — optional trend filter for the index
- **Flexible visualization settings** — customizable colors and line thickness
## 📈 How to Use
The indicator is displayed in a separate pane below the chart and shows:
1. **Blue line** — crypto index value
2. **Orange line** (optional) — moving average of the index
### Trading Applications:
- **Identify overall market trend** — if the index is rising, most coins are in an uptrend
- **Divergences** — divergence between your asset and the index may signal local opportunities
- **Signal confirmation** — use the index to confirm trading decisions on individual coins
- **Market condition filter** — trade longs when index is above MA, shorts when below
## ⚙️ Settings
### Assets (Symbols)
- **Asset 1-10** — main cryptocurrencies (default: BTC, ETH, BNB, SOL, XRP, ADA, AVAX, LINK, DOGE, TRX)
- **Asset 11-20** — additional slots for index expansion
### Visual Parameters
- **Index line color** — main line color (default: blue)
- **Line width** — from 1 to 5 pixels
- **Show moving average** — enable/disable MA
- **MA period** — moving average calculation period (default: 20)
- **MA color** — moving average line color (default: orange)
## 💡 Recommendations
- For a top coins index, use 5-10 largest cryptocurrencies by market cap
- For an altcoin index, add medium and small coins from your sector
- Use MA to filter false signals and identify the global trend
- Compare individual asset behavior with the index to find anomalies
## ⚠️ Important
The indicator uses equal-weighted methodology — each coin contributes equally regardless of price or market cap. This differs from cap-weighted indices and may provide a different market perspective.
---
*This indicator is intended for analysis and is not trading advice. Always conduct your own analysis before making trading decisions.*
---
VWAP Entry Assistant (v1.0)Description:
Anchored VWAP with a lightweight assistant for VWAP reversion trades.
It shows the distance to VWAP, an estimated hit probability for the current bar, the expected number of bars to reach VWAP, and a recommended entry price.
If the chance of touching VWAP is low, the script suggests an adjusted limit using a fraction of ATR.
The VWAP line is white by default, and a compact summary table appears at the bottom-left.
Educational tool. Not financial advice. Not affiliated with TradingView or any exchange. Always backtest before use.
VWAP Daily/Weekly/Monthly - Automatic AnchoredExplanation:
This script plots Volume-Weighted Average Price (VWAP) lines that are automatically anchored to the beginning of key timeframes — daily, weekly, and monthly. VWAP is a widely used trading indicator that shows the average price of an asset weighted by trading volume, making it useful for identifying fair value and institutional trading levels.
The “automatic anchored” feature means that you don’t have to manually select starting points. Instead, the script automatically resets the VWAP at the start of each day, week, or month, depending on the chosen setting. This ensures the VWAP always reflects the true average price for that period, providing traders with a consistent reference for support, resistance, and trend direction across multiple timeframes.
Notice:
On the chart, you may notice visible “jumps” in the VWAP lines. These are intentional. Each jump marks the reset point at the start of a new day, week, or month, depending on the selected setting. This design keeps the VWAP history from the previous period intact, allowing you to clearly see how price interacted with VWAP in past sessions.
By keeping these historical resets, you can easily compare short-term (daily) VWAP behavior against longer-term levels like weekly and monthly VWAP. This provides valuable context, helping you spot when price respects or diverges from fair value across different timeframes.
In short:
Daily VWAP resets at the start of each trading day.
Weekly VWAP resets at the beginning of each trading week.
Monthly VWAP resets at the start of each month.
This makes it easy to analyze how price interacts with VWAP levels across different time horizons without manual adjustments.
Volume Weighted EMAsIt's a script to calculate the volume weighted moving averages using exponential moving averages such as EMA, DEMA and TEMA instead of the pre-existing VWMA which uses SMA to calculate it.
Note: works only with charts that have volume data present, obviously !!!
OBVX Conviction Bias🧮 The OBVX Conviction Bias overlay tracks the flow of directional volume using the classic On-Balance Volume calculation, then filters it through a layered moving average system to expose crowd commitment , pressure transitions , and momentum fatigue . The tool applies two smoothed averages to the OBV line—a fast curve and a longer-term baseline scaled using Euler’s constant (2.718)—and visualizes their relationship using a color-coded crossover ribbon and pressure fills. When used correctly, it reveals whether a move is being supported by meaningful volume, or whether the crowd is starting to disengage.
🚦 The core signal compares OBV to its fast moving average. When OBV climbs above the short average, it fills green—suggesting real directional effort. When OBV sinks below, the fill turns maroon—flagging fading conviction or pullback potential. A second fill between the short and long OBV moving averages captures the broader trend of volume intention. If the short is above the long, this space fills greenish, showing constructive pressure. If it flips, the fill fades red, signaling crowd hesitation, rotation, or early exhaustion.
⚖️ All smoothing is user-selectable, defaulting to VWMA for effort-sensitive structure. The long-term average is auto-scaled using the natural exponential multiplier (2.718), offering rhythm that reflects the curve of participation. OBVX Conviction Bias isn’t trying to predict—it’s trying to show you where the crowd is leaning , and whether that lean is gaining traction or losing strength.
🧐 Ideal Use-Cases:
• Detect divergence between volume flow and price action
• Confirm breakout validity with volume alignment
• Fade breakouts where OBV fails to follow through
• Time pullback entries when OBV pressure resumes in trend direction
🍷 Recommended Pairings:
• ZVOL to measure whether volume is statistically significant or just noise (as shown)
• RVOL Effort Matrix to validate crowd effort by tier and structure zone
• SUPeR TReND 2.718 and/or MA Ribbons for directional confluence
• ATR Turbulence to track volatility-phase alignment with volume intention
TradFi Fundamentals: Enhanced Macroeconomic Momentum Trading Introduction
The "Enhanced Momentum with Advanced Normalization and Smoothing" indicator is a tool that combines traditional price momentum with a broad range of macroeconomic factors. I introduced the basic version from a research paper in my last script. This one leverages not only the price action of a security but also incorporates key economic data—such as GDP, inflation, unemployment, interest rates, consumer confidence, industrial production, and market volatility (VIX)—to create a comprehensive, normalized momentum score.
Previous indicator
Explanation
In plain terms, the indicator calculates a raw momentum value based on the change in price over a defined lookback period. It then normalizes this momentum, along with several economic indicators, using a method chosen by the user (options include simple, exponential, or weighted moving averages, as well as a median absolute deviation (MAD) approach). Each normalized component is assigned a weight reflecting its relative importance, and these weighted values are summed to produce an overall momentum score.
To reduce noise, the combined momentum score can be further smoothed using a user-selected method.
Signals
For generating trade signals, the indicator offers two modes:
Zero Cross Mode: Signals occur when the smoothed momentum line crosses the zero threshold.
Zone Mode: Overbought and oversold boundaries (which are user defined) provide signals when the momentum line crosses these preset limits.
Definition of the Settings
Price Momentum Settings:
Price Momentum Lookback: The number of days used to compute the percentage change in price (default 50 days).
Normalization Period (Price Momentum): The period over which the price momentum is normalized (default 200 days).
Economic Data Settings:
Normalization Period (Economic Data): The period used to normalize all economic indicators (default 200 days).
Normalization Method: Choose among SMA, EMA, WMA, or MAD to standardize both price and economic data. If MAD is chosen, a multiplier factor is applied (default is 1.4826).
Smoothing Options:
Apply Smoothing: A toggle to enable further smoothing of the combined momentum score.
Smoothing Period & Method: Define the period and type (SMA, EMA, or WMA) used to smooth the final momentum score.
Signal Generation Settings:
Signal Mode: Select whether signals are based on a zero-line crossover or by crossing user-defined overbought/oversold (OB/OS) zones.
OB/OS Zones: Define the upper and lower boundaries (default upper zones at 1.0 and 2.0, lower zones at -1.0 and -2.0) for zone-based signals.
Weights:
Each component (price momentum, GDP, inflation, unemployment, interest rates, consumer confidence, industrial production, and VIX) has an associated weight that determines its contribution to the overall score. These can be adjusted to reflect different market views or risk preferences.
Visual Aspects
The indicator plots the smoothed combined momentum score as a continuous blue line against a dotted zero-line reference. If the Zone signal mode is selected, the indicator also displays the upper and lower OB/OS boundaries as horizontal lines (red for overbought and green for oversold). Buy and sell signals are marked by small labels ("B" for buy and "S" for sell) that appear at the bottom or top of the chart when the score crosses the defined thresholds, allowing traders to quickly identify potential entry or exit points.
Conclusion
This enhanced indicator provides traders with a robust approach to momentum trading by integrating traditional price-based signals with a suite of macroeconomic indicators. Its normalization and smoothing techniques help reduce noise and mitigate the effects of outliers, while the flexible signal generation modes offer multiple ways to interpret market conditions. Overall, this tool is designed to deliver a more nuanced perspective on market momentum.
TradFi Fundamentals: Momentum Trading with Macroeconomic DataIntroduction
This indicator combines traditional price momentum with key macroeconomic data. By retrieving GDP, inflation, unemployment, and interest rates using security calls, the script automatically adapts to the latest economic data. The goal is to blend technical analysis with fundamental insights to generate a more robust momentum signal.
Original Research Paper by Mohit Apte, B. Tech Scholar, Department of Computer Science and Engineering, COEP Technological University, Pune, India
Link to paper
Explanation
Price Momentum Calculation:
The indicator computes price momentum as the percentage change in price over a configurable lookback period (default is 50 days). This raw momentum is then normalized using a rolling simple moving average and standard deviation over a defined period (default 200 days) to ensure comparability with the economic indicators.
Fetching and Normalizing Economic Data:
Instead of manually inputting economic values, the script uses TradingView’s security function to retrieve:
GDP from ticker "GDP"
Inflation (CPI) from ticker "USCCPI"
Unemployment rate from ticker "UNRATE"
Interest rates from ticker "USINTR"
Each series is normalized over a configurable normalization period (default 200 days) by subtracting its moving average and dividing by its standard deviation. This standardization converts each economic indicator into a z-score for direct integration into the momentum score.
Combined Momentum Score:
The normalized price momentum and economic indicators are each multiplied by user-defined weights (default: 50% price momentum, 20% GDP, and 10% each for inflation, unemployment, and interest rates). The weighted components are then summed to form a comprehensive momentum score. A horizontal zero line is plotted for reference.
Trading Signals:
Buy signals are generated when the combined momentum score crosses above zero, and sell signals occur when it crosses below zero. Visual markers are added to the chart to assist with trade timing, and alert conditions are provided for automated notifications.
Settings
Price Momentum Lookback: Defines the period (in days) used to compute the raw price momentum.
Normalization Period for Price Momentum: Sets the window over which the price momentum is normalized.
Normalization Period for Economic Data: Sets the window over which each macroeconomic series is normalized.
Weights: Adjust the influence of each component (price momentum, GDP, inflation, unemployment, and interest rate) on the overall momentum score.
Conclusion
This implementation leverages TradingView’s economic data feeds to integrate real-time macroeconomic data into a momentum trading strategy. By normalizing and weighting both technical and economic inputs, the indicator offers traders a more holistic view of market conditions. The enhanced momentum signal provides additional context to traditional momentum analysis, potentially leading to more informed trading decisions and improved risk management.
The next script I release will be an improved version of this that I have added my own flavor to, improving the signals.
TrendMasterPro_FekonomiTrend Change and Start Signals with Weighted Conditions
The Trend Change and Start Signals with Weighted Conditions indicator leverages various technical analysis tools to generate reliable buy and sell signals. This indicator helps investors more accurately identify trend changes and start signals in the market.
Features:
Utilizes popular technical analysis tools such as MACD, RSI, EMA, and Ichimoku Cloud.
Enhances signal accuracy with additional indicators like ADX and Volume Increase.
Allows users to adjust the weights of each condition to set their importance.
The Confidence Level parameter lets you adjust the accuracy rate of the signals.
Visual Signals make it easy to track buy and sell points directly on the chart.
How It Works:
Condition Weights: Users assign weights to indicators like MACD, RSI, EMA, and Ichimoku Cloud. If you have no idea, use default settings.
Condition Fulfillment: Checks if the conditions for each indicator are met.
Confidence Level: The total weight of the fulfilled conditions must exceed the user-defined confidence level.
Signal Generation: When these conditions are met, a buy or sell signal is generated and visually displayed on the chart.
Customization:
Personalize Signals: By adjusting the weights of the indicators used, you can personalize the signals to match your trading strategy and preferences.
Use Cases:
Short-Term Investments: Identify quick trend changes for short-term trading decisions.
Long-Term Investments: Detect long-term trend starts and changes for strategic investment decisions.
Technical Analysis: Combine different technical analysis tools for more comprehensive and reliable analyses.
With this indicator, you can better understand market movements and make more informed investment decisions. Try it now and enhance your trading strategy!
by Fekonomi






















