Overview
Indicators are analytical tools that help visualize trends, momentum, volatility, and other market characteristics. amCharts 5 Stock provides a comprehensive set of built-in technical indicators.Base Classes
Indicator
Base class for all stock chart indicators.Settings
Instance of the target StockChart.
Main series the indicator is based on.
Volume series the indicator uses, if required.
If set, the indicator will add itself to this legend.
Period for calculations (e.g., number of data points to consider).
Value field to use for calculations.Options:
"open", "close", "low", "high", "hl/2", "hlc/3", "hlcc/4", "ohlc/4"Indicator name (e.g., “Moving Average”).
Short name for the indicator (e.g., “MA”), mainly used in the legend.
Color to use for the indicator series.
Whether indicator settings modal should open automatically when the indicator is added via IndicatorControl.
Properties
The indicator’s data series.
Methods
prepareData()
Prepares and calculates indicator data.markDataDirty()
Marks indicator data as dirty, triggering recalculation.hide()
Hides the indicator.Animation duration in milliseconds.
show()
Shows the indicator.Animation duration in milliseconds.
ChartIndicator
Base class for indicators that are displayed in their own panel.Indicator and adds:
The panel where the indicator is displayed.
The indicator’s X axis.
The indicator’s Y axis.
The indicator panel’s cursor.
The indicator panel’s legend.
Built-in Indicators
MovingAverage
Calculates various types of moving averages.Type of moving average.Options:
"simple", "weighted", "exponential", "dema", "tema"Number of periods to offset the moving average.
BollingerBands
Displays Bollinger Bands with upper, middle, and lower bands.Number of standard deviations for the bands.
Color for the upper band.
Color for the lower band.
Series for the upper band.
Series for the lower band.
MACD
Moving Average Convergence Divergence indicator.Period for the fast moving average.
Period for the slow moving average.
Period for the signal line.
Color for increasing histogram bars.
Color for decreasing histogram bars.
Color for the signal line.
Series for the signal line.
Series for the MACD histogram.
Other Built-in Indicators
amCharts 5 includes many additional indicators:- AccelerationBands - Acceleration Bands indicator
- AccumulationDistribution - Accumulation/Distribution indicator
- AccumulativeSwingIndex - Accumulative Swing Index
- Aroon - Aroon indicator
- AverageTrueRange - Average True Range (ATR)
- AwesomeOscillator - Awesome Oscillator
- BullBearPower - Bull/Bear Power indicator
- ChaikinMoneyFlow - Chaikin Money Flow
- ChaikinOscillator - Chaikin Oscillator
- CommodityChannelIndex - Commodity Channel Index (CCI)
- DisparityIndex - Disparity Index
- HeikinAshi - Heikin-Ashi candlesticks
- MACross - Moving Average Crossover
- MedianPrice - Median Price indicator
- Momentum - Momentum indicator
- MovingAverageDeviation - Moving Average Deviation
- MovingAverageEnvelope - Moving Average Envelope
- OnBalanceVolume - On Balance Volume (OBV)
- OverboughtOversold - Overbought/Oversold indicator
- PVT - Price Volume Trend
- RelativeStrengthIndex - Relative Strength Index (RSI)
- StandardDeviation - Standard Deviation
- StochasticMomentumIndex - Stochastic Momentum Index
- StochasticOscillator - Stochastic Oscillator
- SuperTrend - SuperTrend indicator
- Trix - Triple Exponential Average
- TypicalPrice - Typical Price indicator
- Volume - Volume indicator
- VolumeProfile - Volume Profile
- VWAP - Volume Weighted Average Price
- WilliamsR - Williams %R
- ZigZag - ZigZag indicator
Editable Settings
Indicators can define editable settings that appear in the settings modal:Creating Custom Indicators
To create a custom indicator:- Extend
IndicatororChartIndicator - Implement the
prepareData()method - Define
_editableSettingsfor user customization - Register the class with
registerClass()