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
- 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
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
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