Class IndicatorInfo
java.lang.Object
com.motivewave.platform.sdk.common.BaseInfo
com.motivewave.platform.sdk.common.TagInfo
com.motivewave.platform.sdk.common.IndicatorInfo
- All Implemented Interfaces:
Cloneable
- Direct Known Subclasses:
GuideInfo
Encapsulates configuration information for indicators that are displayed on the Price Axis (for overlays) or
on the value axis (study graphs).
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected boolean
protected Font
protected String
protected String
protected Color
protected Color
protected float[]
protected BasicStroke
protected float
protected Color
protected boolean
protected boolean
protected boolean
protected Enums.Position
protected Color
protected boolean
-
Constructor Summary
ConstructorsConstructorDescriptionIndicatorInfo
(String id, boolean showLine, float lineWidth, float[] lineDash, Color lineColor, boolean showTag, String tag, TextStyle tagStyle, boolean showLabel, String label, Font labelFont, boolean showOutline, Color outlineColor, Color textColor, Color lblColor, boolean top, boolean enabled) Constructs an Indicator Info.IndicatorInfo
(String id, Color lblColor, Color textColor, boolean showLine, boolean enabled) Constructs an Indicator Info.IndicatorInfo
(String id, Color lblColor, Color textColor, Color outlineColor, boolean outlineEnabled, Font font, boolean top, boolean showLabel, Color lineColor, float lineWidth, float[] lineDash, boolean showLine, boolean showTag, String tag, Color tagTextColor, Color tagBgColor, boolean enabled) Constructs an Indicator Info.IndicatorInfo
(String id, String label) IndicatorInfo
(String id, String label, Color lblColor, Color textColor, boolean enabled) -
Method Summary
Modifier and TypeMethodDescriptionclone()
Creates a clone (copy) of this object.static IndicatorInfo
fromJson
(String str, IndicatorInfo def) getFont()
Gets the font the indicator label and tag.getId()
Gets the name (id) of this indicator.getLabel()
Gets the label of this indicator.Gets the background color for the indicator.Gets the color for the line.float[]
Gets the dash style for the indicator line.float
Gets the width of the indicator line.getName()
Deprecated.use getId() insteadGets the outline color for the indicator.Gets the alignment for the tag (LEFT, RIGHT, CENTER)Gets the text color for the indicator.boolean
Indicates if the indicator line should only extend to the last (latest) bar.boolean
boolean
Indicates if this indicator label should be shown.boolean
Indicates if this indicator should show a horizontal line.boolean
isTop()
boolean
setExtLastBar
(boolean b) Creates a copy of the object and sets the option to extend the line to the latest bar.Creates a copy of the object and sets the label color.setLineDash
(float[] dash) setLineWidth
(float width) Creates a copy of the object and sets the text color.setShowLine
(boolean b) setShowTag
(boolean b) Creates a copy of the object and sets the showTag attribute.setShowTagValue
(boolean b) Creates a copy of the object and sets the showTagValue attribute.Creates a copy of the object and sets the tag attribute.setTagAlign
(Enums.Position align) Creates a copy of the object and sets the label color.Creates a copy of the object and sets the tag attribute.setTagStyle
(TextStyle ts) Creates a copy of the object and sets the tag attribute.Creates a copy of the object and sets the text color.setTop
(boolean b) protected void
withEnabled
(boolean b) Methods inherited from class com.motivewave.platform.sdk.common.TagInfo
getTag, getTagBgColor, getTagFont, getTagStyle, getTagTextColor, isShowTag, isShowTagValue
-
Field Details
-
id
-
label
-
labelColor
-
textColor
-
lineColor
-
outlineColor
-
font
-
showLine
protected boolean showLine -
showLabel
protected boolean showLabel -
top
protected boolean top -
showOutline
protected boolean showOutline -
extLastBar
protected boolean extLastBar -
lineWidth
protected float lineWidth -
lineDash
protected float[] lineDash -
lineStroke
-
tagAlign
-
-
Constructor Details
-
IndicatorInfo
-
IndicatorInfo
-
IndicatorInfo
Constructs an Indicator Info.- Parameters:
id
- - name (identifier)lblColor
- - Background colortextColor
- - Text colorshowLine
- - true if a vertical line should be shown with the indicator.enabled
- - true if this indicator should be displayed.
-
IndicatorInfo
public IndicatorInfo(String id, Color lblColor, Color textColor, Color outlineColor, boolean outlineEnabled, Font font, boolean top, boolean showLabel, Color lineColor, float lineWidth, float[] lineDash, boolean showLine, boolean showTag, String tag, Color tagTextColor, Color tagBgColor, boolean enabled) Constructs an Indicator Info.- Parameters:
id
- - name (identifier)lblColor
- - Background (Indicator Label) colortextColor
- - Text coloroutlineColor
- - Outline Color for the labeloutlineEnabled
- - true if the label outline should be drawnfont
- - Indicator Fonttop
- - true if the indicator label should be shown on topshowLabel
- - true if the indicator label should be shownlineColor
- - Line ColorlineWidth
- - Width of the Indicator LinelineDash
- - Dash style of the Indicator Line (null for solid line)showLine
- - true if a vertical line should be shown with the indicator.showTag
- - true if the tag should be shown next to the labeltag
- - descriptive tagtagTextColor
- text color for the tagtagBgColor
- color for the tag backgroundenabled
- - true if this indicator should be displayed.
-
IndicatorInfo
public IndicatorInfo(String id, boolean showLine, float lineWidth, float[] lineDash, Color lineColor, boolean showTag, String tag, TextStyle tagStyle, boolean showLabel, String label, Font labelFont, boolean showOutline, Color outlineColor, Color textColor, Color lblColor, boolean top, boolean enabled) Constructs an Indicator Info.- Parameters:
id
- - name (identifier)showLine
- - true if a vertical line should be shown with the indicator.lineWidth
- - Width of the Indicator LinelineDash
- - Dash style of the Indicator Line (null for solid line)lineColor
- - Line ColorshowTag
- - true if the tag should be shown next to the labeltag
- - descriptive tagshowLabel
- - true if the indicator label should be shownoutlineColor
- - Outline Color for the labeltextColor
- - Text colorlblColor
- - Background (Indicator Label) colortop
- - true if the indicator label should be shown on topenabled
- - true if this indicator should be displayed.outlineEnabled
- - true if the label outline should be drawnfont
- - Indicator FonttagTextColor
- text color for the tagtagBgColor
- color for the tag background
-
-
Method Details
-
updateKey
-
getId
-
getName
Deprecated.use getId() insteadGets the name (id) of this indicator.- Returns:
- name of the indicator
-
getLabel
-
isShowLabel
public boolean isShowLabel()Indicates if this indicator label should be shown.- Returns:
- true if the indicator label is visible
-
getLabelColor
Gets the background color for the indicator.- Returns:
- background color for the indicator
-
setLabelColor
Creates a copy of the object and sets the label color.- Parameters:
c
- color of the label- Returns:
- copy of the object with the label color set
-
getTagAlign
Gets the alignment for the tag (LEFT, RIGHT, CENTER) -
setTagAlign
Creates a copy of the object and sets the label color.- Parameters:
align
- tag alignment- Returns:
- copy of the object with the tag align set
-
getTextColor
Gets the text color for the indicator.- Returns:
- text color for the indicator
-
setTextColor
Creates a copy of the object and sets the text color.- Parameters:
c
- color of the text- Returns:
- copy of the object with the text color set
-
getOutlineColor
Gets the outline color for the indicator.- Returns:
- outline color for the indicator
-
setOutlineColor
Creates a copy of the object and sets the text color.- Parameters:
c
- color of the text- Returns:
- copy of the object with the text color set
-
isOutlineEnabled
public boolean isOutlineEnabled()- Returns:
- true of the outline color should be used
-
getLineColor
-
isShowLine
public boolean isShowLine()Indicates if this indicator should show a horizontal line.- Returns:
- true if a line should drawn with this indicator
-
isExtLastBar
public boolean isExtLastBar()Indicates if the indicator line should only extend to the last (latest) bar.- Returns:
- true if a line should drawn only to the latest bar
-
setExtLastBar
Creates a copy of the object and sets the option to extend the line to the latest bar.- Parameters:
c
- color of the text- Returns:
- copy of the object with the text color set
-
getLineDash
public float[] getLineDash()Gets the dash style for the indicator line.- Returns:
- dash style
-
getLineWidth
public float getLineWidth()Gets the width of the indicator line.- Returns:
- the with of the indicator line
-
getFont
-
setFont
-
setTagBgColor
Description copied from class:TagInfo
Creates a copy of the object and sets the tag attribute.- Overrides:
setTagBgColor
in classTagInfo
- Returns:
- copy of the object
-
setTagTextColor
Description copied from class:TagInfo
Creates a copy of the object and sets the tag attribute.- Overrides:
setTagTextColor
in classTagInfo
- Returns:
- copy of the object
-
setTag
Description copied from class:TagInfo
Creates a copy of the object and sets the tag attribute. -
setShowTagValue
Description copied from class:TagInfo
Creates a copy of the object and sets the showTagValue attribute.- Overrides:
setShowTagValue
in classTagInfo
- Returns:
- copy of the object
-
setShowTag
Description copied from class:TagInfo
Creates a copy of the object and sets the showTag attribute.- Overrides:
setShowTag
in classTagInfo
- Parameters:
b
- true if the tag should be displayed- Returns:
- copy of the object
-
setTagStyle
- Overrides:
setTagStyle
in classTagInfo
-
setShowLine
-
setLineDash
-
setLineWidth
-
getTextStyle
-
isUseDefaultFont
public boolean isUseDefaultFont()- Returns:
- true if the default font should be used.
-
isTop
public boolean isTop() -
setTop
-
withEnabled
-
getLineStroke
-
clone
Creates a clone (copy) of this object. -
toJson
-
fromJson
-