OPEN-SOURCE SCRIPT

Strategic MA Deviation Targets

576
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
  • 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が提供または承認する金融、投資、取引、またはその他の種類の助言もしくは推奨であることを意図したものではなく、またこれらに該当するものでもありません。詳細は利用規約をご覧ください。