Class BollingerBandWidthRTIndicator

All Implemented Interfaces:
Resettable, RTIndicator

public class BollingerBandWidthRTIndicator extends AbstractDecorableRTIndicator
Bollinger BandWidth RT Indicator.
See Also:
  • Field Details

    • ID

      public static final String ID
      Canonical catalog id, set as an explicit IndicatorMeta.ID override where getId() class-name derivation would be wrong.
      See Also:
  • Constructor Details

    • BollingerBandWidthRTIndicator

      public BollingerBandWidthRTIndicator(@NonNull @NonNull BollingerBandsRTIndicator bollingerBandsRTIndicator)
  • Method Details

    • isReady

      public boolean isReady()
      Description copied from class: AbstractDecorableRTIndicator
      Ready when the wrapped indicator is: this wrapper has no warm-up of its own.
      Specified by:
      isReady in interface RTIndicator
      Overrides:
      isReady in class AbstractDecorableRTIndicator
      Returns:
      true if the indicator has completed its warmup period
    • reset

      public void reset()
      This indicator is a view of the bands, which it never updates and so does not own: resetting it only clears its own value, and the bands go back to their start when their owner resets them.
      Specified by:
      reset in interface Resettable
      Overrides:
      reset in class AbstractDecorableRTIndicator
    • getValue

      public double getValue()
      Computes the Bollinger BandWidth as a percentage: 100 * (upper - lower) / middle. This is a derived/lazy indicator that recalculates from the Bollinger Bands state on every read rather than maintaining its own state.
      Specified by:
      getValue in interface RTIndicator
      Overrides:
      getValue in class AbstractRTIndicator
      Returns:
      the bandwidth as a percentage of the middle band
    • update

      public double update(double newValue)
      Specified by:
      update in interface RTIndicator
      Overrides:
      update in class AbstractRTIndicator