OPEN-SOURCE SCRIPT
已更新 Volume-Weighted Trend Oscillator

The purpose of the Volume-Weighted Trend Oscillator (VWTO) indicator is to analyze both price movement and trading volume, along with the rate of change in price, to create a composite signal for tracking market trends. Below is a detailed breakdown of how it functions
VWTO Calc:
If the current close is higher, the volume is added.
If the current close is lower, the volume is subtracted.
This volume difference is summed over the orderFlowPeriod and normalized by dividing the result by 1000, resulting in the orderFlow value.
Rate of Change (ROC):
The rate of change in price (roc) is calculated over a user-defined period (lenr). This ROC measures the momentum of price movement.
Combined Oscillator Calculation:
The Volume-Weighted Trend Oscillator is computed by averaging the ROC and the volume-based trend flow: (roc + orderFlow) / 2.
An optional exponential moving average (ematrend) of this combined oscillator can be plotted if the user enables it.
The indicator changes color dynamically based on the direction of the trend:
If trendflow (the combined oscillator) is positive and increasing, it is colored green.
If it is negative and decreasing, it is colored red.
The colors allow users to quickly visualize whether the trend is strengthening or weakening.
Plotting:
The script generates several plots:
The trendflow value is plotted as a column-style chart with dynamic color changes that reflect the direction and strength of the trend.
The orderFlow (volume-based trend) is also plotted, colored green for positive values and red for negative values.
An optional exponential moving average of the trendflow can be plotted in white if the user chooses to display it.
The chart's candles are colored green or red depending on whether the order flow is positive or negative.
Also includes a robust tester to see if it's a good fit for your system, "BANGER" = good, "MEH" = not optimal.
Trend Signal Output:
The indicator produces a final signal (final) based on the direction of the orderFlow:
A value of 1 signifies a positive trend (bullish).
A value of -1 indicates a negative trend (bearish).
VWTO Calc:
If the current close is higher, the volume is added.
If the current close is lower, the volume is subtracted.
This volume difference is summed over the orderFlowPeriod and normalized by dividing the result by 1000, resulting in the orderFlow value.
Rate of Change (ROC):
The rate of change in price (roc) is calculated over a user-defined period (lenr). This ROC measures the momentum of price movement.
Combined Oscillator Calculation:
The Volume-Weighted Trend Oscillator is computed by averaging the ROC and the volume-based trend flow: (roc + orderFlow) / 2.
An optional exponential moving average (ematrend) of this combined oscillator can be plotted if the user enables it.
The indicator changes color dynamically based on the direction of the trend:
If trendflow (the combined oscillator) is positive and increasing, it is colored green.
If it is negative and decreasing, it is colored red.
The colors allow users to quickly visualize whether the trend is strengthening or weakening.
Plotting:
The script generates several plots:
The trendflow value is plotted as a column-style chart with dynamic color changes that reflect the direction and strength of the trend.
The orderFlow (volume-based trend) is also plotted, colored green for positive values and red for negative values.
An optional exponential moving average of the trendflow can be plotted in white if the user chooses to display it.
The chart's candles are colored green or red depending on whether the order flow is positive or negative.
Also includes a robust tester to see if it's a good fit for your system, "BANGER" = good, "MEH" = not optimal.
Trend Signal Output:
The indicator produces a final signal (final) based on the direction of the orderFlow:
A value of 1 signifies a positive trend (bullish).
A value of -1 indicates a negative trend (bearish).
版本注释
Quick fix开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。
开源脚本
本着TradingView的真正精神,此脚本的创建者将其开源,以便交易者可以查看和验证其功能。向作者致敬!虽然您可以免费使用它,但请记住,重新发布代码必须遵守我们的网站规则。
免责声明
这些信息和出版物并不意味着也不构成TradingView提供或认可的金融、投资、交易或其它类型的建议或背书。请在使用条款阅读更多信息。