OPEN-SOURCE SCRIPT

Strategic Peak Drawdown Monitor

639
Overview
This indicator is a professional-grade tool designed to track price drawdowns from a specific peak. It is particularly effective for identifying "dip-buying" opportunities or "pullbacks" in a trending market by calculating the percentage drop from the highest price reached within a defined period or the current year.

Key Features
  • Dual Peak Modes: Choose between a rolling Lookback window or the Year-to-Date (YTD) high to define your reference peak.
  • Visual Target Tracking: A dotted target line clearly marks your entry or monitoring zone (e.g., -10% from peak).
  • Dynamic Alerting: Integrated background shading and status labels provide instant visual feedback when the target is reached.
  • Clean Dashboard: A toggleable UI table displays real-time metrics, including current drawdown percentage and progress toward the target.


Calculation Logic
  • Lookback Mode: Uses the ta.highest function over a user-defined number of bars.
  • Year-to-Date Mode: Automatically identifies the highest price since the first trading day of the current year.
  • Target Calculation: Target = Peak Price * (1 - Drop % / 100)


How to Use
  • Trend Pullbacks: Set a target (e.g., 5-10%) to catch retracements in a strong uptrend.
  • Market Corrections: Use the YTD mode to monitor how far the market has corrected from its yearly highs.
  • Risk Management: Use the progress percentage in the dashboard to gauge how close the price is to a significant support level based on drawdown.


概要
本インジケーターは、特定の高値(ピーク)からの下落率を追跡するために設計されたプロフェッショナル向けツールです。一定期間の最高値、または年初来高値からの下落率を計算することで、トレンド相場における「押し目買い」のタイミングや「プルバック」の深さを正確に把握することができます。

主な機能
  • 2つのピーク判定モード: 任意の期間(Lookback)または、年初からの最高値(Year-to-Date)を基準値として選択可能です。
  • 視覚的なターゲット表示: ターゲットライン(例:高値から-10%)を点線で表示し、監視レベルを明確にします。
  • ダイナミックな通知設定: ターゲット到達時には背景のハイライトとステータスラベルが表示され、即座に状況を判断できます。
  • クリーンなダッシュボード: 現在の下落率やターゲットへの到達進捗率(%)をリアルタイムで表示するテーブル機能を搭載(表示/非表示の切り替え可能)。


計算ロジック
  • ルックバックモード: 指定された期間内の最高値を ta.highest 関数を使用して算出します。
  • 年初来モード: 当該年の最初の取引日以降の最高値を自動的に追跡します。
  • ターゲット計算式: ターゲット価格 = 高値 * (1 - 設定下落率 / 100)


活用方法
  • 押し目買いの判断: 強い上昇トレンドにおいて、5〜10%程度の調整を狙う際のエントリー根拠として活用できます。
  • 相場調整の監視: 年初来高値モードを使用することで、市場が年間の最高値からどの程度調整しているかを定量的に分析できます。
  • リスク管理: ダッシュボードの進捗率を確認することで、心理的な節目やサポートラインへの接近を事前に察知できます。

Wyłączenie odpowiedzialności

Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.