OPEN-SOURCE SCRIPT
Strategic MA Deviation Targets

Overview
This indicator is a comprehensive mean-reversion tool designed to quantify how far the current price has strayed from its Moving Average (SMA or EMA). Built for traders who look for overextended market conditions, it provides clear, actionable target levels for potential reversals.
Key Features
Calculation Logic
概要
本インジケーターは、現在の価格が移動平均線(SMA/EMA)からどの程度離れているかを定量化し、相場の過熱感を分析するための平均回帰ツールです。「売られすぎ」「買われすぎ」の局面を的確に捉え、反発を狙うトレーダー向けに設計されています。
主な機能
計算ロジック
This indicator is a comprehensive mean-reversion tool designed to quantify how far the current price has strayed from its Moving Average (SMA or EMA). Built for traders who look for overextended market conditions, it provides clear, actionable target levels for potential reversals.
Key Features
- Flexible MA Engine: Switch between SMA and EMA with customizable periods.
- Dual Deviation Targets: Set independent percentages for Buy (downside) and Sell (upside) targets.
- Sentiment Ranking System: Automatically categorizes the market state into five ranks: Extreme Buy, Buy Stretch, Neutral, Sell Stretch, and Extreme Sell.
- Target Progress Monitoring: The dashboard calculates exactly how close the price is to your target as a percentage.
- Visual Clarity: Dotted target lines and optional shaded zones provide a professional look.
Calculation Logic
- Deviation: ((Close - MA) / MA) * 100
- Progress: Ratio of the current deviation relative to the user-defined target threshold.
- Alerts: Triggers on "Cross" and "Hit" conditions.
概要
本インジケーターは、現在の価格が移動平均線(SMA/EMA)からどの程度離れているかを定量化し、相場の過熱感を分析するための平均回帰ツールです。「売られすぎ」「買われすぎ」の局面を的確に捉え、反発を狙うトレーダー向けに設計されています。
主な機能
- 柔軟なMA設定: SMAとEMAを切り替え可能。
- 独立した売買ターゲット: 買い(下方)と売り(上方)のターゲットを個別に設定可能。
- センチメント・ランク機能: 相場の状態を5段階(Extreme Buy等)で自動判別。
- ターゲット進捗率の可視化: 設定したターゲットに対して現在どれくらい接近しているかを数値化します。
- 洗練された視覚効果: ターゲットラインは点線で表示され、視認性を損ないません。
計算ロジック
- 乖離率: ((終値 - 移動平均線) / 移動平均線) * 100
- 進捗率: 設定した目標乖離率に対し、現在の乖離率が何%まで達しているかを計算します。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。
开源脚本
秉承TradingView的精神,该脚本的作者将其开源,以便交易者可以查看和验证其功能。向作者致敬!您可以免费使用该脚本,但请记住,重新发布代码须遵守我们的网站规则。
免责声明
这些信息和出版物并非旨在提供,也不构成TradingView提供或认可的任何形式的财务、投资、交易或其他类型的建议或推荐。请阅读使用条款了解更多信息。