IndicatorShortName

Sets the short name for the indicator.

Syntax

IndicatorShortName(shortName: string): void

Parameters

  • shortName - A string containing the short name for the indicator.

Return Value

This method does not return a value.

Description

The IndicatorShortName method sets the short name that will be displayed for the indicator in the chart legend, indicator list, and other UI elements. This name helps users identify the indicator on the chart.

Example

// Set a simple name
this.api.IndicatorShortName('RSI(14)')

// Include parameter values in the name
const period = 14
const price = 'Close'
this.api.IndicatorShortName(`MA(${period}, ${price})`)

// For a custom indicator with multiple parameters
this.api.IndicatorShortName(`Custom Oscillator(${fast}, ${slow}, ${signal})`)

Last updated