Class RuntimeDescriptor
java.lang.Object
com.motivewave.platform.sdk.study.RuntimeDescriptor
This class describes 'runtime' settings for the study.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addHorizontalLine
(LineInfo info) Adds a horizontal line to the default plot using the information defined in LineInfo.void
Adds a new plot to the study.void
void
Removes all of the horizontal lines.void
declareBars
(Object valueKey) Declare bar sequence on the default plot using the default settings for drawing bars.void
declareBars
(Object valueKey, String settingsKey) Declare a bar sequence associated with the given value key for the default plot.void
declareIndicator
(Object valueKey, String indicatorKey) Associates a value key to an indicator on the default plot.void
declarePath
(Object valueKey, String pathSettingsKey) Declare a path associated with the given value key for the default plot.void
declarePriceBar
(Object valueKey, String settingsKey) Declare a price bar associated with the given value key for the default plot.void
declareSignal
(Object key, String label) Declare a signal with the given key and user readable string.void
exportValue
(ValueDescriptor desc) Exports a value so that it may be used outside of the context of the study.findExportedValue
(String keyString) Finds the exported value using a string key.getBars()
Gets the map of declared bars for the default plot.int
Gets the bottom inset for the default plot (in pixels).Gets the default plot.getExportedValue
(Object key) Gets the exported value associated with the given key.Gets the list of exported values.Gets the 'fixed' bottom value (null if not defined).Gets the 'fixed' top value (null if not defined).Gets the list of horizontal lines declared for the default plot.Gets the set of settings that are part of the ID for the default plot.Gets the map of declared indicators for the default plot.Gets the label prefix for the default plot.Gets the label settings for the default plot.Gets the 'maximum' bottom value (null if not defined).Gets the minimum tick value for the vertical axis of the default plot (if this is not an overlay).Gets the 'minimum' top value (null if not defined).getPaths()
Gets the map of declared paths for the default plot.Gets the plot associated with the given name.Gets the set of plot keys registered to this study.Gets the price plot.Gets the range keys for the default plot.Gets the signal associated with the given key.Gets the list of signals generated by this study.Gets the tab name for the default plot.int
Gets the top inset for the default plot (in pixels).getValueSeries
(Object valueKey) Gets the data series for the value key.boolean
Indicates that the price plot is required for this study.boolean
Returns true if this study if only for Range or Renko bars.void
setBottomInsetPixels
(int pixels) Sets the bottom inset for the default plot (in pixels).void
setFixedBottomValue
(Integer value) Sets the 'fixed' bottom value (null if not defined).void
setFixedTopValue
(Integer value) Sets the 'fixed' top value (null if not defined).void
setIDSettings
(String... vals) Use this method to identify which settings should be part of the default plot identifier.void
setLabelPrefix
(String label) Sets the label prefix for the default plot.void
setLabelSettings
(String... vals) Use this method to identify which settings should be part of the default plot label (and to identify the study).void
setMaxBottomValue
(Integer max) Sets the 'maximum' bottom value (null if not defined).void
setMinTick
(Double minTick) Sets the minimum tick for the vertical axis of the default plot (if this is not an overlay).void
Sets the 'minimum' top value (null if not defined).void
setPricePlotRequired
(boolean b) Sets the required attribute for the price plot.void
setRangeKeys
(Object... keys) Use this method to identify the numeric values generated by this study that are to affect the vertical range of the default plot (when auto scale is turned on).void
setRangeOrRenkoOnly
(boolean b) Use this method to set a study to be used with Range or Renko bars only.void
setTabName
(String label) Sets the tab name.void
setTopInsetPixels
(int pixels) Sets the top inset for the default plot (in pixels).void
setValueSeries
(Object valueKey, Object barSizeOrSettingsKey) Sets the data series for the value key.
-
Constructor Details
-
RuntimeDescriptor
public RuntimeDescriptor()Creates a RuntimeDescriptor object. Note: this constructor is deprecated. Please use RuntimeDescriptor(Study study) instead.
-
-
Method Details
-
addPlot
-
getPlot
-
getDefaultPlot
Gets the default plot. This is equivalent to getPlot(Plot.DEFAULT)- Returns:
- default plot
-
getPricePlot
Gets the price plot. This is equivalent to getPlot(Plot.PRICE)- Returns:
- price plot
-
isPricePlotRequired
public boolean isPricePlotRequired()Indicates that the price plot is required for this study.- Returns:
- true if the price plot is required for this study
-
setPricePlotRequired
public void setPricePlotRequired(boolean b) Sets the required attribute for the price plot.- Parameters:
b
- true if the price plot is required
-
getPlotKeys
-
clearExportedValues
public void clearExportedValues() -
exportValue
Exports a value so that it may be used outside of the context of the study. Exported values may be used as:- Cursor Data - displayed in the Cursor Data Window
- Input for another Study - Studies may be created with values from other studies.
- Scanner parameters - The Study Scanner may use these values as conditions.
- Alerts - Alerts may be triggered using these values.
- Parameters:
desc
- describes the exported value
-
getExportedValue
Gets the exported value associated with the given key.- Parameters:
key
-- Returns:
- export value associated with the given key
-
getExportedValues
Gets the list of exported values.- Returns:
- list of exported values
-
findExportedValue
Finds the exported value using a string key.- Parameters:
keyString
-- Returns:
- exported value using the string key
-
declareSignal
-
getSignals
Gets the list of signals generated by this study.- Returns:
- list of signals generated by this study
-
getSignal
Gets the signal associated with the given key.- Parameters:
key
-- Returns:
- signal associated with the given key
-
isRangeOrRenkoOnly
public boolean isRangeOrRenkoOnly()Returns true if this study if only for Range or Renko bars.- Returns:
- true if this study is only for Range or Renko bars.
-
setRangeOrRenkoOnly
public void setRangeOrRenkoOnly(boolean b) Use this method to set a study to be used with Range or Renko bars only.- Parameters:
b
- true if this study is only for Range or Renko bars.
-
setLabelSettings
Use this method to identify which settings should be part of the default plot label (and to identify the study). -
getLabelSettings
-
setIDSettings
Use this method to identify which settings should be part of the default plot identifier. By default, the label settings will be used. Use this to override the label settings.- Parameters:
vals
- ID setting values
-
getIDSettings
-
getLabelPrefix
Gets the label prefix for the default plot. If this is empty, the label attribute from the StudyHeader will used instead.- Returns:
- label prefix for the default plot
-
setLabelPrefix
Sets the label prefix for the default plot. If this is not set, the label attribute from the StudyHeader will be used instead.- Parameters:
label
- label prefix
-
getTabName
Gets the tab name for the default plot. If this is empty, the label attribute from the StudyHeader will used instead.- Returns:
- tab name for the default plot
-
setTabName
Sets the tab name. If this is not set, the label attribute from the StudyHeader will be used instead.- Parameters:
label
- tab name label
-
setRangeKeys
Use this method to identify the numeric values generated by this study that are to affect the vertical range of the default plot (when auto scale is turned on). -
getRangeKeys
-
declarePath
Declare a path associated with the given value key for the default plot. Settings for the path are resolved using the pathSettingsKey. At runtime a path will be drawn (if enabled) using the values defined by the valueKey.- Parameters:
valueKey
- unique identifier for the valuepathSettingsKey
- settings key of the path
-
declarePriceBar
Declare a price bar associated with the given value key for the default plot. Settings for the price bars are resolved using the settingsKey. At runtime a series of price bars will be drawn (if enabled) using the values defined by the valueKey.- Parameters:
valueKey
- unique identifier for the valuesettingsKey
- settings key of the path
-
setValueSeries
Sets the data series for the value key. By default values are pulled from the primary data series Setting this will cause the framework to load values from a different data series.- Parameters:
valueKey
- unique identifier for the valuebarSizeOrSettingsKey
- bar size of the data series, null for the primary data series. Alternatively specify a settings key that points to a BarSizeDescriptor. This will dynamically choose the bar size
-
getValueSeries
-
declareIndicator
-
declareBars
Declare a bar sequence associated with the given value key for the default plot. Settings for the bars are resolved using the pathSettingsKey. At runtime a set of bars will be drawn (if enabled) using the values defined by the valueKey.- Parameters:
valueKey
-settingsKey
-
-
declareBars
Declare bar sequence on the default plot using the default settings for drawing bars.- Parameters:
valueKey
-
-
addHorizontalLine
Adds a horizontal line to the default plot using the information defined in LineInfo.- Parameters:
info
- line info object
-
clearHorizontalLines
public void clearHorizontalLines()Removes all of the horizontal lines. -
getTopInsetPixels
public int getTopInsetPixels()Gets the top inset for the default plot (in pixels).- Returns:
- top inset for the default plot
-
setTopInsetPixels
public void setTopInsetPixels(int pixels) Sets the top inset for the default plot (in pixels).- Parameters:
pixels
-
-
getBottomInsetPixels
public int getBottomInsetPixels()Gets the bottom inset for the default plot (in pixels).- Returns:
- bottom inset for the default plot
-
setBottomInsetPixels
public void setBottomInsetPixels(int pixels) Sets the bottom inset for the default plot (in pixels).- Parameters:
pixels
-
-
getFixedBottomValue
Gets the 'fixed' bottom value (null if not defined). This value is used to determine the range of the default plot (bottom of the vertical axis).- Returns:
- fixed bottom value
-
setFixedBottomValue
Sets the 'fixed' bottom value (null if not defined). This value is used to determine the range of the default plot (bottom of the vertical axis).- Parameters:
value
- fixed bottom value
-
getFixedTopValue
Gets the 'fixed' top value (null if not defined). This value is used to determine the range of the default plot (top of the vertical axis).- Returns:
- fixed top value
-
setFixedTopValue
Sets the 'fixed' top value (null if not defined). This value is used to determine the range of the default plot (top of the vertical axis).- Parameters:
value
-
-
getMaxBottomValue
Gets the 'maximum' bottom value (null if not defined). This value is used to determine the range of the default plot (bottom of the vertical axis).- Returns:
- maximum bottom value
-
setMaxBottomValue
Sets the 'maximum' bottom value (null if not defined). This value is used to determine the range of the default plot (bottom of the vertical axis).- Parameters:
max
- maximum bottom value
-
getMinTopValue
Gets the 'minimum' top value (null if not defined). This value is used to determine the range of the default plot (top of the vertical axis). -
setMinTopValue
Sets the 'minimum' top value (null if not defined). This value is used to determine the range of the default plot (top of the vertical axis). -
getMinTick
Gets the minimum tick value for the vertical axis of the default plot (if this is not an overlay). Null is return if this value should be calculated automatically- Returns:
- minimum tick value
-
setMinTick
Sets the minimum tick for the vertical axis of the default plot (if this is not an overlay). Set to null (default) to automatically detect the minimum value.- Parameters:
minTick
- minimum tick value
-
getHorizontalLines
-
getPaths
-
getIndicators
-
getBars
-