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
- 進捗率: 設定した目標乖離率に対し、現在の乖離率が何%まで達しているかを計算します。
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.
Script de código abierto
Fiel al espíritu de TradingView, el creador de este script lo ha convertido en código abierto, para que los traders puedan revisar y verificar su funcionalidad. ¡Enhorabuena al autor! Aunque puede utilizarlo de forma gratuita, recuerde que cualquier republicación del código está sujeta a nuestras Normas internas.
Exención de responsabilidad
La información y las publicaciones no constituyen, ni deben considerarse como, asesoramiento o recomendaciones financieras, de inversión, de trading u otro tipo, proporcionadas o respaldadas por TradingView. Obtenga más información en Condiciones de uso.