INVITE-ONLY SCRIPT

Z-score filter Daily/Weekly

20
indicator identifies potential buy and sell signals based on price deviations from a linear regression line. Here's what it does:

Calculates a linear regression line with customizable length (default 21) and offset (default 30)
Computes a z-score by measuring how many standard deviations the current price is from the regression line
Generates signals when:

A "buy" signal occurs when the z-score crosses above a lower threshold (default -4.7), indicating the price was deeply undervalued but is now recovering
A "sell" signal occurs when the z-score crosses below an upper threshold (default 5.1), indicating the price was extremely overvalued but is now declining



The indicator displays triangles with "BUY" or "SELL" text when signals occur, and shows the linear regression line in blue (which can be toggled off). It can operate on either daily or weekly timeframes based on user selection, with corresponding alerts that can be configured.
This indicator essentially identifies potential reversal points when price has moved too far away from its statistical "fair value" as defined by the regression line, making it useful for mean-reversion trading strategies.

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.