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提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。