boolean

Syntax

input <input name>=<boolean_value_used_by_default>;

Description

Defines a boolean input. The default value of the input can either be "yes" or "no".

Example

input useHighLow = yes;

plot HighPrice = if useHighLow then Highest(high, 10) else Highest(close, 10);
plot LowPrice = if useHighLow then Lowest(low, 10) else Lowest(close, 10);

Draws the channel based on the highest and lowest price for the length equal to 10. Whether to use or not the high and low prices instead of the closing price can be defined using the correspondent input, which is set to "yes" by default.