OPEN-SOURCE SCRIPT

Volume/Z-Score Filtered Triple Regressions

439
Volume/Z-Score Filtered Triple Regressions

This indicator blends three regression techniques—Linear Regression, Ridge Regression, and Lasso Regression—to deliver a robust, multi-dimensional view of market trends.

Key Features
Triple Regression Analysis:

  • Linear Regression: Uses TradingView’s built-in linear regression over a configurable lookback period.
  • Ridge Regression: Applies a penalty term with centering to stabilize slope estimates.
  • Lasso Regression: Incorporates soft-thresholding to refine the regression by reducing noise.
  • Voting Mechanism:
    Each regression “votes” bullish or bearish by comparing its value to the current close. A majority vote (at least two out of three) determines the preliminary market bias.


Z-Score Filtering:
The indicator calculates the average of the three regression values and derives a residual Z-score (based on standard deviation). Only when the absolute Z-score exceeds a user-defined threshold does it permit a trend change, helping filter out minor price fluctuations.

Volume Confirmation:
A moving average of volume (with multiple MA options available) is compared against current volume using a multiplier. This ensures that trend changes are supported by sufficient market activity.

Enhanced Visuals:
Dynamic color schemes for regression lines, the average trend line, and even candle colors help visually distinguish bullish and bearish signals. A gradient background further reinforces the current trend, adapting its transparency based on the strength of the Z-score.

Disclaimer
Disclaimer: This indicator is provided for educational and informational purposes only and does not constitute investment advice. Trading involves risk and may result in financial loss. Always perform your own research and consult with a qualified financial advisor before making any trading decisions.

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.