Percentage Price Oscillator (PPO) indicator shows the difference between Exponentially weighted Moving Average (EMA) of Short period data, and EMA of Long period data. Signal line is signal period EMA of PPO. Histogram shows the percentage difference between PPO and Signal.

Hierarchy

Constructors

  • Parameters

    • priceChart: TradingChart
    • chart: ChartXY<UIBackground>
    • openValues: number[]
    • highValues: number[]
    • lowValues: number[]
    • closeValues: number[]
    • longPeriodCount: number
    • shortPeriodCount: number
    • signalPeriodCount: number
    • ppoColor: Color
    • signalColor: Color
    • histogramColor: Color
    • lineWidth: number
    • rowIndex: number

    Returns PercentagePriceOscillator

Methods

  • Gets the indicator name.

    Returns string

    The indicator name.

  • Sets the color for the Histogram.

    Parameters

    • histogramColor: string

      Color for the Histogram.

    Returns void

  • Sets the width of the PPO and Signal lines.

    Parameters

    • newWidth: number

      New line width.

    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 color of the PPO line.

    Parameters

    • newColor: string

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

    Returns void

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

    Parameters

    • longPeriodCount: number

      New long period count.

    • shortPeriodCount: number

      New short 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 which values the indicator calculations are based on.

    Parameters

    • source: Source

      Values to base the calculations on.

    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