Enum Class DisplayHint

java.lang.Object
java.lang.Enum<DisplayHint>
com.wualabs.qtsurfer.engine.indicators.core.DisplayHint
All Implemented Interfaces:
Serializable, Comparable<DisplayHint>, Constable

public enum DisplayHint extends Enum<DisplayHint>
How an indicator's value should be presented — the typed view of the IndicatorMeta.DISPLAY metadata entry.

Display metadata used to be smuggled into the indicator ID by appending "%" to the name, so .rsi("rsi14", …) registered "rsi14%" and a later getExisting("rsi14") silently failed — the single biggest correctness trap for generated strategies. The hint now rides the indicator's IndicatorMeta under the compact wire key dsp, so the registered name stays the lookup name and the charting layer reads metadata instead of parsing a suffix.

Each non-default value has a one-letter wire code(); ABSOLUTE has none — the default is expressed by the absence of the entry, so it costs no bytes per stored column.

  • Enum Constant Details

    • ABSOLUTE

      public static final DisplayHint ABSOLUTE
      A plain numeric value on the primary axis. The default for every indicator.
    • PERCENT

      public static final DisplayHint PERCENT
      A percentage — historically the "%" name suffix; plots on a percentage axis.
    • VOLUME

      public static final DisplayHint VOLUME
      A volume-denominated value (OBV, ADL, …); plots on a volume pane/axis.
  • Method Details

    • values

      public static DisplayHint[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DisplayHint valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • code

      public String code()
      The one-letter wire form, or null for ABSOLUTE (absent = default).
    • fromCode

      public static DisplayHint fromCode(String code)
      Resolves a wire code back to its hint. Unknown codes resolve to ABSOLUTE rather than throwing: display metadata must never break a data path.
      Parameters:
      code - the wire code, or null
      Returns:
      the matching hint, or ABSOLUTE