OPEN-SOURCE SCRIPT

VAMA - Volume Adjusted Moving Average [jpkxyz]

VAMA is a moving average that adapts to volume, giving more weight to price movements backed by higher relative volume. This VAMA (Volume Adjusted Moving Average) indicator implementation emphasizes visual clarity. It is based on the VAMA script by allanster

Dual VAMA lines (Fast/Slow) with dynamic coloring:


Single-color scheme switches between green (bullish) and red (bearish)
Color changes on crossovers rather than relative position
Configurable line widths (set to 1 for clean appearance)


Visual enhancements:


Optional fill between VAMA lines (50% transparency)
Crossover dots can be toggled
Fills and dots match the current trend color


Customization parameters:


Independent source inputs for Fast/Slow lines
Adjustable VI Factor (volume influence)
Sample size control
Strict/non-strict calculation toggle

The code maintains efficient computation while prioritizing visual feedback for trend changes. It's designed for clear signal identification without visual clutter.


Notable style choices:


Consistent color theming throughout all visual elements
Simplified color transitions (only at crossovers)
Subtle transparency for fill areas
Minimal dot size for crossover markers

VAMA (Volume Adjusted Moving Average) Technical Analysis:

Core Calculation:
1. Volume Influence (v2i):



- total_volume: Sum of volume over sample period
- total_periods: Either full history (nvb=0) or specified sample size
- volume_factor: Controls sensitivity to volume deviation

2. Price Weighting:



3. Accumulation Process:
- Iterates through length*10 periods
- Accumulates weighted prices and volume influence values
- Continues until volume influence sum >= specified length or strict rule triggers

4. Final VAMA Value:



Parameters:
- SampleN: Historical reference length (0=full history)
- Length: Base period for calculation
- VI Factor: Volume influence multiplier (>0.01)
- Strict: Forces exact length period completion when true
- Source: Input price data
Moving AveragesVAMAVolume Indicatorvolumeadjustedmovingaverage

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

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

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


يعمل أيضًا:

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