OPEN-SOURCE SCRIPT

Moving Volume Density

Moving Volume Density (MVD) is a custom TradingView indicator written in Pine Script™ (version 6) that blends volume analysis with price range data to offer a unique perspective on market dynamics. By measuring the total volume over a specified period and relating it to the price range during the same interval, this indicator provides valuable insights into the concentration of trading activity relative to price movement.

Key Features:
  • User-Defined Period: The indicator uses an input period (default 20 bars) to calculate both the total volume and the price range. This flexibility allows you to tailor the analysis to your preferred timeframe.
  • Volume Calculation: It computes the sum of the volume over the defined period, capturing the cumulative trading activity.
  • Price Range Determination: The indicator identifies the highest high and the lowest low within the period, calculating the price range (difference between the two). This range serves as the denominator in the density calculation.
  • Volume Density Computation: Volume Density is derived by dividing the total volume by the price range. This metric reveals how concentrated the volume is within the observed price movement. To prevent division errors, the calculation returns 'NA' when the price range is zero.
  • Visual Representation: The resulting Volume Density is plotted as a line on a separate sub-window, making it easy to compare with other indicators or overlay your analysis.



「Moving Volume Density (MVD) インジケーター」は、Pine Script™(バージョン6)で作成されたカスタムインジケーターです。出来高の分析と、指定期間内の高値・安値による価格レンジの情報を組み合わせることで、市場のダイナミクスに対する独自の視点を提供します。指定された期間内の合計出来高とその期間内の価格レンジの比率から、価格変動に対する出来高の集中度を示す指標となります。

主な特徴:
  • ユーザー定義の期間: インジケーターは、入力された期間(デフォルトは20本のバー)を基に、合計出来高と価格レンジ(最高値と最安値の差)の両方を計算します。これにより、ご自身の分析に合わせた柔軟な設定が可能です。
  • 出来高の計算: 指定期間内の全出来高を合計することで、累積的な取引活動を把握します。
  • 価格レンジの算出: 期間内の最高値と最安値を取得し、その差を価格レンジとして算出。このレンジは、出来高密度の計算における分母として使用されます。
  • 出来高密度の計算: 合計出来高を価格レンジで割ることで、出来高がどれだけ価格変動内に集中しているかを示す「出来高密度」を求めます。なお、価格レンジがゼロの場合はゼロ除算を避けるため「NA」を返す設計となっています。
  • 視覚的な表現: 計算結果はサブウィンドウにラインとしてプロットされ、他のインジケーターとの併用や比較が容易に行えます。

Pernyataan Penyangkalan