Record Class IndicatorNotice

java.lang.Object
java.lang.Record
com.wualabs.qtsurfer.engine.indicators.core.IndicatorNotice
Record Components:
level - how much attention this deserves
code - stable, greppable identifier — clients may switch on it, so treat it as API
indicatorName - the registered name of the indicator concerned
instrument - the instrument whose group raised it
message - human-readable explanation, safe to show to a strategy author
All Implemented Interfaces:
Notice

public record IndicatorNotice(@NonNull Notice.Level level, @NonNull String code, @NonNull String indicatorName, @NonNull Instrument instrument, @NonNull String message) extends Record implements Notice
A Notice an indicator group raises about its own wiring: it names the indicator concerned and the instrument whose group raised it, which is what makes a notice actionable when a strategy runs the same indicator set across many instruments.

See Notice for why notices exist and how they differ from signals.

  • Field Details

    • BAR_DATA_ON_TICKER_PATH

      public static final String BAR_DATA_ON_TICKER_PATH
      Raised when an indicator that needs per-bar OHLCV is bound to a ticker stream, where volume and high/low are 24-hour rolling statistics. WARN rather than ERROR: the indicator still produces numbers, and a strategy may knowingly accept them.
      See Also:
  • Constructor Details

    • IndicatorNotice

      public IndicatorNotice(@NonNull @NonNull Notice.Level level, @NonNull @NonNull String code, @NonNull @NonNull String indicatorName, @NonNull @NonNull Instrument instrument, @NonNull @NonNull String message)
      Creates an instance of a IndicatorNotice record class.
      Parameters:
      level - the value for the level record component
      code - the value for the code record component
      indicatorName - the value for the indicatorName record component
      instrument - the value for the instrument record component
      message - the value for the message record component
  • Method Details

    • key

      public IndicatorNotice.Key key()
      This notice's identity — see IndicatorNotice.Key. Narrows Notice.key(), whose code-only default would let one indicator's notice hide another's.
      Specified by:
      key in interface Notice
      Returns:
      the (code, indicator) pair that de-duplicates this notice
    • barDataOnTickerPath

      public static IndicatorNotice barDataOnTickerPath(@NonNull @NonNull String indicatorName, @NonNull @NonNull Instrument instrument)
      Builds the BAR_DATA_ON_TICKER_PATH notice.
      Parameters:
      indicatorName - registered name of the offending indicator
      instrument - the instrument whose group it was registered on
      Returns:
      the notice
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • level

      @NonNull public @NonNull Notice.Level level()
      Returns the value of the level record component.
      Specified by:
      level in interface Notice
      Returns:
      the value of the level record component
    • code

      @NonNull public @NonNull String code()
      Returns the value of the code record component.
      Specified by:
      code in interface Notice
      Returns:
      the value of the code record component
    • indicatorName

      @NonNull public @NonNull String indicatorName()
      Returns the value of the indicatorName record component.
      Returns:
      the value of the indicatorName record component
    • instrument

      @NonNull public @NonNull Instrument instrument()
      Returns the value of the instrument record component.
      Returns:
      the value of the instrument record component
    • message

      @NonNull public @NonNull String message()
      Returns the value of the message record component.
      Specified by:
      message in interface Notice
      Returns:
      the value of the message record component