Class TrixRTIndicator

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

public class TrixRTIndicator extends AbstractRTIndicator
TRIX (Triple Exponential Average) with O(1) per-tick computation.
  EMA1 = EMA(close, periods)
  EMA2 = EMA(EMA1, periods)
  EMA3 = EMA(EMA2, periods)
  TRIX = (EMA3 - prevEMA3) / prevEMA3 * 100

Momentum oscillator that filters out insignificant price movements using triple smoothing. Positive = bullish, negative = bearish. Crossings of zero line are trade signals.

  • Constructor Details

    • TrixRTIndicator

      public TrixRTIndicator()
    • TrixRTIndicator

      public TrixRTIndicator(int periods)
  • Method Details

    • 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