OPEN-SOURCE SCRIPT

Gabriel's Weibull Stdv. SuperTrend

576
📈 Gabriel's Weibull Stdv. SuperTrend
Description:
Gabriel’s Weibull Stdv. SuperTrend is a custom trend-following indicator that blends the statistical rigor of the Weibull Moving Average with the adaptive nature of the Standard Deviation-based SuperTrend.

This hybrid system dynamically adjusts its trend bands using a Weibull-weighted average, emphasizing more recent price action while allowing the curve to flexibly adapt based on two key Weibull parameters: Shape (k) and Scale (λ). The bands themselves are shifted by a multiple of standard deviation, offering a volatility-sensitive approach to trend detection.

🔧 Key Components:
Weibull Moving Average (WMA):
A smoothing function that assigns weights to historical prices using the Weibull distribution, controlled via Shape and Scale parameters.

SuperTrend Logic with Adaptive Bands:
Standard deviation is calculated over a user-defined length and scaled with a factor to set upper and lower thresholds around the WMA.

Trend Direction Detection:
The algorithm identifies bullish or bearish states based on crossover logic relative to the dynamic bands.

Visual Enhancements:

Bright green/red lines for SuperTrend direction.

Midpoint overlay and color-coded candles for clarity.

Filled zones between price and trend for visual emphasis.

⚙️ User Inputs:
Source: Price data to analyze (default: close).

Stdv. Length: Period for calculating standard deviation.

Factor: Multiplier to widen or narrow the SuperTrend bands.

Window Length: Lookback period for the Weibull MA.

Shape (k): Controls the skewness of the Weibull distribution.

Scale (λ): Stretches or compresses the weighting curve.

🔔 Alerts:
Long Entry Alert: Triggered when the trend flips bullish.

Short Entry Alert: Triggered when the trend flips bearish.

🧠 Use Cases:
Catch early reversals using custom-tailored smoothing.

Identify high-confidence trend shifts with dynamic volatility.

Combine with other confirmation indicators for enhanced entries.

Penafian

Maklumat dan penerbitan adalah tidak dimaksudkan untuk menjadi, dan tidak membentuk, nasihat untuk kewangan, pelaburan, perdagangan dan jenis-jenis lain atau cadangan yang dibekalkan atau disahkan oleh TradingView. Baca dengan lebih lanjut di Terma Penggunaan.