Class: TAIndicator

StockChartX. TAIndicator


new TAIndicator(config)

Represent chart TA indicator.
Parameters:
Name Type Description
config Object The configuration object.
Properties
Name Type Argument Description
chart StockChartX.Chart <optional>
The parent chart.
taIndicator Number The TA indicator number.
parameters Object <optional>
The TA indicator parameters.
panelHeightRatio Number <optional>
The height ratio of the chart panel.
showValueMarkers Boolean <optional>
The flag that indicates whether value markers are visible.
showValuesInTitle Boolean <optional>
The flag that indicates whether values are visible in the title.
Example
// Create simple moving average indicator.
 var sma1 = new StockChartX.TAIndicator({taIndicator: SimpleMovingAverage});

 // Create simple moving average indicator with custom properties.
 var sma2 = new StockChartX.TAIndicator({
     taIndicator: SimpleMovingAverage,
     parameters: {
         StockChartX.IndicatorParam.SOURCE: StockChartX.HIGH_DATA_SERIES_SUFFIX,
         StockChartX.IndicatorParam.PERIODS: 21,
         StockChartX.IndicatorParam.LINE_COLOR: 'green'
         StockChartX.IndicatorParam.LINE_WIDTH: 3,
         StockChartX.IndicatorParam.LINE_STYLE: StockChartX.LineStyle.DASH
     }
 });

Extends

Members


chart :StockChartX.Chart

The parent chart
Type:
Inherited From:

<readonly> chartPanel :StockChartX.ChartPanel

The parent chart panel.
Type:
Inherited From:

isOverlay :boolean

True if it's an overlay indicator, false otherwise.
Type:
  • boolean
Inherited From:

<readonly> panelHeightRatio :number

Gets panel height ratio. It is not used in case of overlay indicator.
Type:
  • number
Inherited From:

parameters :object

The indicator parameters.
Type:
  • object
Inherited From:

showValueMarkers :boolean

Gets/Sets flag that indicates whether value markers are visible on the value scale.
Type:
  • boolean
Inherited From:

showValuesInTitle :boolean

Gets/Sets flag that indicates whether values are visible in the title.
Type:
  • boolean
Inherited From:

<readonly> taIndicator :number

TA indicator number.
Type:
  • number

Methods


allIndicators()

Returns array of all available TA indicators.
Inherited From:
Returns:
Type
Array.<number>

bands()

Returns array of band indicators.
Inherited From:
Returns:
Type
Array.<number>

general()

Returns array of general indicators.
Inherited From:
Returns:
Type
Array.<number>

getName()

Returns indicator name (e.g. 'Simple Moving Average').
Inherited From:
Returns:
Type
string

getParameterValue(paramName)

Returns parameter value by name.
Parameters:
Name Type Description
paramName string The parameter name.
Inherited From:
Returns:
Type
*

getPlotName(fieldName)

Returns plot's name. E.g. 'Top', 'Bottom', 'Median', ...
Parameters:
Name Type Description
fieldName string the TA field name.
Inherited From:
Overrides:
Returns:
Type
string

getShortName()

Returns short indicator name (e.g. 'SMA').
Inherited From:
Returns:
Type
string

hasParameter(paramName)

Returns true if value is set for a given parameter name, false otherwise.
Parameters:
Name Type Description
paramName String The parameter name.
Inherited From:
Returns:
Type
boolean

indices()

Returns array of index indicators.
Inherited From:
Returns:
Type
Array.<number>

movingAverages()

Returns array of moving average indicators.
Inherited From:
Returns:
Type
Array.<number>

oscillators()

Returns array of oscillator indicators.
Inherited From:
Returns:
Type
Array.<number>

regressions()

Returns array of regression indicators.
Inherited From:
Returns:
Type
Array.<number>

serialize()

Serializes indicator state.
Inherited From:
Returns:
Type
object

setParameterValue(paramName, paramValue)

Sets parameter value.
Parameters:
Name Type Description
paramName string
paramValue * The
Inherited From:

update()

Updates indicator.
Inherited From: