SetHiding

SetHiding ( double condition );

Description

Controls visibility of a plot depending on a condition. If this condition is true, the plot is hidden; otherwise the plot is visible.

Input parameters

Parameter Default value Description
condition - Defines condition upon which the plot is hidden.

Example

plot DailyClose = close(period = AggregationPeriod.DAY);
plot WeeklyClose = close(period = AggregationPeriod.WEEK);
plot MonthlyClose = close(period = AggregationPeriod.MONTH);

DailyClose.SetHiding(GetAggregationPeriod() >= AggregationPeriod.DAY);
WeeklyClose.SetHiding(GetAggregationPeriod() >= AggregationPeriod.WEEK);
MonthlyClose.SetHiding(GetAggregationPeriod() >= AggregationPeriod.MONTH);

In this example, the daily plot is hidden if the aggregation period is greater than or equal to one day. The weekly plot is hidden if the aggregation period is not less than one week. The monthly plot is hidden if the aggregation period is greater than or equal to one month. For more information about the aggregation period, see the AggregationPeriod article in the Constants section.