OPEN-SOURCE SCRIPT
Price Deviation from SMA/EMA with % Threshold Highlight

Select between SMA or EMA.
Adjustable length (default is 20).
Visual deviation band from price.
Plot of absolute deviation on a separate line.
Adding a threshold input. The threshold input is in percentage (%), e.g., 2.5 means 2.5% deviation. The deviation is compared to ma * (thresholdPercent / 100).
Highlights bars where the absolute deviation exceeds the percentage of the MA value.
Highlighting bars where the absolute deviation from the moving average exceeds the threshold.
If thresholdPct = 2.0 and the EMA is 100, then the deviation threshold is 2.0, and bars with absolute deviation > 2.0 will be highlighted.
You can set the threshold manually as a parameter.
The bars will be highlighted (colored) when deviation is outside the threshold range.
The threshold lets you define a "normal" deviation range. Any bars outside of this range are potential outliers — and are now visually flagged.
Adjustable length (default is 20).
Visual deviation band from price.
Plot of absolute deviation on a separate line.
Adding a threshold input. The threshold input is in percentage (%), e.g., 2.5 means 2.5% deviation. The deviation is compared to ma * (thresholdPercent / 100).
Highlights bars where the absolute deviation exceeds the percentage of the MA value.
Highlighting bars where the absolute deviation from the moving average exceeds the threshold.
If thresholdPct = 2.0 and the EMA is 100, then the deviation threshold is 2.0, and bars with absolute deviation > 2.0 will be highlighted.
You can set the threshold manually as a parameter.
The bars will be highlighted (colored) when deviation is outside the threshold range.
The threshold lets you define a "normal" deviation range. Any bars outside of this range are potential outliers — and are now visually flagged.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.
Açık kaynak kodlu komut dosyası
Gerçek TradingView ruhuna uygun olarak, bu komut dosyasının oluşturucusu bunu açık kaynaklı hale getirmiştir, böylece yatırımcılar betiğin işlevselliğini inceleyip doğrulayabilir. Yazara saygı! Ücretsiz olarak kullanabilirsiniz, ancak kodu yeniden yayınlamanın Site Kurallarımıza tabi olduğunu unutmayın.
Feragatname
Bilgiler ve yayınlar, TradingView tarafından sağlanan veya onaylanan finansal, yatırım, işlem veya diğer türden tavsiye veya tavsiyeler anlamına gelmez ve teşkil etmez. Kullanım Şartları'nda daha fazlasını okuyun.