Class Layer1ApiUserMessageModifyIndicator
java.lang.Object
velox.api.layer1.messages.indicators.Layer1ApiUserMessageModifyIndicator
- All Implemented Interfaces:
Layer1ApiStrategiesEchoMessagesLayer.StrategyEchoMessageFromLayer
public class Layer1ApiUserMessageModifyIndicator extends java.lang.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-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
Layer1ApiUserMessageModifyIndicator.Builder
Builder to buildLayer1ApiUserMessageModifyIndicator
.static class
Layer1ApiUserMessageModifyIndicator.GraphType
static class
Layer1ApiUserMessageModifyIndicator.LayerRenderPriority
-
Field Summary
Fields Modifier and Type Field Description AliasFilter
aliasFilter
BoundsInfo
boundsInfo
Layer1IndicatorColorInterface
colorInterface
This will be used to set / get colors described byindicatorColorScheme
If null, colors will be attempted to retrieve via internal color storage by names provided byindicatorColorScheme
java.awt.Color
defaultTooltipBackgrondColor
java.awt.Color
defaultTooltipTextColor
java.lang.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
UseapplyNameModifier(String)
if you need to generate different full names for same user namesint
graphLayerRenderPriority
Layer1ApiUserMessageModifyIndicator.GraphType
graphType
Strategies have few options of where graph is displayed, seeLayer1ApiUserMessageModifyIndicator.GraphType
Default:Layer1ApiUserMessageModifyIndicator.GraphType.NONE
HorizontalValueLinesInfo
horizontalValueLinesInfo
int
iconLayerRenderPriority
IndicatorColorScheme
indicatorColorScheme
Default color scheme has only one main color, named as strategy and used for every valueIndicatorContextMenuInformation
indicatorContextMenuInformation
IndicatorDisplayLogic
indicatorDisplayLogic
IndicatorLineStyle
indicatorLineStyle
Line style used by indicatorjava.lang.Double
indicatorMaxMarginPriceOut
java.lang.Double
indicatorMinMarginPriceOut
boolean
isAdd
boolean
isEnableSettingsFromConfigPopup
boolean
isLineEnabledByDefault
boolean
isShowColorSettings
boolean
isSupportWidget
Some strategies may choose to NOT display themselves as widget Default: true (widget supported)boolean
isWidgetEnabledByDefault
java.lang.Double
minLimitsRange
OnlineCalculatable
onlineCalculatable
java.lang.String
ownerClassName
Name of owner strategy classjava.lang.String
ownerUserName
User friendly name of owner strategy class (if provided viaLayer1StrategyName
)java.lang.String
userName
Name that will be visible to user i.e.WidgetDisplayInfo
widgetDisplayInfo
-
Constructor Summary
Constructors Constructor Description Layer1ApiUserMessageModifyIndicator(java.lang.Class<?> strategyClass, java.lang.String userName, boolean isAdd)
Note that you need to rememberfullName
.Layer1ApiUserMessageModifyIndicator(java.lang.Class<?> strategyClass, java.lang.String userName, boolean isAdd, IndicatorColorScheme indicatorColorScheme, Layer1IndicatorColorInterface colorInterface, IndicatorLineStyle indicatorLineStyle, java.awt.Color defaultTooltipBackgrondColor, java.awt.Color defaultTooltipTextColor, IndicatorDisplayLogic indicatorDisplayLogic, java.lang.Double indicatorMinMarginPriceOut, java.lang.Double indicatorMaxMarginPriceOut, java.lang.Double minLimitsRange, BoundsInfo boundsInfo, Layer1ApiUserMessageModifyIndicator.GraphType graphType, java.lang.Boolean isSupportWidget, java.lang.Boolean isShowColorSettings, java.lang.Boolean isEnableSettingsFromConfigPopup, OnlineCalculatable onlineCalculatable, AliasFilter aliasFilter)
Note that you need to rememberfullName
.Layer1ApiUserMessageModifyIndicator(Layer1ApiUserMessageModifyIndicator message)
Layer1ApiUserMessageModifyIndicator(Layer1ApiUserMessageModifyIndicator message, boolean isAdd)
Copy of message with overriden isAdd -
Method Summary
Modifier and Type Method Description void
applyNameModifier(java.lang.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 messagestatic Layer1ApiUserMessageModifyIndicator.Builder
builder(java.lang.Class<?> strategyClass, java.lang.String userName)
Creates builder to buildLayer1ApiUserMessageModifyIndicator
.static java.lang.String
getOwnerUserName(java.lang.Class<?> ownerClass)
static java.lang.String
predictFullName(java.lang.Class<?> myClass, java.lang.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 namejava.lang.String
toString()
-
Field Details
-
ownerClassName
public final java.lang.String ownerClassNameName of owner strategy class -
ownerUserName
public final java.lang.String ownerUserNameUser friendly name of owner strategy class (if provided viaLayer1StrategyName
) -
fullName
public java.lang.String fullNameThis is a unique indicator name, that will be used to address this indicator from any external part
Do not change this field
UseapplyNameModifier(String)
if you need to generate different full names for same user names -
userName
public final java.lang.String userNameName that will be visible to user i.e. in bottom panel context menu -
isAdd
public final boolean isAdd -
indicatorColorScheme
Default color scheme has only one main color, named as strategy and used for every value -
colorInterface
This will be used to set / get colors described byindicatorColorScheme
If null, colors will be attempted to retrieve via internal color storage by names provided byindicatorColorScheme
-
indicatorLineStyle
Line style used by indicator -
defaultTooltipBackgrondColor
public final java.awt.Color defaultTooltipBackgrondColor -
defaultTooltipTextColor
public final java.awt.Color defaultTooltipTextColor -
indicatorDisplayLogic
-
indicatorMinMarginPriceOut
public final java.lang.Double indicatorMinMarginPriceOut -
indicatorMaxMarginPriceOut
public final java.lang.Double indicatorMaxMarginPriceOut -
minLimitsRange
public final java.lang.Double minLimitsRange -
boundsInfo
-
graphType
Strategies have few options of where graph is displayed, seeLayer1ApiUserMessageModifyIndicator.GraphType
Default:Layer1ApiUserMessageModifyIndicator.GraphType.NONE
-
isSupportWidget
public final boolean isSupportWidgetSome strategies may choose to NOT display themselves as widget Default: true (widget supported) -
isShowColorSettings
public final boolean isShowColorSettings -
isEnableSettingsFromConfigPopup
public final boolean isEnableSettingsFromConfigPopup -
onlineCalculatable
-
aliasFilter
-
widgetDisplayInfo
-
isLineEnabledByDefault
public boolean isLineEnabledByDefault -
isWidgetEnabledByDefault
public boolean isWidgetEnabledByDefault -
indicatorContextMenuInformation
-
horizontalValueLinesInfo
-
graphLayerRenderPriority
public int graphLayerRenderPriority -
iconLayerRenderPriority
public int iconLayerRenderPriority
-
-
Constructor Details
-
Layer1ApiUserMessageModifyIndicator
public Layer1ApiUserMessageModifyIndicator(java.lang.Class<?> strategyClass, java.lang.String userName, boolean isAdd, IndicatorColorScheme indicatorColorScheme, Layer1IndicatorColorInterface colorInterface, IndicatorLineStyle indicatorLineStyle, java.awt.Color defaultTooltipBackgrondColor, java.awt.Color defaultTooltipTextColor, IndicatorDisplayLogic indicatorDisplayLogic, java.lang.Double indicatorMinMarginPriceOut, java.lang.Double indicatorMaxMarginPriceOut, java.lang.Double minLimitsRange, BoundsInfo boundsInfo, Layer1ApiUserMessageModifyIndicator.GraphType graphType, java.lang.Boolean isSupportWidget, java.lang.Boolean isShowColorSettings, java.lang.Boolean isEnableSettingsFromConfigPopup, OnlineCalculatable onlineCalculatable, AliasFilter aliasFilter)Note that you need to rememberfullName
. 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 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 assign according to given color schemecolorInterface
- this will be used to set / get colors described byindicatorColorScheme
indicatorLineStyle
- 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
,indicatorMaxMarginPriceOut
orminLimitsRange
, limits will be modified to fit into provided argumentsindicatorMinMarginPriceOut
- if not null, indicator's limits will be recalculated when there is less then that amount of indicator range empty space by either borderindicatorMaxMarginPriceOut
- if not null, indicator's limits will be recalculated when there is more then that amount of indicator range empty space by either borderminLimitsRange
- if not null, indicator's limits range (max - min value) can't be less then 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 NONE.isSupportWidget
- 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
-
Layer1ApiUserMessageModifyIndicator
public Layer1ApiUserMessageModifyIndicator(Layer1ApiUserMessageModifyIndicator message, boolean isAdd)Copy of message with overriden isAdd -
Layer1ApiUserMessageModifyIndicator
public Layer1ApiUserMessageModifyIndicator(java.lang.Class<?> strategyClass, java.lang.String userName, boolean isAdd)Note that you need to rememberfullName
. 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 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
-
-
Method Details
-
applyNameModifier
public void applyNameModifier(java.lang.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 java.lang.String predictFullName(java.lang.Class<?> myClass, java.lang.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(java.lang.Class<?> strategyClass, java.lang.String userName)Creates builder to buildLayer1ApiUserMessageModifyIndicator
.- 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
-
getOwnerUserName
public static java.lang.String getOwnerUserName(java.lang.Class<?> ownerClass) -
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-