OPEN-SOURCE SCRIPT

Outlier changes alert

By icostan
An indicator that calculates click (price change), percentage change, and Z-score changes while displaying outliers based on defined ranges.

Outlier Detection:
Mark outliers (for price, percentage, Z-score) based on user-defined thresholds. For example, any price movement exceeding a certain Z-score or percentage change could be marked as an outlier and displayed on chart.

Indicator Overview:
1. Click (Price Change):
Calculate the absolute price change from one period to another (e.g., from the current closing price to the previous closing price).
2. Percentage Change:
Calculate the percentage price change over a specific period, showing how much the price has changed in relative terms compared to the previous price.
3. Z-Score:
Compute the Z-score to standardize the price change relative to its historical average and standard deviation. The Z-score helps in detecting whether a price movement is an outlier or falls within a normal range of volatility.


alertalertsignalsoutlieroutlier_detectorpercentagechangepricechangeRate of Change (ROC)Standard Deviationzscore

Open-source script

In true TradingView spirit, the author of this script has published it open-source, so traders can understand and verify it. Cheers to the author! You may use it for free, but reuse of this code in publication is governed by House rules. You can favorite it to use it on a chart.

Want to use this script on a chart?

Disclaimer