Volume is the number of traded securities over a certain time period.

Hierarchy

Constructors

  • Parameters

    • priceChart: TradingChart
    • chart: ChartXY<UIBackground>
    • volumes: number[]
    • twoColoredBars: boolean
    • barColor: Color
    • offset: number
    • rowIndex: number
    • openValues: number[] = []
    • closeValues: number[] = []

    Returns Volume

Methods

  • Gets the indicator name.

    Returns string

    The indicator name.

  • Sets the color of the volume bars. Has no effect when two colored bars are being used.

    Parameters

    • newColor: string

      New line color as string, should be in HEX format e.g. #FFFFFF.

    Returns void

  • Sets the name of the indicator.

    Parameters

    • name: string

      New indicator name.

    Returns void

  • Moves the indicator from its calculated position forward or backward.

    Parameters

    • newOffset: number

      New offset value.

    Returns void

  • When enabled, shows Volume as an overlay in the price chart. When disabled, Volume is shown as a separate study below the price chart.

    Parameters

    • showAsOverlay: boolean

      Set true to show as an overlay, false to show as a separate study.

    Returns void

  • When enabled, the Volume bars are colored based on the OHLC-data's candlestick/bar color of that day.

    Parameters

    • useTwoColors: boolean

      Use two colored bars.

    Returns void

  • Sets the type of the indicator's value label(s).

    Parameters

    Returns void

  • Sets the visibility of the indicator. Hiding the indicator via setVisible(false) does not remove it. Use dispose() to delete any indicator.

    Parameters

    • visible: boolean

      Visibility of the indicator.

    Returns void

  • Programmatically opens the indicator settings menu.

    Returns void