Class Layer1ApiUserMessageModifyIndicator

java.lang.Object
velox.api.layer1.messages.indicators.Layer1ApiUserMessageModifyIndicator
All Implemented Interfaces:
Layer1ApiStrategiesEchoMessagesLayer.StrategyEchoMessageFromLayer

public class Layer1ApiUserMessageModifyIndicator extends Object implements Layer1ApiStrategiesEchoMessagesLayer.StrategyEchoMessageFromLayer
Describes adding or removing indicator Note that you need to remember fullName. This is a name that will be used to adress your indicator by any external parts (for example online indicator calculations). This name will be unique trough all indicators unless you initialize indicators with same owner class and same user name. This filed will be initialized in message constructor and can be access after
  • Field Details

    • ownerClassName

      public final String ownerClassName
      Name of owner strategy class
    • ownerUserName

      public final String ownerUserName
      User friendly name of owner strategy class (if provided via Layer1StrategyName)
    • fullName

      public String fullName
      This is a unique indicator name, that will be used to address this indicator from any external part
      Do not change this field
      Use applyNameModifier(String) if you need to generate different full names for same user names
    • userName

      public final String userName
      Name that will be visible to user i.e. in bottom panel context menu
    • isAdd

      public final boolean isAdd
    • indicatorColorScheme

      public final IndicatorColorScheme indicatorColorScheme
      Default color scheme has only one main color, named as strategy and used for every value
    • colorInterface

      public final Layer1IndicatorColorInterface colorInterface
      This will be used to set / get colors described by indicatorColorScheme
      If null, colors will be attempted to retrieve via internal color storage by names provided by indicatorColorScheme
    • indicatorLineStyle

      public final IndicatorLineStyle indicatorLineStyle
      Line style used by indicator
    • defaultTooltipBackgrondColor

      public final Color defaultTooltipBackgrondColor
    • defaultTooltipTextColor

      public final Color defaultTooltipTextColor
    • indicatorDisplayLogic

      public final IndicatorDisplayLogic indicatorDisplayLogic
    • indicatorMinMarginPriceOut

      public final Double indicatorMinMarginPriceOut
    • indicatorMaxMarginPriceOut

      public final Double indicatorMaxMarginPriceOut
    • minLimitsRange

      public final Double minLimitsRange
    • boundsInfo

      public final BoundsInfo boundsInfo
    • graphType

      Strategies have few options of where graph is displayed, see Layer1ApiUserMessageModifyIndicator.GraphType
      Default: Layer1ApiUserMessageModifyIndicator.GraphType.NONE
    • isSupportWidget

      public final boolean isSupportWidget
      Some strategies may choose to NOT display themselves as widget Default: true (widget supported)
    • isShowColorSettings

      public final boolean isShowColorSettings
    • isEnableSettingsFromConfigPopup

      public final boolean isEnableSettingsFromConfigPopup
    • onlineCalculatable

      public final OnlineCalculatable onlineCalculatable
    • aliasFilter

      public final AliasFilter aliasFilter
    • widgetDisplayInfo

      public WidgetDisplayInfo widgetDisplayInfo
    • isLineEnabledByDefault

      public boolean isLineEnabledByDefault
    • isWidgetEnabledByDefault

      public boolean isWidgetEnabledByDefault
    • indicatorContextMenuInformation

      public IndicatorContextMenuInformation indicatorContextMenuInformation
    • horizontalValueLinesInfo

      public HorizontalValueLinesInfo horizontalValueLinesInfo
    • graphLayerRenderPriority

      public int graphLayerRenderPriority
    • iconLayerRenderPriority

      public int iconLayerRenderPriority
  • Constructor Details

    • Layer1ApiUserMessageModifyIndicator

      public Layer1ApiUserMessageModifyIndicator(Class<?> strategyClass, String userName, boolean isAdd, IndicatorColorScheme indicatorColorScheme, Layer1IndicatorColorInterface colorInterface, IndicatorLineStyle indicatorLineStyle, Color defaultTooltipBackgrondColor, Color defaultTooltipTextColor, IndicatorDisplayLogic indicatorDisplayLogic, Double indicatorMinMarginPriceOut, Double indicatorMaxMarginPriceOut, Double minLimitsRange, BoundsInfo boundsInfo, Layer1ApiUserMessageModifyIndicator.GraphType graphType, Boolean isSupportWidget, Boolean isShowColorSettings, Boolean isEnableSettingsFromConfigPopup, OnlineCalculatable onlineCalculatable, AliasFilter aliasFilter)
      Note that you need to remember fullName. This is a name that will be used to adress your indicator by any external parts (for example online indicator calculations). This name will be unique trough all indicators unless you initialize indicators with same owner class and same user name. This filed will be initialized in message constructor and can be access after
      Parameters:
      strategyClass - class of strategy, creating this indicator
      userName - name that will be visible to user i.e. in bottom panel context menu
      isAdd - true if message is adding indicator, false if it's removing indicator
      indicatorColorScheme - if not null, indicator colors will be assign according to given color scheme
      colorInterface - this will be used to set / get colors described by indicatorColorScheme
      indicatorLineStyle - indicator line style, if null default line style will be used
      defaultTooltipTextColor - if user has no settings for this indicator color, this color will be used as default for drawing text in graph tooltip(background will be of defaultGraphColor)
      indicatorDisplayLogic - can be null, default logic will be applied. If provided logic violates provided indicatorMinMarginPriceOut, indicatorMaxMarginPriceOut or minLimitsRange, limits will be modified to fit into provided arguments
      indicatorMinMarginPriceOut - if not null, indicator's limits will be recalculated when there is less then that amount of indicator range empty space by either border
      indicatorMaxMarginPriceOut - if not null, indicator's limits will be recalculated when there is more then that amount of indicator range empty space by either border
      minLimitsRange - if not null, indicator's limits range (max - min value) can't be less then minLimitsRange
      boundsInfo - minimum and maximum values of widget null to indicate no predetermined bounds (will be determined on fly)
      graphType - position of a graph (or NONE). Null will default to NONE.
      isSupportWidget - true if widget is supported, false if widget is not supported
      isShowColorSettings - (temporary) if false, no color settings will be available via popup menu
      isEnableSettingsFromConfigPopup - if true, config popup settings icon will open corresponding strategies dialog tab
      onlineCalculatable - if not null, indicator will be calculated for chart online
      aliasFilter - if null, indicator will be displayed for all aliases, otherwise only for ones defined by filter
    • Layer1ApiUserMessageModifyIndicator

      public Layer1ApiUserMessageModifyIndicator(Layer1ApiUserMessageModifyIndicator message)
    • Layer1ApiUserMessageModifyIndicator

      public Layer1ApiUserMessageModifyIndicator(Layer1ApiUserMessageModifyIndicator message, boolean isAdd)
      Copy of message with overriden isAdd
    • Layer1ApiUserMessageModifyIndicator

      public Layer1ApiUserMessageModifyIndicator(Class<?> strategyClass, String userName, boolean isAdd)
      Note that you need to remember fullName. This is a name that will be used to adress your indicator by any external parts (for example online indicator calculations). This name will be unique trough all indicators unless you initialize indicators with same owner class and same user name. This filed will be initialized in message constructor and can be access after
      Parameters:
      strategyClass - class of strategy, creating this indicator
      userName - name that will be visible to user e.g. in bottom panel context menu
      isAdd - true if message is adding indicator, false if it's removing indicator
  • Method Details

    • applyNameModifier

      public void applyNameModifier(String modifier)
      Use if you need to distinguish strategies with same user names For example, could be when creating strategies with same names for different aliases Modifier should be applied before sending this message
    • predictFullName

      public static String predictFullName(Class<?> myClass, String myName)
      There is no guarantee that value returned from this method will be the same as indicator's full name
      Do not use this method to predict strategy name
    • builder

      public static Layer1ApiUserMessageModifyIndicator.Builder builder(Class<?> strategyClass, String userName)
      Creates builder to build Layer1ApiUserMessageModifyIndicator.
      Parameters:
      strategyClass - class of strategy, creating this indicator
      userName - name that will be visible to user e.g. in bottom panel context menu
      Returns:
      created builder
    • builder

      public static Layer1ApiUserMessageModifyIndicator.Builder builder(Class<?> strategyClass, String localizedName, String unlocalizedName)
      Creates builder to build Layer1ApiUserMessageModifyIndicator.
      Parameters:
      strategyClass - class of strategy, creating this indicator
      localizedName - name that will be visible to user e.g. in bottom panel context menu
      unlocalizedName - name that will be used to identify the indicator in the code (english name of the indicator can be used)
      Returns:
      created builder
      See Also:
    • getOwnerUserName

      public static String getOwnerUserName(Class<?> ownerClass)
    • toString

      public String toString()
      Overrides:
      toString in class Object