OPEN-SOURCE SCRIPT

Enhanced Cumulative Volume Delta [NariCapitalTrading]

تم تحديثه
Enhanced Cumulative Volume Delta (eCVD) Technical Guide

Introduction
The Enhanced Cumulative Volume Delta (eCVD) is a technical indicator in trading that measures the cumulative difference between buying and selling volume over a user-defined period. It helps in understanding market sentiment by showing whether buyers or sellers dominate.

Calculation

Inputs
  • Period: Number of bars for cumulative volume calculation (default: 14).
  • MA Period: Period for the moving average of eCVD (default: 20).


Volume Delta Calculation
  • Buying Volume (buyVolChange): Counted as buying volume if the current close is greater than the previous.
  • Selling Volume (sellVolChange): Counted as selling volume if the current close is less than the previous.


Cumulative Volume Delta (CVD)
  • Cumulative buying (cumBuyVol) and selling volumes (cumSellVol) are calculated.
  • Every period bars, these cumulative volumes are reset.
  • eCVD is the difference between cumulative buying and selling volumes.


CVD Moving Average
  • Simple Moving Average (SMA) of eCVD calculated over maPeriod.


Interpretation

eCVD Histogram
  • Plotted as a histogram.
  • Color Coding:
    • Green: Positive eCVD (more buying volume).
    • Red: Negative eCVD (more selling volume).
    • Black: No significant difference between buying and selling volume.
    CVD Moving Average
    • Moving average line (yellow) indicates eCVD trend direction and strength.
    Application
    • Trend Confirmation: Rising eCVD suggests an uptrend; falling eCVD suggests a downtrend.
    • Divergence: Opposite movements in price and eCVD can indicate potential reversals.
    • Volume Analysis: High eCVD values signal high trading activity, significant at market extremes.
    Conclusion
    The eCVD can be used to analyze buyer/seller dynamics through volume. It should be used alongside other methods for informed trading decisions.
ملاحظات الأخبار
Enhanced Cumulative Volume Delta Indicator Update
We're excited to announce an update to the Enhanced Cumulative Volume Delta (eCVD) Indicator available for the trading community. This update introduces a customizable moving average (MA) feature, allowing traders to adapt the indicator more closely to their unique trading strategies and market analyses.

Here's what's new in the latest version:

[u]Customizable Moving Average Type[/u]
MA Selection: Traders can now select the type of moving average applied to the Cumulative Volume Delta.

The available options are:
  • Simple Moving Average (SMA)
  • Exponential Moving Average (EMA)
  • Weighted Moving Average (WMA)
  • Hull Moving Average (HMA)


Dynamic MA Coloring: The moving average line now dynamically changes color based on its slope.

The color coding is as follows:
  • [color=green]Green:[/color] Indicates positive slope
  • [color=red]Red:[/color] Indicates negative slope
  • [color=black]Black:[/color] Indicates flat slope


[u]Technical Improvements[/u]
  • Optimized Performance: Code optimizations have been implemented to ensure smoother performance and faster rendering of the indicator on charts.
  • Improved Accuracy: Enhancements to the calculation logic for volume changes and cumulative totals provide more accurate and reliable readings.


[u]Implementation Details[/u]
The update introduces a conditional logic structure to select the moving average type based on user input. This approach ensures that the indicator remains versatile across various trading styles and market conditions. By incorporating dynamic color coding for the slope of the MA line, the indicator now offers an additional visual representation for volume analysis.

As always, I welcome feedback and suggestions from the community.
ملاحظات الأخبار
Guide to Changes from Original Code

Expanded Moving Average (MA) Options

Original Code: Supported only SMA, EMA, WMA, and HMA.
New Code: Added support for VWMA and RMA, providing more flexibility for different trading strategies.

Plot Title and Style Customization

New Code: Introduced inputs for customizing the plot title and histogram style (Columns or Stepped Area). This allows users to tailor the visual representation of the indicator.
Dynamic Color Inputs

New Code: Added user inputs for customizing the colors of positive, negative, and no change deltas, as well as MA up, down, and flat colors. This enhances the visual clarity and user customization of the indicator.

Enhanced Plotting for Cumulative Volumes

New Code: Plots cumulative buy and sell volumes separately. Buy volume is displayed as a yellow area with 40% transparency above the zero line, while sell volume is shown as a blue area with 20% transparency below the zero line. This separation provides clearer insights into market dynamics.

Maximum Line Thickness for Plots

New Code: Set the line thickness for the eCVD Histogram, CVD MA, and cumulative volumes to the maximum (4). This ensures better visibility of the plots on the chart.
Introduction of Alerts

New Code: Added alert conditions for significant changes in CVD, such as increases, decreases, and crossovers with the MA. These alerts help traders respond promptly to important market signals.

Improved Code Structure and Readability

New Code: Utilizes a function with a switch statement for calculating the moving average, improving readability and maintainability. This approach makes it easier to add new MA types in the future.

Implications for Improved Trading

Flexibility: The expanded MA options and customizable plot styles and colors allow traders to tailor the indicator to their specific strategies and preferences.
Clarity: The separation of cumulative buy and sell volumes with distinct colors and areas provides clearer insights into market behavior and volume dynamics.
Timely Alerts: The addition of alerts for significant changes helps traders to react swiftly to market movements, potentially improving their trading performance.
Maintainability: The improved code structure enhances readability and makes future modifications or additions more straightforward.
volumedeltaVolume

نص برمجي مفتوح المصدر

قام مؤلف هذا النص البرمجي بنشره وجعله مفتوح المصدر، بحيث يمكن للمتداولين فهمه والتحقق منه، وهو الأمر الذي يدخل ضمن قيم TradingView. تحياتنا للمؤلف! يمكنك استخدامه مجانًا، ولكن إعادة استخدام هذا الرمز في المنشور يخضع لقواعد‎‎قوانين الموقع. يمكنك جعله مفضلاً لاستخدامه على الرسم البياني.

هل تريد استخدام هذا النص البرمجي على الرسم البياني؟


يعمل أيضًا:

إخلاء المسؤولية