RegOption
Registers a new option parameter for an indicator or strategy.
Syntax
RegOption(name: string, type: TOptionType, optPtrOrValue?: string | number | boolean | TOptValue, inv = true, useInNameWithParams = true, tab = TOptionTab.INPUTS): voidParameters
name- A string containing the name of the option.type- The type of the option (from TOptionType enum).optPtrOrValue- (Optional) The default value for the option.inv- (Optional) Visibility flag, defaults to true.useInNameWithParams- (Optional) Whether to include this option in the name with parameters, defaults to true.tab- (Optional) The tab to display the option in (from TOptionTab enum), defaults toTOptionTab.INPUTS.
Return Value
This method does not return a value.
Description
The RegOption method registers a new option parameter for an indicator or strategy. This is used to define the configurable parameters that users can adjust when applying the indicator or strategy.
See TOptionType for a complete list of option types.
Example
Last updated