Class Pro

java.lang.Object
com.wualabs.qtsurfer.engine.indicators.pro.Pro

public final class Pro extends Object
Fluent factories for the paid-tier indicators, hung off an existing group:
indicators.addPrice().ema("ema20", 20);
Pro.on(indicators)
    .atr("atr14", 14)
    .obv("obv")
    .superTrend("st", 10, 3.0);

Why a separate entry point and not methods on the group. The base qtsurfer-engine-indicators module cannot see this one — the dependency runs pro → base — so the factories cannot live on InstrumentGroupRTIndicator itself. Making the group a pro subclass was evaluated and rejected: all 84 base builder methods return the base type, so proGroup.addPrice().atr(…) would not compile and every strategy would need a cast plus a createInstrumentGroupRTIndicator override. Wrapping instead keeps one discoverable entry point, chains freely among pro factories, and leaves the base builder untouched.

Before this existed, the only way to register a pro indicator was the generic add(name, new AtrRTIndicator(14)) — reachable, but undiscoverable.

These need real bars. Every indicator registered here is a RichRTIndicator<MarketSnapshot> fed the whole snapshot, which is right on the kline path. On a ticker feed the volume and high/low it reads are the exchange's 24-hour rolling statistics rather than the current bar's, so the output is plausible-looking and meaningless. Nothing throws — the values just stop meaning what their name says. Each of these declares requiresBarData(), so binding one to a ticker group raises a retrievable notice (group.getNotices()) alongside a log warning; drive them from AbstractKlineStrategy instead.

  • Method Details

    • on

      public static Pro on(@NonNull @NonNull InstrumentGroupRTIndicator group)
      Parameters:
      group - the group to register into
      Returns:
      a pro-factory view over group
    • group

      Returns:
      the wrapped group, to resume base-builder chaining
    • atr

      public Pro atr()
      Average True Range over 14 periods, registered as "atr14".
    • atr

      public Pro atr(int periods)
    • atr

      public Pro atr(String name, int periods)
    • adx

      public Pro adx()
      Average Directional Index over 14 periods, registered as "adx14".
    • adx

      public Pro adx(int periods)
    • adx

      public Pro adx(String name, int periods)
      ADX — output is [0, 100], hence DisplayHint.PERCENT.
    • superTrend

      public Pro superTrend(String name)
      SuperTrend with the standard (10, 3.0) parameters.
    • superTrend

      public Pro superTrend(String name, int atrPeriod, double multiplier)
    • ichimoku

      public Pro ichimoku(String name)
      Ichimoku with the standard (9, 26, 52) parameters.
    • ichimoku

      public Pro ichimoku(String name, int tenkanPeriod, int kijunPeriod, int senkouPeriod)
    • obv

      public Pro obv(String name)
      On-Balance Volume — volume-denominated, hence DisplayHint.VOLUME.
    • vwap

      public Pro vwap(String name)
      Volume-Weighted Average Price — a price, so no display hint.
    • mfi

      public Pro mfi()
      Money Flow Index over 14 periods, registered as "mfi14".
    • mfi

      public Pro mfi(int periods)
    • mfi

      public Pro mfi(String name, int periods)
      MFI — output is [0, 100], hence DisplayHint.PERCENT.
    • cmf

      public Pro cmf()
      Chaikin Money Flow over 20 periods, registered as "cmf20".
    • cmf

      public Pro cmf(int periods)
    • cmf

      public Pro cmf(String name, int periods)
      CMF — a [-1, 1] ratio, not a 0-100 percentage, so no display hint.