Class KnowSureThingRTIndicator

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

public class KnowSureThingRTIndicator extends AbstractRTIndicator
Know Sure Thing (KST) — Martin Pring's multi-timeframe ROC oscillator — with O(1) per-tick computation.
  KST = SMA(ROC(10),10)*1 + SMA(ROC(15),10)*2 + SMA(ROC(20),10)*3 + SMA(ROC(30),15)*4
  Signal = SMA(KST, 9)

Default params: ROC periods [10,15,20,30], SMA periods [10,10,10,15], weights [1,2,3,4], signal period 9.

  • Constructor Details

    • KnowSureThingRTIndicator

      public KnowSureThingRTIndicator()
    • KnowSureThingRTIndicator

      public KnowSureThingRTIndicator(int[] rocPeriods, int[] smaPeriods, double[] weights, int signalPeriod)
  • Method Details

    • getSignal

      public double getSignal()
      Returns the current signal line value (SMA of KST).
      Returns:
      the signal value
    • 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