Volume Oscillator (VO) is a momentum oscillator for Volume, that works similarly to MACD. VO can be used to confirm or refute other signals. VO line is the difference between the selected moving average of short period data and long period data. Signal line is Signal period moving average of VO. Histogram shows the difference between VO and Signal.

Hierarchy

Constructors

  • Parameters

    • priceChart: TradingChart
    • chart: ChartXY<UIBackground>
    • volumes: number[]
    • shortPeriodCount: number
    • longPeriodCount: number
    • signalPeriodCount: number
    • voColor: Color
    • signalColor: Color
    • histogramColor: Color
    • lineWidth: number
    • rowIndex: number

    Returns VolumeOscillator

Methods

  • Gets the indicator name.

    Returns string

    The indicator name.

  • Sets whether the difference between the short and long moving averages is calculated as a percentage and instead as an actual volume difference.

    Parameters

    • calculateAsPercentage: boolean

      Set true calculate as a percentage.

    Returns void

  • Sets the color for the Histogram.

    Parameters

    • histogramColor: string

      Color for the Histogram.

    Returns void

  • Sets the width of the VO and Signal lines.

    Parameters

    • newWidth: number

      New line width.

    Returns void

  • Sets the type of Moving Average used to calculate the Signal line.

    Parameters

    Returns void

  • Sets the type of Moving Average used to calculate the short and long averages.

    Parameters

    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

  • Sets the numbers of time periods (n) used to calculate the indicator.

    Parameters

    • shortPeriodCount: number

      New short period count.

    • longPeriodCount: number

      New long period count.

    • signalPeriodCount: number

      New signal period count.

    Returns void

  • Sets the color of the Signal line.

    Parameters

    • newColor: string

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

    Returns void

  • Sets the color of the Volume Oscillator line.

    Parameters

    • newColor: string

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

    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