Volatility Indicators icon

Volatility Indicators

Calculate volatility indicators using the indicatorts library

Overview

This node calculates various volatility indicators based on OHLCV (Open, High, Low, Close, Volume) data using the indicatorts and technicalindicators libraries. It supports multiple popular volatility metrics such as Average True Range, Bollinger Bands, Donchian Channel, and others.

Typical use cases include:

  • Analyzing market volatility to inform trading strategies.
  • Generating technical signals for algorithmic trading or portfolio management.
  • Enhancing financial dashboards with volatility insights.

For example, a trader might input historical price data and select the "Average True Range" indicator to measure recent market volatility and adjust stop-loss levels accordingly.

Properties

Name Meaning
Indicators Select one or more volatility indicators to calculate. Options include: Acceleration Bands, Average True Range, Bollinger Bands, Chandelier Exit, etc.
OHLCV Data JSON string containing an array of OHLCV data points. Each data point is expected to be an array where indices correspond to [timestamp, open, high, low, close, volume].
Acceleration Bands Period Period length used in calculating Acceleration Bands (default 20).
Acceleration Bands Multiplier Multiplier factor for Acceleration Bands calculation (default 4).
ATR Period Period length for Average True Range calculation (default 14).
Bollinger Bands Period Period length for Bollinger Bands and Bollinger Bands Width calculations (default 20).
Chandelier Exit Period Period length for Chandelier Exit calculation (default 22).
Donchian Channel Period Period length for Donchian Channel calculation (default 20).
Keltner Channel Period Period length for Keltner Channel calculation (default 20).
Moving Standard Deviation Period Period length for Moving Standard Deviation calculation (default 20).
Projection Oscillator Period Period length for Projection Oscillator calculation (default 14).
Projection Oscillator Smooth Smoothing period for Projection Oscillator calculation (default 3).
Standard Deviation Period Period length for Standard Deviation calculation (default 20).
Ulcer Index Period Period length for Ulcer Index calculation (default 14).
Options > Return Type Choose output format: "Values Only" returns just the calculated values; "With Metadata" includes additional info like input length, number of indicators, and timestamp.

Output

The node outputs a single JSON object per input item with the following structure:

{
  "indicators": [
    {
      "indicator": "averageTrueRange",
      "parameters": { "period": 14 },
      "result": [ /* array of calculated values */ ]
    },
    {
      "indicator": "bollingerBands",
      "parameters": { "period": 20 },
      "result": { /* object with upper, middle, lower bands arrays */ }
    }
    // ...one entry per selected indicator
  ],
  "metadata": {
    "inputLength": 100,
    "indicatorsCount": 2,
    "calculationTimestamp": "2024-06-01T12:00:00.000Z"
  }
}
  • The indicators array contains objects for each requested indicator, including the parameters used and the computed results.
  • If the "Return Type" option is set to "Values Only", the metadata field is omitted.
  • The result field varies by indicator type: some return arrays of numbers, others return objects with multiple series.
  • No binary data output is produced by this node.

Dependencies

  • Requires the indicatorts library for most volatility indicator calculations.
  • Uses the technicalindicators library specifically for Standard Deviation.
  • Input data must be provided as a JSON string representing OHLCV arrays.
  • No external API keys or credentials are needed.
  • Ensure that the input OHLCV data is correctly formatted and non-empty.

Troubleshooting

  • Failed to parse OHLCV data: This error occurs if the input OHLCV JSON string is invalid or malformed. Verify that the input is a valid JSON string representing an array of OHLCV arrays.
  • OHLCV data must be a non-empty array: The node requires at least one OHLCV data point to perform calculations. Provide sufficient historical data.
  • Unsupported indicator: If an unrecognized indicator value is passed, the node will throw an error. Confirm that only supported indicators from the list are selected.
  • Empty or missing indicator results: Check that the input data covers enough periods for the chosen indicator's calculation window.
  • To continue processing despite errors in some items, enable the "Continue On Fail" option in the workflow.

Links and References

Discussion