public class IndicatorInfo extends Object
Constructor and Description |
---|
IndicatorInfo()
Creates IndicatorInfo without filling any fields
|
IndicatorInfo(String name,
String title,
String groupName,
boolean overChart,
boolean overVolumes,
boolean unstablePeriod,
boolean candlesticks,
int numberOfInputs,
int numberOfOptionalInputs,
int numberOfOutputs)
Deprecated.
all "candlesticks" indicators are just "overChart" indicators with specific output type
|
IndicatorInfo(String name,
String title,
String groupName,
boolean overChart,
boolean overVolumes,
boolean unstablePeriod,
int numberOfInputs,
int numberOfOptionalInputs,
int numberOfOutputs)
Creates IndicatorInfo and fills all fields
|
Modifier and Type | Method and Description |
---|---|
String |
getGroupName()
Returns name of the group
|
String |
getName()
Returns name of the indicator.
|
int |
getNumberOfInputs()
Returns number of inputs, that should be provided before calling function
|
int |
getNumberOfOptionalInputs()
Returns number of optional inputs, that can be set to customize function
|
int |
getNumberOfOutputs()
Returns number of indicator outputs.
|
String |
getTitle()
Returns title of the indicator
|
boolean |
isCandlesticks()
Deprecated.
always returns false
|
boolean |
isDataTypeSupported(DataType dataType)
Checks whether the data type is supported by the indicator
|
boolean |
isOverChart()
Returns true if indicator should be drawn over chart
|
boolean |
isOverVolumes()
Returns true if indicator should be shown over volumes
|
boolean |
isRecalculateAll()
Returns true if indicator should be recalculated for all chart data
|
boolean |
isRecalculateOnNewCandleOnly()
Returns true if indicator gets calculated only once for every newly arriving candle as opposed to every arriving tick
|
boolean |
isShowOnTicks()
Deprecated.
replaced by
isDataTypeSupported(DataType) |
boolean |
isSparceIndicator()
Deprecated.
As of API ver. 2.6.45 replaced by
isSparseIndicator() |
boolean |
isSparseIndicator() |
boolean |
isUnstablePeriod()
Returns true if indicator has unstable period (like EMA or SAR).
|
void |
setCandlesticks(boolean candlesticks)
Deprecated.
if true, then makes indicator "overChart"
|
void |
setGroupName(String groupName)
Sets name of the group
|
void |
setName(String name)
Sets name of the indicator.
|
void |
setNumberOfInputs(int numberOfInputs)
Sets number of inputs
|
void |
setNumberOfOptionalInputs(int numberOfOptionalInputs)
Sets number of optional inputs
|
void |
setNumberOfOutputs(int numberOfOutputs)
Sets number of outputs, that indicator will return
|
void |
setOverChart(boolean overChart)
Sets flag that defines where indicator should be drawn
|
void |
setOverVolumes(boolean overVolumes)
Sets flag that defines where indicator should be drawn
|
void |
setRecalculateAll(boolean recalculateAll)
If set to true, then indicator will be recalculated for all chart data, instead of calculating it only for new arriving candle
|
void |
setRecalculateOnNewCandleOnly(boolean recalculateOnNewCandleOnly)
Set to true if indicator should get calculated only once for every newly arriving candle
|
void |
setShowOnTicks(boolean showOnTicks)
Deprecated.
replaced by
setSupportedDataTypes(DataType... dataTypes) |
void |
setSparceIndicator(boolean sparceIndicator)
Deprecated.
As of API ver. 2.6.45 replaced by
setSparseIndicator(boolean) |
void |
setSparseIndicator(boolean sparseIndicator)
Set this flag to true if indicator doesn't draw values for every candle, e.g.
|
void |
setSupportedDataTypes(DataType... dataTypes)
Sets the data types supported by the indicator
|
void |
setTitle(String title)
Sets title of the indicator
|
void |
setUnstablePeriod(boolean unstablePeriod)
Sets flag that defines if indicator has unstable period
|
public IndicatorInfo()
public IndicatorInfo(String name, String title, String groupName, boolean overChart, boolean overVolumes, boolean unstablePeriod, boolean candlesticks, int numberOfInputs, int numberOfOptionalInputs, int numberOfOutputs)
name
- name of the indicator. Should be something simple like SMA for Simple Moving Average or BBANDS for Bollinger Bandstitle
- title of the indicatorgroupName
- name of the indicator groupoverChart
- true if indicator should be drawn over candles/ticksoverVolumes
- true if indicator should be drawn over volume informationunstablePeriod
- true if indicator has unstable period (like EMA or SAR). This will add more candles in every call to stabilize functioncandlesticks
- true if indicator is Pattern Recognition function and should be shown over barsnumberOfInputs
- number of inputs that user should providenumberOfOptionalInputs
- number of optional inputsnumberOfOutputs
- number of outputs, that function returnspublic IndicatorInfo(String name, String title, String groupName, boolean overChart, boolean overVolumes, boolean unstablePeriod, int numberOfInputs, int numberOfOptionalInputs, int numberOfOutputs)
name
- name of the indicator. Should be something simple like SMA for Simple Moving Average or BBANDS for Bollinger Bandstitle
- title of the indicatorgroupName
- name of the indicator groupoverChart
- true if indicator should be drawn over candles/ticksoverVolumes
- true if indicator should be drawn over volume informationunstablePeriod
- true if indicator has unstable period (like EMA or SAR). This will add more candles in every call to stabilize functionnumberOfInputs
- number of inputs that user should providenumberOfOptionalInputs
- number of optional inputsnumberOfOutputs
- number of outputs, that function returnspublic String getName()
public void setName(String name)
name
- name of the indicatorpublic String getTitle()
public void setTitle(String title)
title
- title of the indicatorpublic String getGroupName()
public void setGroupName(String groupName)
groupName
- name of the grouppublic boolean isOverChart()
public void setOverChart(boolean overChart)
overChart
- true if indicator should be drawn over chartpublic boolean isOverVolumes()
public void setOverVolumes(boolean overVolumes)
overVolumes
- true if indicator should be shown over volumespublic boolean isUnstablePeriod()
public void setUnstablePeriod(boolean unstablePeriod)
unstablePeriod
- true if indicator has unstable period@Deprecated public boolean isCandlesticks()
@Deprecated public void setCandlesticks(boolean candlesticks)
public int getNumberOfInputs()
public void setNumberOfInputs(int numberOfInputs)
numberOfInputs
- number of inputspublic int getNumberOfOptionalInputs()
public void setNumberOfOptionalInputs(int numberOfOptionalInputs)
numberOfOptionalInputs
- number of optional inputspublic int getNumberOfOutputs()
public void setNumberOfOutputs(int numberOfOutputs)
numberOfOutputs
- number of outputs@Deprecated public boolean isShowOnTicks()
isDataTypeSupported(DataType)
@Deprecated public void setShowOnTicks(boolean showOnTicks)
setSupportedDataTypes(DataType... dataTypes)
public boolean isRecalculateAll()
public void setRecalculateAll(boolean recalculateAll)
recalculateAll
- true if complete recalculation@Deprecated public boolean isSparceIndicator()
isSparseIndicator()
@Deprecated public void setSparceIndicator(boolean sparceIndicator)
setSparseIndicator(boolean)
public boolean isSparseIndicator()
public void setSparseIndicator(boolean sparseIndicator)
sparseIndicator
- draw indicator on more data than is visible on the screenpublic boolean isRecalculateOnNewCandleOnly()
public void setRecalculateOnNewCandleOnly(boolean recalculateOnNewCandleOnly)
recalculateOnNewCandleOnly
- calculate indicator only once for every newly arriving candlepublic void setSupportedDataTypes(DataType... dataTypes)
dataTypes
- data types supported by the indicatorpublic boolean isDataTypeSupported(DataType dataType)
dataType
- data type to checkCopyright © 2016. All rights reserved.