Class AdaptiveFisherTransformRTIndicator

java.lang.Object
com.wualabs.qtsurfer.engine.indicators.core.AbstractRTIndicator
com.wualabs.qtsurfer.engine.indicators.momentum.pro.AdaptiveFisherTransformRTIndicator
All Implemented Interfaces:
Resettable, RTIndicator

public class AdaptiveFisherTransformRTIndicator extends AbstractRTIndicator
Adaptive Fisher Transform indicator using Kaufman Efficiency Ratio for period adaptation.

Adapts the Fisher Transform's normalization window based on market regime:

  ER = |price - price[erPeriod]| / sum(|diff|, erPeriod)
  adaptivePeriod = round(minPeriod + (1 - ER) * (maxPeriod - minPeriod))
  normalized = 2 * (price - lowest(adaptivePeriod)) / (highest - lowest) - 1
  smoothed = 0.5 * normalized + 0.5 * prevSmoothed
  fisher = 0.5 * ln((1 + smoothed) / (1 - smoothed)) + 0.5 * prevFisher

When trending (ER near 1), uses a short normalization window for fast adaptation. When choppy (ER near 0), uses a long window for smoother output.

  • Constructor Details

    • AdaptiveFisherTransformRTIndicator

      public AdaptiveFisherTransformRTIndicator()
    • AdaptiveFisherTransformRTIndicator

      public AdaptiveFisherTransformRTIndicator(int erPeriod, int minPeriod, int maxPeriod)
  • Method Details

    • getErPeriod

      public int getErPeriod()
    • getEfficiencyRatio

      public double getEfficiencyRatio()
    • getAdaptivePeriod

      public int getAdaptivePeriod()
    • isReady

      public boolean isReady()
      Description copied from interface: RTIndicator
      Returns whether this indicator has received enough data to produce meaningful values.

      During the warmup period, RTIndicator.getValue() may return 0 or a partial estimate that should not be used for trading decisions. Once this method returns true, the indicator's output is statistically valid.

      The default implementation returns true for backward compatibility. Indicators with warmup requirements should override this method.

      For composite indicators (e.g. Bollinger Bands, MACD), readiness is determined by the slowest internal component.

      Returns:
      true if the indicator has completed its warmup period
    • reset

      public void reset()
      Specified by:
      reset in interface Resettable
      Overrides:
      reset in class AbstractRTIndicator
    • update

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