TOptionType

An enumeration of option types used for indicator and strategy parameters.

Values

Value
Description

LONGWORD

Represents an unsigned 32-bit integer

INTEGER

Represents a signed integer value

DOUBLE

Represents a floating-point number

STRING

Represents a text string

BOOLEAN

Represents a true/false value

ENUM_TYPE

Represents a selection from a list of predefined values

TIMEFRAME

Represents a chart timeframe

CURRENCY

Represents a currency selection

LINE_STYLE

Represents a line style for drawing

SEPARATOR

Represents a visual separator in the options dialog

INDICATOR

Represents an indicator selection

COLOR

Represents a color selection

DATE_TIME

Represents a date and time value

LEVELS

Represents level settings

SESSION

Represents a trading session

SESSIONS_ARRAY

Represents an array of trading sessions

Example Usage

// Register an integer option
this.api.RegOption("Period", TOptionType.INTEGER, 14);

// Register a color option
this.api.RegOption("Line Color", TOptionType.COLOR, "#0000FF");

// Register a boolean option
this.api.RegOption("Show Labels", TOptionType.BOOLEAN, true);

// Register an enum option
this.api.RegOption("MA Type", TOptionType.ENUM_TYPE, 0);

// Add a separator
this.api.AddSeparator("Visual Settings");

Last updated