Layer1ApiUserMessageModifyIndicator
Package: velox.api.layer1.messages.indicators
Type: Class
Inheritance: java.lang.Object รขโ โ Layer1ApiUserMessageModifyIndicator
All Implemented Interfaces: Layer1ApiStrategiesEchoMessagesLayer.StrategyEchoMessageFromLayer
Descriptionโ
Describes adding or removing indicator.
Note that you need to remember fullName. This is a name that will be used to address your indicator by any external parts (for example online indicator calculations). This name will be unique through all indicators unless you initialize indicators with same owner class and same user name. This field will be initialized in message constructor and can be accessed after.
Nested Classesโ
- Layer1ApiUserMessageModifyIndicator.Builder - Builder to build
Layer1ApiUserMessageModifyIndicator - Layer1ApiUserMessageModifyIndicator.GraphType - Enum
- Layer1ApiUserMessageModifyIndicator.LayerRenderPriority - Enum
Fieldsโ
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โ
public final Layer1ApiUserMessageModifyIndicator.GraphType 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
Constructorsโ
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 address your indicator by any external parts (for example online indicator calculations). This name will be unique through all indicators unless you initialize indicators with same owner class and same user name. This field will be initialized in message constructor and can be accessed after.
Parameters:
strategyClass- Class of strategy, creating this indicatoruserName- Name that will be visible to user i.e. in bottom panel context menuisAdd- True if message is adding indicator, false if it's removing indicatorindicatorColorScheme- If not null, indicator colors will be assigned according to given color schemecolorInterface- This will be used to set/get colors described byindicatorColorSchemeindicatorLineStyle- Indicator line style, if null default line style will be useddefaultTooltipTextColor- 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 providedindicatorMinMarginPriceOut,indicatorMaxMarginPriceOutorminLimitsRange, limits will be modified to fit into provided argumentsindicatorMinMarginPriceOut- If not null, indicator's limits will be recalculated when there is less than that amount of indicator range empty space by either borderindicatorMaxMarginPriceOut- If not null, indicator's limits will be recalculated when there is more than that amount of indicator range empty space by either borderminLimitsRange- If not null, indicator's limits range (max - min value) can't be less than minLimitsRangeboundsInfo- 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 NONEisSupportWidget- True if widget is supported, false if widget is not supportedisShowColorSettings- (Temporary) if false, no color settings will be available via popup menuisEnableSettingsFromConfigPopup- If true, config popup settings icon will open corresponding strategies dialog tabonlineCalculatable- If not null, indicator will be calculated for chart onlinealiasFilter- 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 overridden 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 address your indicator by any external parts (for example online indicator calculations). This name will be unique through all indicators unless you initialize indicators with same owner class and same user name. This field will be initialized in message constructor and can be accessed after.
Parameters:
strategyClass- Class of strategy, creating this indicatoruserName- Name that will be visible to user e.g. in bottom panel context menuisAdd- True if message is adding indicator, false if it's removing indicator
Methodsโ
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 indicatoruserName- 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 indicatorlocalizedName- Name that will be visible to user e.g. in bottom panel context menuunlocalizedName- 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:
fullNamepredictFullName(Class, String)for fullName
getOwnerUserNameโ
public static String getOwnerUserName(Class<?> ownerClass)
toStringโ
public String toString()
Overrides: toString in class Object