These masks uses some formulas to determine how far is the time-series current value from its high and low of the x preceding bars.
The first mask calculates the distance in percentage between the time-series and its high, while the second use the same calculation but for the low.
The last one calculates the position of the time-series within its high and low.
A value of 1 means the time-series is making a new high and 0 means it is making a new low.
For each time-series the current masks generate 56.
The most obvious time-series that can be used in this mask is probably the close price, but any other time-series can of course be used.
Locating a time-series position relative to its highest and lowest value for a specific number of preceding bars could be a solution to generate profitable rules.
Create many rules, backtest and optimize them then use them to generate a trading system.