To set the levels programmatically at runtime, instead of at compile-time with #property use the following ...
Sets the value of an indicator property of the double type
Sets the value of an indicator property of the int type
Sets the value of an indicator property of the string type
ENUM_CUSTOMIND_PROPERTY_INTEGER
ID
Description
Property type
INDICATOR_LEVELS
Number of levels in the indicator window
int
INDICATOR_LEVELCOLOR
Color of the level line
color modifier = level number
INDICATOR_LEVELSTYLE
Style of the level line
ENUM_LINE_STYLE modifier = level number
INDICATOR_LEVELWIDTH
Thickness of the level line
int modifier = level number
ENUM_CUSTOMIND_PROPERTY_DOUBLE
ID
Description
Property type
INDICATOR_LEVELVALUE
Level value
double modifier = level number
ENUM_CUSTOMIND_PROPERTY_STRING
ID
Description
Property type
INDICATOR_LEVELTEXT
Level description
string modifier = level number
To set the levels programmatically at runtime, instead of at compile-time with #property use the following ...
Sets the value of an indicator property of the double type
Sets the value of an indicator property of the int type
Sets the value of an indicator property of the string type
ENUM_CUSTOMIND_PROPERTY_INTEGER
ID
Description
Property type
INDICATOR_LEVELS
Number of levels in the indicator window
int
INDICATOR_LEVELCOLOR
Color of the level line
color modifier = level number
INDICATOR_LEVELSTYLE
Style of the level line
ENUM_LINE_STYLE modifier = level number
INDICATOR_LEVELWIDTH
Thickness of the level line
int modifier = level number
ENUM_CUSTOMIND_PROPERTY_DOUBLE
ID
Description
Property type
INDICATOR_LEVELVALUE
Level value
double modifier = level number
ENUM_CUSTOMIND_PROPERTY_STRING
ID
Description
Property type
INDICATOR_LEVELTEXT
Level description
string modifier = level number
Great! Thanks Fernando.
IndicatorSetInteger(INDICATOR_DIGITS, 0); IndicatorSetInteger(INDICATOR_LEVELS, 2); IndicatorSetDouble(INDICATOR_MAXIMUM, 100); IndicatorSetDouble(INDICATOR_MINIMUM, 0); IndicatorSetDouble(INDICATOR_LEVELVALUE, 0, bottom); IndicatorSetDouble(INDICATOR_LEVELVALUE, 1, top);

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Greets,
Would appreciate any comment on where I might be going wrong here. Creating an indicator works as expected. However, I would like to parameterize the two horizontal levels (eg, 80% and 20%) instead of using the usual #property indicator_level1 lines which are hard coded).
Here's the sample code: