Class WmaRTIndicator

All Implemented Interfaces:
Resettable, RTIndicator

public class WmaRTIndicator extends AbstractWindowSeriesRTIndicator
Weighted Moving Average (WMA) RTIndicator.

Computes a linearly weighted moving average where recent values receive higher weights. Weight for position i (0-based, oldest first) is (i+1), so the most recent value gets weight equal to the window size.

Formula: WMA = Σ(weight_i × value_i) / Σ(weight_i)

This is the simple O(window) reference implementation. The pro tier ships an O(1) incremental twin (indicators.averages.pro.WmaRTIndicator) that produces identical results.

  • Constructor Details

    • WmaRTIndicator

      public WmaRTIndicator(int periods)
  • Method Details