Stochastic Momentum Index (SMI) is a variation of Stochastic Oscillator. It shows the distance between the current price and the midpoint of High/Low range. SMI is therefore less unpredictable compared to regular Stochastic Oscillator.

Hierarchy

Constructors

  • Parameters

    • priceChart: TradingChart
    • chart: ChartXY<UIBackground>
    • closeValues: number[]
    • highValues: number[]
    • lowValues: number[]
    • smiLineColor: Color
    • maLineColor: Color
    • oversoldColor: Color
    • overboughtColor: Color
    • lineWidth: number
    • rowIndex: number

    Returns StochasticMomentumIndex

Methods

  • Gets the indicator name.

    Returns string

    The indicator name.

  • Sets the width of the oscillator and moving average lines.

    Parameters

    • newWidth: number

      New line width.

    Returns void

  • Sets the color of the moving average line.

    Parameters

    • newColor: string

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

    Returns void

  • Sets the types of the moving averages used in the indicator's calculations.

    Parameters

    • oscillatorSmoothingAverage: MovingAverageType

      Moving average type for smoothing the oscillator (%K) line.

    • maMovingAverage: number

      Moving average type for calculating the moving average (%D) line.

    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 overbought range line.

    Parameters

    • newColor: string

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

    Returns void

  • Sets the values for oversold and overbought ranges.

    Parameters

    • oversoldRange: number

      Oversold range.

    • overboughtRange: number

      Overbought range.

    Returns void

  • Sets the color of the oversold range line.

    Parameters

    • newColor: string

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

    Returns void

  • Sets the time period counts used to calculate the indicator.

    Parameters

    • oscillatorPeriodCount: number

      The number of time periods used to calculate the oscillator line (%K).

    • firstSmoothPeriods: number

      The number of time periods used for the first smoothing of the oscillator line.

    • doubleSmoothPeriods: number

      The number of time periods used for the second (double) smoothing of the oscillator line.

    • movingAveragePeriodCount: number

      The number of time periods used to calculate the moving average line (%D).

    Returns void

  • Sets the color of the 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