void InitLevelLines() {
// The number of horizontal lines.
IndicatorSetInteger(INDICATOR_LEVELS, 2);
// First line settings.
IndicatorSetString(INDICATOR_LEVELTEXT, 0, "Upper line");
IndicatorSetDouble(INDICATOR_LEVELVALUE, 0, 0.1);
IndicatorSetInteger(INDICATOR_LEVELSTYLE, 0, STYLE_DASHDOT);
IndicatorSetInteger(INDICATOR_LEVELCOLOR, 0, clrPink);
IndicatorSetInteger(INDICATOR_LEVELWIDTH, 0, 1);
// Second line settings.
IndicatorSetString(INDICATOR_LEVELTEXT, 1, "Lower line");
IndicatorSetDouble(INDICATOR_LEVELVALUE, 1, -0.1);
IndicatorSetInteger(INDICATOR_LEVELSTYLE, 1, STYLE_DASHDOT);
IndicatorSetInteger(INDICATOR_LEVELCOLOR, 1, clrPink);
IndicatorSetInteger(INDICATOR_LEVELWIDTH, 1, 1);
}
int OnInit() {
// ...
InitLevelLines();
// ...
return INIT_SUCCEEDED;
}