TOptValue_str
What Is It?
TOptValue_str
is a class used to define string parameters in custom indicators.
It allows users to enter or modify text values in the indicator settings panel.
Use the createTOptValue_str()
method from the api
object inside Init()
method to create an instance.
When to Use
Use TOptValue_str
when you want to let the user:
Input custom labels or names
Define identifiers or tags
Set any free-form text value
Syntax
Example
In this example:
Name
is a string parameter that can be changed by the user.The value can be accessed via
this.Name.value
.
Notes
You can use the value directly in
Calculate
,OnShow
, or other methods as needed.
Last updated