OPEN-SOURCE SCRIPT
已更新 Student-t Weighted Acceleration & Velocity

⚙️ Student-t Weighted Acceleration & Velocity
Author: © GabrielAmadeusLau
Category: Momentum, Smoothing, Divergence Detection
🔍 Overview
Student-t Weighted Acceleration & Velocity is a precision-engineered momentum indicator designed to analyze the rate of price change (velocity) and rate of change of velocity (acceleration). It leverages Student-t weighted smoothing, bandpass filtering, and divergence detection to reveal underlying momentum trends, shifts, and potential reversals with high sensitivity and low noise.
🧠 Key Features
🌀 1. Student-t Weighted Moving Average
Applies Student-t distribution weights to price data.
Controlled by:
ν (Degrees of Freedom): Lower ν increases weight on recent data, improving sensitivity to fast-moving markets.
Window Length: Sets the lookback period for weighted averaging.
🚀 2. Velocity & Acceleration Calculation
Velocity: Measures how fast price is moving over time.
Acceleration: Measures the change in velocity, revealing turning points.
Both are calculated via:
Butterworth High-pass Filter
Super Smoother Low-pass Filter
Fast Root Mean Square (RMS) normalization
Optionally smoothed using a Super Smoother EMA.
🎯 3. Signal Conditions
Strong Up: When smoothed velocity crosses above the overbought threshold and acceleration is positive.
Strong Down: When smoothed velocity crosses below the oversold threshold and acceleration is negative.
Visual cues:
Green & red triangle shapes for signals.
Colored histogram & column plots.
Optional bar coloring based on A/V behavior.
🔎 4. Divergence Detection Engine
Built-in multi-timeframe divergence system with:
Bullish/Bearish Regular Divergence
Bullish/Bearish Hidden Divergence
Customizable settings:
Pivot detection, confirmation logic, lookback limits.
Heikin Ashi mode for smoothed divergence detection.
Configurable line style, width, and color.
Visual plots of divergence lines on price chart.
⚙️ Custom Inputs
A/V Calculation Parameters:
Lookback period, filter lengths (Butterworth, Super Smoother, RMS), EMA smoothing.
Divergence Settings:
Enable/disable confirmation, show last divergence only.
Adjustable pivot period and max lookback bars.
Heikin Ashi Mode:
Option to use Heikin Ashi candles for divergence detection only (without switching chart type).
Thresholds:
Overbought/Oversold Sigma levels for strong signal detection.
🔔 Alerts Included
Strong Up Alert: Momentum and acceleration aligned bullishly.
Strong Down Alert: Momentum and acceleration aligned bearishly.
All Divergence Types:
Bullish/Bearish Regular Divergence
Bullish/Bearish Hidden Divergence
Aggregated Divergence Alerts
📌 Use Cases
Spot momentum bursts and reversals with confirmation from both velocity and acceleration.
Identify divergence-based signals for early entries/exits.
Apply across multiple timeframes or pair with other trend filters.
Author: © GabrielAmadeusLau
Category: Momentum, Smoothing, Divergence Detection
🔍 Overview
Student-t Weighted Acceleration & Velocity is a precision-engineered momentum indicator designed to analyze the rate of price change (velocity) and rate of change of velocity (acceleration). It leverages Student-t weighted smoothing, bandpass filtering, and divergence detection to reveal underlying momentum trends, shifts, and potential reversals with high sensitivity and low noise.
🧠 Key Features
🌀 1. Student-t Weighted Moving Average
Applies Student-t distribution weights to price data.
Controlled by:
ν (Degrees of Freedom): Lower ν increases weight on recent data, improving sensitivity to fast-moving markets.
Window Length: Sets the lookback period for weighted averaging.
🚀 2. Velocity & Acceleration Calculation
Velocity: Measures how fast price is moving over time.
Acceleration: Measures the change in velocity, revealing turning points.
Both are calculated via:
Butterworth High-pass Filter
Super Smoother Low-pass Filter
Fast Root Mean Square (RMS) normalization
Optionally smoothed using a Super Smoother EMA.
🎯 3. Signal Conditions
Strong Up: When smoothed velocity crosses above the overbought threshold and acceleration is positive.
Strong Down: When smoothed velocity crosses below the oversold threshold and acceleration is negative.
Visual cues:
Green & red triangle shapes for signals.
Colored histogram & column plots.
Optional bar coloring based on A/V behavior.
🔎 4. Divergence Detection Engine
Built-in multi-timeframe divergence system with:
Bullish/Bearish Regular Divergence
Bullish/Bearish Hidden Divergence
Customizable settings:
Pivot detection, confirmation logic, lookback limits.
Heikin Ashi mode for smoothed divergence detection.
Configurable line style, width, and color.
Visual plots of divergence lines on price chart.
⚙️ Custom Inputs
A/V Calculation Parameters:
Lookback period, filter lengths (Butterworth, Super Smoother, RMS), EMA smoothing.
Divergence Settings:
Enable/disable confirmation, show last divergence only.
Adjustable pivot period and max lookback bars.
Heikin Ashi Mode:
Option to use Heikin Ashi candles for divergence detection only (without switching chart type).
Thresholds:
Overbought/Oversold Sigma levels for strong signal detection.
🔔 Alerts Included
Strong Up Alert: Momentum and acceleration aligned bullishly.
Strong Down Alert: Momentum and acceleration aligned bearishly.
All Divergence Types:
Bullish/Bearish Regular Divergence
Bullish/Bearish Hidden Divergence
Aggregated Divergence Alerts
📌 Use Cases
Spot momentum bursts and reversals with confirmation from both velocity and acceleration.
Identify divergence-based signals for early entries/exits.
Apply across multiple timeframes or pair with other trend filters.
發行說明
...開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
Gabriel Amadeus
The Real World - Stocks Campus:
Stocks, Options, Futures, Forex, Crypto, this is what we trade.
Learn profitable trading systems or build your own, just like I did.
jointherealworld.com/?a=f7jkjpg8kh
The Real World - Stocks Campus:
Stocks, Options, Futures, Forex, Crypto, this is what we trade.
Learn profitable trading systems or build your own, just like I did.
jointherealworld.com/?a=f7jkjpg8kh
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
Gabriel Amadeus
The Real World - Stocks Campus:
Stocks, Options, Futures, Forex, Crypto, this is what we trade.
Learn profitable trading systems or build your own, just like I did.
jointherealworld.com/?a=f7jkjpg8kh
The Real World - Stocks Campus:
Stocks, Options, Futures, Forex, Crypto, this is what we trade.
Learn profitable trading systems or build your own, just like I did.
jointherealworld.com/?a=f7jkjpg8kh
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。