OPEN-SOURCE SCRIPT
Volume-Weighted Money Flow [sgbpulse]

Overview
The VWMF indicator is an advanced technical analysis tool that combines and summarizes five leading momentum and volume indicators (OBV, PVT, A/D, CMF, MFI) into one clear oscillator. The indicator helps to provide a clear picture of market sentiment by measuring the pressure from buyers and sellers. Unlike single indicators, VWMF provides a comprehensive view of market money flow by weighting existing indicators and presenting them in a uniform and understandable format.
Indicator Components
VWMF combines the following indicators, each normalized to a range of 0 to 100 before being weighted:
Understanding the Normalized Oscillators
The indicator combines the five different momentum indicators by normalizing each one to a uniform range of 0 to 100.
Why is Normalization Important?
Indicators like OBV, PVT, and the A/D Line are cumulative indicators whose values can become very large. To assess their trend, we use a Moving Average as a dynamic reference line. The Moving Average allows us to understand whether the indicator is currently trending up or down relative to its average behavior over time.
How Does Normalization Work?
Our normalization fully preserves the original trend of each indicator.
Reference Line Settings:
The 50 line serves as the new "center line." This ensures that, even after normalization, the determination of whether a specific indicator supports a bullish or bearish trend remains clear.
Settings and Visual Tools
The indicator offers several customization options to provide a rich analysis experience:
Using the Data Window
TradingView provides a useful Data Window that allows you to see the exact numerical values of each normalized oscillator separately, in addition to the trend strength data.
You can use this window to:
The indicator's default setting is an equal weight of 20% for each of the five indicators.
Alert Conditions
The indicator comes with a variety of built-in alerts that can be configured through the TradingView alerts menu:
Summary
The VWMF indicator is a powerful, all-in-one tool for analyzing market momentum, money flow, and sentiment. By combining and normalizing five different indicators into a single oscillator, it offers a holistic and accurate view of the market's underlying trend. Its dynamic visual features and customizable settings, including the ability to adjust indicator weights, provide a flexible experience for both novice and experienced traders. The built-in alerts for momentum shifts and trend consensus make it an effective tool for spotting trading opportunities with confidence. In essence, VWMF distills complex market data into clear, actionable signals.
Important Note: Trading Risk
This indicator is intended for educational and informational purposes only and does not constitute investment advice or a recommendation for trading in any form whatsoever.
Trading in financial markets involves significant risk of capital loss. It is important to remember that past performance is not indicative of future results. All trading decisions are your sole responsibility. Never trade with money you cannot afford to lose.
The VWMF indicator is an advanced technical analysis tool that combines and summarizes five leading momentum and volume indicators (OBV, PVT, A/D, CMF, MFI) into one clear oscillator. The indicator helps to provide a clear picture of market sentiment by measuring the pressure from buyers and sellers. Unlike single indicators, VWMF provides a comprehensive view of market money flow by weighting existing indicators and presenting them in a uniform and understandable format.
Indicator Components
VWMF combines the following indicators, each normalized to a range of 0 to 100 before being weighted:
- On-Balance Volume (OBV): A cumulative indicator that measures positive and negative volume flow.
- Price-Volume Trend (PVT): Similar to OBV, but incorporates relative price change for a more precise measure.
- Accumulation/Distribution Line (A/D): Used to identify whether an asset is being bought (accumulated) or sold (distributed).
- Chaikin Money Flow (CMF): Measures the money flow over a period based on the close price's position relative to the candle's range.
- Money Flow Index (MFI): A momentum oscillator that combines price and volume to measure buying and selling pressure.
Understanding the Normalized Oscillators
The indicator combines the five different momentum indicators by normalizing each one to a uniform range of 0 to 100.
Why is Normalization Important?
Indicators like OBV, PVT, and the A/D Line are cumulative indicators whose values can become very large. To assess their trend, we use a Moving Average as a dynamic reference line. The Moving Average allows us to understand whether the indicator is currently trending up or down relative to its average behavior over time.
How Does Normalization Work?
Our normalization fully preserves the original trend of each indicator.
- For Cumulative Indicators (OBV, PVT, A/D): We calculate the difference between the current indicator value and its Moving Average. This difference is then passed to the normalization process.
- If the indicator is above its Moving Average, the difference will be positive, and the normalized value will be above 50.
- If the indicator is below its Moving Average, the difference will be negative, and the normalized value will be below 50. - Handling Extreme Values: To overcome the issue of extreme values in indicators like OBV, PVT, and the A/D Line, the function calculates the highest absolute value over the selected period. This value is used to prevent sharp spikes or drops in a single indicator from compromising the accuracy of the normalization over time. It's a sophisticated method that ensures the oscillators remain relevant and accurate.
- For Bounded Indicators (CMF, MFI): These indicators already operate within a known range (for example, CMF is between -1 and 1, and MFI is between 0 and 100), so they are normalized directly without an additional reference line.
Reference Line Settings:
- Moving Average Type: Allows the user to choose between a Simple Moving Average (SMA) and an Exponential Moving Average (EMA).
- Volume Flow MA Length: Allows the user to set the lookback period for the Moving Average, which affects the indicator's sensitivity.
The 50 line serves as the new "center line." This ensures that, even after normalization, the determination of whether a specific indicator supports a bullish or bearish trend remains clear.
Settings and Visual Tools
The indicator offers several customization options to provide a rich analysis experience:
- VWMF Oscillator (Blue Line): Represents the weighted average of all five indicators. Values above 50 indicate bullish momentum, and values below 50 indicate bearish momentum.
- Strength Metrics (Bullish/Bearish Strength %): Two metrics that appear on the status line, showing the percentage of indicators supporting the current trend. They range from 0% to 100%, providing a quick view of the strength of the consensus.
- Dynamic Background Colors: The background color of the chart automatically changes to bullish (a blue shade by default) or bearish (a default brown-gray shade) based on the trend. The transparency of the color shows the consensus strength—the more opaque the background, the more indicators support the trend.
- Advanced Settings:
- Background Color Logic: Allows the user to choose the trigger for the background color: Weighted Value (based on the combined oscillator) or Strength (based on the majority of individual indicators).
-Weights: Provides full control over the weight of each of the five indicators in the final oscillator.
Using the Data Window
TradingView provides a useful Data Window that allows you to see the exact numerical values of each normalized oscillator separately, in addition to the trend strength data.
You can use this window to:
- Get more detailed information on each indicator: Viewing the precise numerical data of each of the five indicators can help in making trading decisions.
- Calibrate weights: If you want to manually adjust the indicator weights (in the settings menu), you can do so while tracking the impact of each indicator on the weighted oscillator in the Data Window.
The indicator's default setting is an equal weight of 20% for each of the five indicators.
Alert Conditions
The indicator comes with a variety of built-in alerts that can be configured through the TradingView alerts menu:
- VWMF Cross Above 50: An alert when the VWMF oscillator crosses above the 50 line, indicating a potential bullish momentum shift.
- VWMF Cross Below 50: An alert when the VWMF oscillator crosses below the 50 line, indicating a potential bearish momentum shift.
- Bullish Strength: High But Not Absolute Consensus: An alert when the bullish trend strength reaches 60% or more but is less than 100%, indicating a high but not absolute consensus.
- Bullish Strength at 100%: An alert when all five indicators (MFI, OBV, PVT, A/D, CMF) show bullish strength, indicating a full and absolute consensus.
- Bearish Strength: High But Not Absolute Consensus: An alert when the bearish trend strength reaches 60% or more but is less than 100%, indicating a high but not absolute consensus.
- Bearish Strength at 100%: An alert when all five indicators (MFI, OBV, PVT, A/D, CMF) show bearish strength, indicating a full and absolute consensus.
Summary
The VWMF indicator is a powerful, all-in-one tool for analyzing market momentum, money flow, and sentiment. By combining and normalizing five different indicators into a single oscillator, it offers a holistic and accurate view of the market's underlying trend. Its dynamic visual features and customizable settings, including the ability to adjust indicator weights, provide a flexible experience for both novice and experienced traders. The built-in alerts for momentum shifts and trend consensus make it an effective tool for spotting trading opportunities with confidence. In essence, VWMF distills complex market data into clear, actionable signals.
Important Note: Trading Risk
This indicator is intended for educational and informational purposes only and does not constitute investment advice or a recommendation for trading in any form whatsoever.
Trading in financial markets involves significant risk of capital loss. It is important to remember that past performance is not indicative of future results. All trading decisions are your sole responsibility. Never trade with money you cannot afford to lose.
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。